From 699049b218e7cb99799ff78b6af4c3363f1e5b4b Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Thu, 9 May 2024 09:26:12 +1200 Subject: [PATCH 1/8] ci: Combine extra build flow yml Currently only vs.yml and wasi.yml since emscripten is on the chopping block. Use fkirc/skip-duplicate-actions to skip duplicate action runs. --- .github/workflows/extra-builds.yml | 79 ++++++++++++++++++++++++++++++ .github/workflows/vs.yml | 33 ------------- .github/workflows/wasi.yml | 32 ------------ 3 files changed, 79 insertions(+), 65 deletions(-) create mode 100644 .github/workflows/extra-builds.yml delete mode 100644 .github/workflows/vs.yml delete mode 100644 .github/workflows/wasi.yml diff --git a/.github/workflows/extra-builds.yml b/.github/workflows/extra-builds.yml new file mode 100644 index 000000000..64a4da167 --- /dev/null +++ b/.github/workflows/extra-builds.yml @@ -0,0 +1,79 @@ +name: Test extra build flows + +on: [push, pull_request] + +jobs: + pre_job: + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@v5 + with: + paths_ignore: '["**/README.md", "docs/**", "guidelines/**"]' + # cancel previous builds if a new commit is pushed + cancel_others: 'true' + + vs-prep: + name: Prepare Visual Studio build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - name: Build + run: make vcxsrc YOSYS_VER=latest + - uses: actions/upload-artifact@v4 + with: + name: vcxsrc + path: yosys-win32-vcxsrc-latest.zip + + vs-build: + name: Visual Studio build + runs-on: windows-2019 + needs: yosys-vcxsrc, pre_job + if: needs.pre_job.outputs.should_skip != 'true' + steps: + - uses: actions/download-artifact@v4 + with: + name: vcxsrc + path: . + - name: unzip + run: unzip yosys-win32-vcxsrc-latest.zip + - name: setup-msbuild + uses: microsoft/setup-msbuild@v1 + - name: MSBuild + working-directory: yosys-win32-vcxsrc-latest + run: msbuild YosysVS.sln /p:PlatformToolset=v142 /p:Configuration=Release /p:WindowsTargetPlatformVersion=10.0.17763.0 + + wasi-build: + name: WASI build + needs: pre_job + if: needs.pre_job.outputs.should_skip != 'true' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - name: Build + run: | + WASI_SDK=wasi-sdk-19.0 + WASI_SDK_URL=https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-19/wasi-sdk-19.0-linux.tar.gz + if ! [ -d ${WASI_SDK} ]; then curl -L ${WASI_SDK_URL} | tar xzf -; fi + + mkdir -p build + cat > build/Makefile.conf < build/Makefile.conf < Date: Thu, 9 May 2024 09:26:17 +1200 Subject: [PATCH 2/8] extra-builds.yml: Fix prereq list --- .github/workflows/extra-builds.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/extra-builds.yml b/.github/workflows/extra-builds.yml index 64a4da167..362319313 100644 --- a/.github/workflows/extra-builds.yml +++ b/.github/workflows/extra-builds.yml @@ -32,7 +32,7 @@ jobs: vs-build: name: Visual Studio build runs-on: windows-2019 - needs: yosys-vcxsrc, pre_job + needs: [vs-prep, pre_job] if: needs.pre_job.outputs.should_skip != 'true' steps: - uses: actions/download-artifact@v4 From 174c7ebf1729cc54c7d57e6ee20eaf6b4eb55fb9 Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Thu, 9 May 2024 09:26:18 +1200 Subject: [PATCH 3/8] extra-builds.yml: Add concurrent_skipping --- .github/workflows/extra-builds.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/extra-builds.yml b/.github/workflows/extra-builds.yml index 362319313..cc2998e40 100644 --- a/.github/workflows/extra-builds.yml +++ b/.github/workflows/extra-builds.yml @@ -14,6 +14,8 @@ jobs: paths_ignore: '["**/README.md", "docs/**", "guidelines/**"]' # cancel previous builds if a new commit is pushed cancel_others: 'true' + # only run on push *or* pull_request, not both + concurrent_skipping: 'same_content_newer' vs-prep: name: Prepare Visual Studio build From cdce505f82335eeff6a002ee2276ee8771b5d425 Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Thu, 9 May 2024 09:26:18 +1200 Subject: [PATCH 4/8] ci: Add skip check to other actions --- .github/workflows/test-docs.yml | 15 +++++++++++++++ .github/workflows/test-linux.yml | 16 ++++++++++++++++ .github/workflows/test-macos.yml | 16 ++++++++++++++++ 3 files changed, 47 insertions(+) diff --git a/.github/workflows/test-docs.yml b/.github/workflows/test-docs.yml index f6bcd33eb..16de77356 100644 --- a/.github/workflows/test-docs.yml +++ b/.github/workflows/test-docs.yml @@ -6,7 +6,22 @@ on: - main jobs: + pre_job: + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@v5 + with: + # cancel previous builds if a new commit is pushed + cancel_others: 'true' + # only run on push *or* pull_request, not both + concurrent_skipping: 'same_content_newer' + test-docs: + needs: pre_job + if: needs.pre_job.outputs.should_skip != 'true' runs-on: ubuntu-latest steps: - name: Install Dependencies diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index a75873d89..911b3b66e 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -3,7 +3,23 @@ name: Build and run tests (Linux) on: [push, pull_request] jobs: + pre_job: + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@v5 + with: + paths_ignore: '["**/README.md", "docs/**", "guidelines/**"]' + # cancel previous builds if a new commit is pushed + cancel_others: 'true' + # only run on push *or* pull_request, not both + concurrent_skipping: 'same_content_newer' + test-linux: + needs: pre_job + if: needs.pre_job.outputs.should_skip != 'true' runs-on: ${{ matrix.os.id }} strategy: matrix: diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml index 37b66df9b..cbba8adbd 100644 --- a/.github/workflows/test-macos.yml +++ b/.github/workflows/test-macos.yml @@ -3,7 +3,23 @@ name: Build and run tests (macOS) on: [push, pull_request] jobs: + pre_job: + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@v5 + with: + paths_ignore: '["**/README.md", "docs/**", "guidelines/**"]' + # cancel previous builds if a new commit is pushed + cancel_others: 'true' + # only run on push *or* pull_request, not both + concurrent_skipping: 'same_content_newer' + test-macos: + needs: pre_job + if: needs.pre_job.outputs.should_skip != 'true' runs-on: ${{ matrix.os.id }} strategy: matrix: From a9eca9072ea4f00a568eaf26817a9e5da1a655f5 Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Thu, 9 May 2024 09:26:43 +1200 Subject: [PATCH 5/8] ci: Drop emcc --- .github/workflows/emcc.yml | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 .github/workflows/emcc.yml diff --git a/.github/workflows/emcc.yml b/.github/workflows/emcc.yml deleted file mode 100644 index b883cfa0a..000000000 --- a/.github/workflows/emcc.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Emscripten Build - -on: [push, pull_request] - -jobs: - emcc: - runs-on: ubuntu-latest - steps: - - uses: mymindstorm/setup-emsdk@v14 - - uses: actions/checkout@v4 - with: - submodules: true - - name: Build - run: | - make config-emcc - make YOSYS_VER=latest - - uses: actions/upload-artifact@v4 - with: - name: yosysjs - path: yosysjs-latest.zip From 878ac021793829e997e8ccdbd09c93e8c89f132a Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Thu, 9 May 2024 09:39:27 +1200 Subject: [PATCH 6/8] ci: Add skip check to test-verific --- .github/workflows/test-verific.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/test-verific.yml b/.github/workflows/test-verific.yml index ef7fa3829..54d9487ac 100644 --- a/.github/workflows/test-verific.yml +++ b/.github/workflows/test-verific.yml @@ -3,7 +3,25 @@ name: Build and run tests with Verific (Linux) on: [push, pull_request] jobs: + pre_job: + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@v5 + with: + paths_ignore: '["**/README.md"]' + # don't cancel previous builds + cancel_others: 'true' + # only run on push *or* pull_request, not both + concurrent_skipping: 'same_content_newer' + # we have special actions when running on main, so this should be off + skip_after_successful_duplicate: 'false' + test-verific: + needs: pre_job + if: needs.pre_job.outputs.should_skip != 'true' runs-on: [self-hosted, linux, x64] steps: - name: Checkout Yosys From 6df1337d71a7c91f4512777dfdc507a4c3a29a2d Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Thu, 9 May 2024 18:16:05 +1200 Subject: [PATCH 7/8] ci: Update to Node.JS 20 --- .github/workflows/extra-builds.yml | 2 +- .github/workflows/test-docs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/extra-builds.yml b/.github/workflows/extra-builds.yml index cc2998e40..4c4d12dfb 100644 --- a/.github/workflows/extra-builds.yml +++ b/.github/workflows/extra-builds.yml @@ -44,7 +44,7 @@ jobs: - name: unzip run: unzip yosys-win32-vcxsrc-latest.zip - name: setup-msbuild - uses: microsoft/setup-msbuild@v1 + uses: microsoft/setup-msbuild@v2 - name: MSBuild working-directory: yosys-win32-vcxsrc-latest run: msbuild YosysVS.sln /p:PlatformToolset=v142 /p:Configuration=Release /p:WindowsTargetPlatformVersion=10.0.17763.0 diff --git a/.github/workflows/test-docs.yml b/.github/workflows/test-docs.yml index 16de77356..7b3906c52 100644 --- a/.github/workflows/test-docs.yml +++ b/.github/workflows/test-docs.yml @@ -43,7 +43,7 @@ jobs: echo "procs=$(nproc)" >> $GITHUB_ENV - name: Checkout Yosys - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: true - name: Build yosys From b9b1da826072d0bfe14b538eb7792f312831ddbe Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Thu, 9 May 2024 18:17:04 +1200 Subject: [PATCH 8/8] extra-builds.yml: Add skip check to vs-prep --- .github/workflows/extra-builds.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/extra-builds.yml b/.github/workflows/extra-builds.yml index 4c4d12dfb..260394a3f 100644 --- a/.github/workflows/extra-builds.yml +++ b/.github/workflows/extra-builds.yml @@ -20,6 +20,8 @@ jobs: vs-prep: name: Prepare Visual Studio build runs-on: ubuntu-latest + needs: [pre_job] + if: needs.pre_job.outputs.should_skip != 'true' steps: - uses: actions/checkout@v4 with: