Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
SPDX-License-Identifier: Proprietary
Copyright (C) 2020-2026 Arm Limited or its affiliates and Contributors. All rights reserved.
SPDX-License-Identifier: Apache-2.0
-->
### Description

Expand Down
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!--
Copyright (C) 2020-2026 Arm Limited or its affiliates and Contributors. All rights reserved.
SPDX-License-Identifier: Apache-2.0
-->
---
name: Bug report
about: Create a report to help us improve
Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
SPDX-License-Identifier: Proprietary
Copyright (C) 2020-2026 Arm Limited or its affiliates and Contributors. All rights reserved.
SPDX-License-Identifier: Apache-2.0
-->
### Description

Expand Down
38 changes: 25 additions & 13 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Build and Test

# Set environment variables available in all jobs and steps
env:
go_version: "1.25.5"
python_version: "3.9"
go_version: "1.26.0"
python_version: "3.11"

on:
workflow_call:
Expand All @@ -14,6 +14,10 @@ on:

jobs:
build-and-test:
permissions:
contents: read
checks: write
pull-requests: write
strategy:
matrix:
#FIXME os: [ubuntu-latest, macOS-latest, windows-latest]
Expand All @@ -31,7 +35,7 @@ jobs:
steps:
# we want the head of the branch that triggered this, not the reference of the commit, this is so we get updated go versions etc.
- name: Check out [${{ inputs.branch || github.ref }}]
uses: actions/checkout@v6.0.2
uses: actions/checkout@v7.0.1
with:
ref: ${{ inputs.branch || github.ref }}
- name: Update Go env version
Expand All @@ -40,9 +44,11 @@ jobs:
NEW_GO_VERSION=$(cat .github/workflows/build-and-test.yml | grep '^ go_version:' | awk '{ print $2 }' | tr -d '"')
echo "go_version=$NEW_GO_VERSION" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v6
uses: actions/setup-go@v7
with:
go-version: ${{ env.go_version }}
- name: Sync workspace
uses: ARM-software/golang-utils/actions/sync-go-workspace@v1.172.0

- if: ${{ startsWith(matrix.os, 'macOS') }}
run: echo "CACHE_PATH=${{ env.go_cache_macOS_path }}" >> $GITHUB_ENV
Expand All @@ -51,7 +57,7 @@ jobs:
- if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: echo "CACHE_PATH=${{ env.go_cache_ubuntu_path }}" >> $GITHUB_ENV
- name: Load Go Dependency Cache
uses: actions/cache@v5
uses: actions/cache@v6
with:
path: |
${{ env.CACHE_PATH }}
Expand All @@ -62,13 +68,13 @@ jobs:
- name: Set access to private repositories
run: bash ./scripts/setup_github.sh
env:
GIT_TOKEN: ${{ secrets.GIT_SECRET }}
GIT_TOKEN: ${{ secrets.ARM_SOFTWARE_TOKEN }}
- name: Build ${{ matrix.go-module }} on ${{ matrix.os }}
run: |
cat go.mod
go mod download
go build -v ./...
working-directory: ${{ matrix.go-module }}
uses: ARM-software/golang-utils/actions/run-go-modules@v1.172.0
with:
task: build
modules: ./${{ matrix.go-module }}
build-tags: ""
- if: ${{ startsWith(matrix.os, 'ubuntu') }}
name: Linting
uses: golangci/golangci-lint-action@v9
Expand All @@ -77,6 +83,12 @@ jobs:
version: latest
working-directory: ${{ matrix.go-module }}
args: "--verbose --output.text.print-issued-lines --output.text.print-linter-name --output.tab.colors --max-issues-per-linter 0 --max-same-issues 0"
- name: Set up gotestsum
uses: ARM-software/golang-utils/actions/setup-gotestsum@v1.172.0
- name: Test ${{ matrix.go-module }} on ${{ matrix.os }}
run: go test -race -cover -v ./...
working-directory: ${{ matrix.go-module }}
uses: ARM-software/golang-utils/actions/test-go-modules@v1.172.0
with:
modules: ./${{ matrix.go-module }}
build-tags: ""
artifact-prefix: "${{ matrix.go-module }}-${{ matrix.os }}-"
report-name: "${{ matrix.go-module }} tests on ${{ matrix.os }}"
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ concurrency:

