From 38e54deccac0057fbeb2dc8492236d5387e931be Mon Sep 17 00:00:00 2001 From: Timor Knudsen Date: Sun, 22 Mar 2026 10:23:48 +0100 Subject: [PATCH 1/7] Upgrade Github action versions --- .github/workflows/docs.yml | 3 ++- .github/workflows/lint.yml | 2 +- .github/workflows/simulation.yml | 4 ++-- .github/workflows/synthesis.yml | 2 +- .github/workflows/test.yml | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 52b0e53..7b52e21 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -11,6 +11,7 @@ on: permissions: contents: read + packages: read pages: write id-token: write @@ -26,7 +27,7 @@ jobs: password: ${{ secrets.github_token }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - name: Synthesis diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0bd0b99..8ed6244 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,7 +19,7 @@ jobs: password: ${{ secrets.github_token }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - name: Run lint diff --git a/.github/workflows/simulation.yml b/.github/workflows/simulation.yml index 15e8dc6..7927548 100644 --- a/.github/workflows/simulation.yml +++ b/.github/workflows/simulation.yml @@ -19,13 +19,13 @@ jobs: password: ${{ secrets.github_token }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - name: Simulation run: make sim - name: Upload - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: Simulation artifacts path: | diff --git a/.github/workflows/synthesis.yml b/.github/workflows/synthesis.yml index 5df947b..f35eb8d 100644 --- a/.github/workflows/synthesis.yml +++ b/.github/workflows/synthesis.yml @@ -19,7 +19,7 @@ jobs: password: ${{ secrets.github_token }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - name: Synthesis diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4f4ed23..efe0bf3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ jobs: password: ${{ secrets.github_token }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - name: Test From f02083e98dd2d6e359c31b2bb4430ba1d1f5a2e7 Mon Sep 17 00:00:00 2001 From: Timor Knudsen Date: Sun, 22 Mar 2026 10:28:42 +0100 Subject: [PATCH 2/7] Use prek-action instead of running prek manually --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8ed6244..35cab6e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,4 +23,4 @@ jobs: with: fetch-depth: 0 - name: Run lint - run: make lint + uses: j178/prek-action@v2 From 6c11c67c70d6019ac4bef5b5bef04d0aa6b9b195 Mon Sep 17 00:00:00 2001 From: Timor Knudsen Date: Sun, 22 Mar 2026 10:33:46 +0100 Subject: [PATCH 3/7] Try not using root --- .github/workflows/lint.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 35cab6e..fcb4356 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,7 +13,6 @@ jobs: runs-on: ubuntu-latest container: image: ghcr.io/amd/mini-isp-dev:latest - options: --user root credentials: username: ${{ github.actor }} password: ${{ secrets.github_token }} @@ -23,4 +22,4 @@ jobs: with: fetch-depth: 0 - name: Run lint - uses: j178/prek-action@v2 + run: make lint From b2c8236b900e19203ba36eb1f35cfbc1761d7f5a Mon Sep 17 00:00:00 2001 From: Timor Knudsen Date: Sun, 22 Mar 2026 11:18:31 +0100 Subject: [PATCH 4/7] More Github action version upgrades and git safe.directory --- .github/workflows/docker_build.yml | 5 +---- .github/workflows/docs.yml | 12 ++++++------ .github/workflows/lint.yml | 5 ++++- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 63cb575..6e981ea 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -33,7 +33,7 @@ jobs: fetch-depth: 0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 - name: Lint Dockerfile uses: hadolint/hadolint-action@v3.1.0 @@ -49,9 +49,6 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v4 - - name: Build base container image uses: docker/build-push-action@v7 with: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 7b52e21..e92cd0b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -16,7 +16,7 @@ permissions: id-token: write jobs: - synthesis_reports: + synthesis: name: "Generate synthesis reports" runs-on: ubuntu-latest container: @@ -53,17 +53,17 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.github_token }} steps: - - uses: actions/configure-pages@v3 - - uses: actions/checkout@v4 + - uses: actions/configure-pages@v5 + - uses: actions/checkout@v6 with: fetch-depth: 0 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v8 with: name: synthesis_reports path: build/docs/reports - run: make docs - - uses: actions/upload-pages-artifact@v2 + - uses: actions/upload-pages-artifact@v4 with: path: build/site - - uses: actions/deploy-pages@v3 + - uses: actions/deploy-pages@v4 id: deployment diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index fcb4356..202408d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,6 +13,7 @@ jobs: runs-on: ubuntu-latest container: image: ghcr.io/amd/mini-isp-dev:latest + options: --user root credentials: username: ${{ github.actor }} password: ${{ secrets.github_token }} @@ -22,4 +23,6 @@ jobs: with: fetch-depth: 0 - name: Run lint - run: make lint + run: | + git config --global --add safe.directory $GITHUB_WORKSPACE + make lint From 1efab095cd4975808c92085ccc25d43c78d192f4 Mon Sep 17 00:00:00 2001 From: Timor Knudsen Date: Sun, 22 Mar 2026 12:00:25 +0100 Subject: [PATCH 5/7] Unify all actions in one file --- .github/workflows/cicd.yml | 128 +++++++++++++++++++++++++++++++ .github/workflows/docs.yml | 69 ----------------- .github/workflows/lint.yml | 28 ------- .github/workflows/simulation.yml | 35 --------- .github/workflows/synthesis.yml | 26 ------- .github/workflows/test.yml | 26 ------- 6 files changed, 128 insertions(+), 184 deletions(-) create mode 100644 .github/workflows/cicd.yml delete mode 100644 .github/workflows/docs.yml delete mode 100644 .github/workflows/lint.yml delete mode 100644 .github/workflows/simulation.yml delete mode 100644 .github/workflows/synthesis.yml delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml new file mode 100644 index 0000000..2c9b3b3 --- /dev/null +++ b/.github/workflows/cicd.yml @@ -0,0 +1,128 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2025 Timor Knudsen (AMD) + +# SPDX-License-Identifier: MIT + +name: Linting and license check + +on: [push] + +jobs: + lint: + name: "Run pre-commit lint" + runs-on: ubuntu-latest + container: + image: ghcr.io/amd/mini-isp-dev:latest + options: --user root + credentials: + username: ${{ github.actor }} + password: ${{ secrets.github_token }} + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + fetch-depth: 0 + - name: Run lint + run: | + git config --global --add safe.directory $GITHUB_WORKSPACE + make lint + + simulation: + name: "Run test bench simulations" + runs-on: ubuntu-latest + container: + image: ghcr.io/amd/mini-isp-dev:latest + options: --user root + credentials: + username: ${{ github.actor }} + password: ${{ secrets.github_token }} + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + fetch-depth: 0 + - name: Simulation + run: make sim + - name: Upload + uses: actions/upload-artifact@v7 + with: + name: Simulation artifacts + path: | + build/sim/**/*.png + build/sim/**/*.pdf + build/sim/**/*.xml + retention-days: 1 + + synthesis: + name: "Run synthesis and generate reports" + runs-on: ubuntu-latest + container: + image: ghcr.io/amd/mini-isp-dev:latest + options: --user root + credentials: + username: ${{ github.actor }} + password: ${{ secrets.github_token }} + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + fetch-depth: 0 + - name: Synthesis + run: make synth + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: synthesis_reports + path: build/docs/reports + retention-days: 1 + + test: + name: "Run Python tests" + runs-on: ubuntu-latest + container: + image: ghcr.io/amd/mini-isp-dev:latest + options: --user root + credentials: + username: ${{ github.actor }} + password: ${{ secrets.github_token }} + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + fetch-depth: 0 + - name: Test + run: make test + + docs: + name: "Generate documentation" + needs: synthesis + permissions: + contents: read + packages: read + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + container: + image: ghcr.io/amd/mini-isp-dev:latest + options: --user root + credentials: + username: ${{ github.actor }} + password: ${{ secrets.github_token }} + steps: + - uses: actions/configure-pages@v5 + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + - uses: actions/download-artifact@v8 + with: + name: synthesis_reports + path: build/docs/reports + - run: make docs + - uses: actions/upload-pages-artifact@v4 + with: + path: build/site + - uses: actions/deploy-pages@v4 + id: deployment diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index e92cd0b..0000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,69 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. -# SPDX-FileCopyrightText: Copyright (c) 2025 Timor Knudsen (AMD) - -# SPDX-License-Identifier: MIT - -name: Documentation -on: - push: - branches: - - main - -permissions: - contents: read - packages: read - pages: write - id-token: write - -jobs: - synthesis: - name: "Generate synthesis reports" - runs-on: ubuntu-latest - container: - image: ghcr.io/amd/mini-isp-dev:latest - options: --user root - credentials: - username: ${{ github.actor }} - password: ${{ secrets.github_token }} - steps: - - name: Checkout - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - name: Synthesis - run: uv run pytest -m "synth" --speed default - - name: Upload - uses: actions/upload-artifact@v4 - with: - name: synthesis_reports - path: build/docs/reports - retention-days: 1 - - deploy: - name: "Generate documentation" - needs: synthesis_reports - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - container: - image: ghcr.io/amd/mini-isp-dev:latest - options: --user root - credentials: - username: ${{ github.actor }} - password: ${{ secrets.github_token }} - steps: - - uses: actions/configure-pages@v5 - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - uses: actions/download-artifact@v8 - with: - name: synthesis_reports - path: build/docs/reports - - run: make docs - - uses: actions/upload-pages-artifact@v4 - with: - path: build/site - - uses: actions/deploy-pages@v4 - id: deployment diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 202408d..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,28 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. -# SPDX-FileCopyrightText: Copyright (c) 2025 Timor Knudsen (AMD) - -# SPDX-License-Identifier: MIT - -name: Linting and license check - -on: [push] - -jobs: - pre-commit: - name: "Run pre-commit lint" - runs-on: ubuntu-latest - container: - image: ghcr.io/amd/mini-isp-dev:latest - options: --user root - credentials: - username: ${{ github.actor }} - password: ${{ secrets.github_token }} - steps: - - name: Checkout - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - name: Run lint - run: | - git config --global --add safe.directory $GITHUB_WORKSPACE - make lint diff --git a/.github/workflows/simulation.yml b/.github/workflows/simulation.yml deleted file mode 100644 index 7927548..0000000 --- a/.github/workflows/simulation.yml +++ /dev/null @@ -1,35 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. -# SPDX-FileCopyrightText: Copyright (c) 2025 Timor Knudsen (AMD) - -# SPDX-License-Identifier: MIT - -name: Simulation - -on: [push] - -jobs: - build: - name: "Run test bench simulations" - runs-on: ubuntu-latest - container: - image: ghcr.io/amd/mini-isp-dev:latest - options: --user root - credentials: - username: ${{ github.actor }} - password: ${{ secrets.github_token }} - steps: - - name: Checkout - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - name: Simulation - run: make sim - - name: Upload - uses: actions/upload-artifact@v7 - with: - name: Simulation artifacts - path: | - build/sim/**/*.png - build/sim/**/*.pdf - build/sim/**/*.xml - retention-days: 1 diff --git a/.github/workflows/synthesis.yml b/.github/workflows/synthesis.yml deleted file mode 100644 index f35eb8d..0000000 --- a/.github/workflows/synthesis.yml +++ /dev/null @@ -1,26 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. -# SPDX-FileCopyrightText: Copyright (c) 2025 Timor Knudsen (AMD) - -# SPDX-License-Identifier: MIT - -name: Synthesis - -on: [push] - -jobs: - build: - name: "Run synthesis and generate reports" - runs-on: ubuntu-latest - container: - image: ghcr.io/amd/mini-isp-dev:latest - options: --user root - credentials: - username: ${{ github.actor }} - password: ${{ secrets.github_token }} - steps: - - name: Checkout - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - name: Synthesis - run: make synth diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index efe0bf3..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,26 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. -# SPDX-FileCopyrightText: Copyright (c) 2025 Timor Knudsen (AMD) - -# SPDX-License-Identifier: MIT - -name: Test - -on: [push] - -jobs: - build: - name: "Run Python tests" - runs-on: ubuntu-latest - container: - image: ghcr.io/amd/mini-isp-dev:latest - options: --user root - credentials: - username: ${{ github.actor }} - password: ${{ secrets.github_token }} - steps: - - name: Checkout - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - name: Test - run: make test From dec04d7651750e5cbcf651f41ee11edf7b448bcc Mon Sep 17 00:00:00 2001 From: Timor Knudsen Date: Sun, 22 Mar 2026 12:11:14 +0100 Subject: [PATCH 6/7] Generate docs conditionally only for main branch --- .github/workflows/cicd.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 2c9b3b3..3fd42f3 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -98,7 +98,7 @@ jobs: needs: synthesis permissions: contents: read - packages: read + packages: write pages: write id-token: write environment: @@ -111,6 +111,7 @@ jobs: credentials: username: ${{ github.actor }} password: ${{ secrets.github_token }} + if: ${{ github.ref == 'ref/head/main' }} steps: - uses: actions/configure-pages@v5 - uses: actions/checkout@v6 From abee0eee798905e1e31330097d329741c8f83d40 Mon Sep 17 00:00:00 2001 From: Timor Knudsen Date: Sun, 22 Mar 2026 14:12:38 +0100 Subject: [PATCH 7/7] Rename action and upgrade upload action --- .github/workflows/cicd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 3fd42f3..6c5b60e 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -3,7 +3,7 @@ # SPDX-License-Identifier: MIT -name: Linting and license check +name: "Lint, simulate, synthesize, test and docs" on: [push] @@ -70,7 +70,7 @@ jobs: - name: Synthesis run: make synth - name: Upload - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: synthesis_reports path: build/docs/reports