From c94d17d7ac2bfb850949150063e0c3fc54e9c4ed Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Tue, 30 Apr 2024 11:53:55 +1200 Subject: [PATCH] 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 | 75 ++++++++++++++++++++++++++++++ .github/workflows/vs.yml | 31 ------------ .github/workflows/wasi.yml | 30 ------------ 3 files changed, 75 insertions(+), 61 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 00000000000..f8b3cfa1908 --- /dev/null +++ b/.github/workflows/extra-builds.yml @@ -0,0 +1,75 @@ +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 + - 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 + - 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 <