# Set environment variables available in all jobs and steps
env:
go_version: "1.25.5"
python_version: "3.9"
go_version: "1.26.0"
python_version: "3.11"

jobs:
# Check that a news file has been added to this branch when a PR is created
Expand All @@ -27,19 +27,19 @@ jobs:
runs-on: ubuntu-latest
steps:
# Checkout with full history for to allow compare with base branch
- uses: actions/checkout@v6.0.2
- uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
- uses: actions/setup-python@v6
- uses: actions/setup-python@v7
with:
python-version: ${{ env.python_version }}
- uses: FranzDiebold/github-env-vars-action@v2
- name: Install CI/CD tools
run: pip install continuous-delivery-scripts && pip list
run: python -m pip install --upgrade 'continuous-delivery-scripts>=4.8.0' && pip list
- name: Assert news
run: bash ./scripts/setup_github.sh && cd-assert-news -b $GIT_BRANCH
run: cd-assert-news -b "${CI_ACTION_REF_NAME}"
env:
GIT_TOKEN: ${{ secrets.GIT_SECRET }}
GIT_BRANCH: ${{ github.head_ref || github.ref }}
GIT_TOKEN: ${{ secrets.ARM_SOFTWARE_TOKEN }}
- name: Report failure if needed
if: ${{ failure() }}
run: |
Expand All @@ -49,10 +49,10 @@ jobs:
name: Check for secrets
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v6
- uses: actions/setup-python@v7
- name: Install tools
run: pip install detect-secrets[gibberish]==1.5.0 && pip list
- uses: actions/checkout@v6.0.2
- uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
# FIXME: GitLeaks requires a licence now
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:

# Set environment variables available in all jobs and steps
env:
python_version: "3.10"
python_version: "3.11"
jobs:
update-client:
uses: ./.github/workflows/update-client.yml
Expand All @@ -21,15 +21,15 @@ jobs:
needs: update-client
steps:
# Checkout with full history for to allow compare with base branch
- uses: actions/checkout@v6.0.2
- uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
- uses: actions/setup-python@v6
- uses: actions/setup-python@v7
with:
python-version: ${{ env.python_version }}
- uses: FranzDiebold/github-env-vars-action@v2
- name: Install CI/CD tools
run: pip install continuous-delivery-scripts && pip list
run: python -m pip install --upgrade 'continuous-delivery-scripts>=4.8.0' && pip list
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v2.5.0
Expand All @@ -46,9 +46,9 @@ jobs:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Assert news
run: bash ./scripts/setup_github.sh && cd-assert-news -b ${CI_ACTION_REF_NAME}
run: cd-assert-news -b "${CI_ACTION_REF_NAME}"
env:
GIT_TOKEN: ${{ secrets.GIT_SECRET }}
GIT_TOKEN: ${{ secrets.ARM_SOFTWARE_TOKEN }}
- name: Auto-merge the PR
run: gh pr merge --auto --squash --body "Dependency upgrade $PR_URL" --merge "$PR_URL"
env:
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/licensing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Licensing

on:
workflow_dispatch:
pull_request:
branches: [main]
schedule:
- cron: '17 3 * * *'

permissions:
contents: write
pull-requests: write

jobs:
licensing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.sha || github.event.repository.default_branch }}
fetch-depth: 0
token: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && github.token || secrets.ARM_SOFTWARE_TOKEN || github.token }}
- uses: actions/setup-python@v7
with:
python-version: '3.11'
- name: Install CDS
run: python -m pip install --upgrade 'continuous-delivery-scripts>=4.8.0'
- name: Update copyright headers
id: licensing
shell: bash
run: |
set -euo pipefail
cd-license-files
if [[ -n "$(git status --porcelain --untracked-files=all)" ]]; then
if ! git grep -q -F ':robot: Update copyright headers' -- 'changes/*.misc'; then
cd-create-news-file --type misc ':robot: Update copyright headers'
fi
echo 'changed=true' >> "$GITHUB_OUTPUT"
fi
- name: Commit changes to the PR branch
if: ${{ steps.licensing.outputs.changed == 'true' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
env:
PR_BRANCH: ${{ github.event.pull_request.head.ref }}
run: |
git add -A
git -c user.name='github-actions[bot]' -c user.email='41898282+github-actions[bot]@users.noreply.github.com' commit -m ':robot: Chores: licensing'
git push origin "HEAD:refs/heads/$PR_BRANCH"
- name: Report changes on a fork PR
if: ${{ steps.licensing.outputs.changed == 'true' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}
run: |
echo '::error::Copyright headers need updating on the fork PR branch; the repository token cannot push to a fork.'
exit 1
- name: Create or update licensing PR
if: ${{ steps.licensing.outputs.changed == 'true' && github.event_name != 'pull_request' }}
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.ARM_SOFTWARE_TOKEN || github.token }}
branch: automation/licensing
base: ${{ github.event.repository.default_branch }}
title: ':robot: Chores: licensing'
commit-message: ':robot: Chores: licensing'
body: |
Update copyright headers with `cd-license-files` and add a misc news fragment.
36 changes: 26 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: GitHub Release

env:
go_version: "1.25.5"
python_version: "3.10"
go_version: "1.26.0"
python_version: "3.11"

on:
workflow_dispatch:
Expand All @@ -19,12 +19,14 @@ jobs:
outputs:
changes: ${{ steps.check.outputs.changes }}
steps:
- uses: actions/checkout@v6.0.2
- uses: actions/checkout@v7.0.1
- name: Check if changes directory contains files
id: check
run: |
CHANGES=$(git show main:changes/ 2>/dev/null | grep -e .feature -e .bugfix -e .major -e .doc -e .misc)
echo "::set-output name=changes::$CHANGES"
echo "changes<<EOF" >> "$GITHUB_OUTPUT"
echo "$CHANGES" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
continue-on-error: true # in case '2>/dev/null' doesn't work

release:
Expand All @@ -33,23 +35,37 @@ jobs:
needs: [ check-for-changes ]
if: needs.check-for-changes.outputs.changes
steps:
- uses: actions/checkout@v6.0.2
- uses: actions/checkout@v7.0.1
with:
# Get the full history as this is required by goreleaser
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v6
uses: actions/setup-go@v7
with:
go-version: ${{ env.go_version }}
cache: true
cache-dependency-path: '**/go.sum'
- name: Setup python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: ${{ env.python_version }}
- uses: FranzDiebold/github-env-vars-action@v2
- name: Install CI/CD tools
run: pip install continuous-delivery-scripts>=2.7 && pip list
run: python -m pip install --upgrade 'continuous-delivery-scripts>=4.8.0' && pip list
- name: Install goreleaser
uses: goreleaser/goreleaser-action@v7
with:
install-only: true
distribution: goreleaser
version: latest
- name: Install Syft
uses: anchore/sbom-action/download-syft@v0
- name: Download Go dependencies for every module
uses: ARM-software/golang-utils/actions/go-multimodules@v1.172.0
with:
task: download
- name: Tag and release
run: bash ./scripts/setup_github.sh && cd-tag-and-release -b ${CI_ACTION_REF_NAME} -t ${{ github.event.inputs.release_type }} -vv
run: cd-tag-and-release -b "${CI_ACTION_REF_NAME}" -t ${{ github.event.inputs.release_type }} -vv
env:
# Using a specific token because GITHUB_TOKEN is not available https://github.com/marketplace/actions/workflow-dispatch#token
GIT_TOKEN: ${{ secrets.GIT_SECRET }}
GIT_TOKEN: ${{ secrets.ARM_SOFTWARE_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 # v4.1.1
uses: actions/checkout@f548e57e544e1ff5a4c46bf1e1b8685f8e4a348a # v4.1.1
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -59,7 +59,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: SARIF file
path: results.sarif
Expand All @@ -68,6 +68,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10
uses: github/codeql-action/upload-sarif@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7
with:
sarif_file: results.sarif
Loading
Loading