|
| 1 | +name: Test extra build flows |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + pre_job: |
| 7 | + runs-on: ubuntu-latest |
| 8 | + outputs: |
| 9 | + should_skip: ${{ steps.skip_check.outputs.should_skip }} |
| 10 | + steps: |
| 11 | + - id: skip_check |
| 12 | + uses: fkirc/skip-duplicate-actions@v5 |
| 13 | + with: |
| 14 | + paths_ignore: '["**/README.md", "docs/**", "guidelines/**"]' |
| 15 | + # cancel previous builds if a new commit is pushed |
| 16 | + cancel_others: 'true' |
| 17 | + |
| 18 | + vs-prep: |
| 19 | + name: Prepare Visual Studio build |
| 20 | + runs-on: ubuntu-latest |
| 21 | + steps: |
| 22 | + - uses: actions/checkout@v4 |
| 23 | + - name: Build |
| 24 | + run: make vcxsrc YOSYS_VER=latest |
| 25 | + - uses: actions/upload-artifact@v4 |
| 26 | + with: |
| 27 | + name: vcxsrc |
| 28 | + path: yosys-win32-vcxsrc-latest.zip |
| 29 | + |
| 30 | + vs-build: |
| 31 | + name: Visual Studio build |
| 32 | + runs-on: windows-2019 |
| 33 | + needs: yosys-vcxsrc, pre_job |
| 34 | + if: needs.pre_job.outputs.should_skip != 'true' |
| 35 | + steps: |
| 36 | + - uses: actions/download-artifact@v4 |
| 37 | + with: |
| 38 | + name: vcxsrc |
| 39 | + path: . |
| 40 | + - name: unzip |
| 41 | + run: unzip yosys-win32-vcxsrc-latest.zip |
| 42 | + - name: setup-msbuild |
| 43 | + uses: microsoft/setup-msbuild@v1 |
| 44 | + - name: MSBuild |
| 45 | + working-directory: yosys-win32-vcxsrc-latest |
| 46 | + run: msbuild YosysVS.sln /p:PlatformToolset=v142 /p:Configuration=Release /p:WindowsTargetPlatformVersion=10.0.17763.0 |
| 47 | + |
| 48 | + wasi-build: |
| 49 | + name: WASI build |
| 50 | + needs: pre_job |
| 51 | + if: needs.pre_job.outputs.should_skip != 'true' |
| 52 | + runs-on: ubuntu-latest |
| 53 | + steps: |
| 54 | + - uses: actions/checkout@v4 |
| 55 | + - name: Build |
| 56 | + run: | |
| 57 | + WASI_SDK=wasi-sdk-19.0 |
| 58 | + WASI_SDK_URL=https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-19/wasi-sdk-19.0-linux.tar.gz |
| 59 | + if ! [ -d ${WASI_SDK} ]; then curl -L ${WASI_SDK_URL} | tar xzf -; fi |
| 60 | +
|
| 61 | + mkdir -p build |
| 62 | + cat > build/Makefile.conf <<END |
| 63 | + export PATH := $(pwd)/${WASI_SDK}/bin:${PATH} |
| 64 | + WASI_SYSROOT := $(pwd)/${WASI_SDK}/share/wasi-sysroot |
| 65 | +
|
| 66 | + CONFIG := wasi |
| 67 | + PREFIX := / |
| 68 | +
|
| 69 | + ENABLE_TCL := 0 |
| 70 | + ENABLE_READLINE := 0 |
| 71 | + ENABLE_PLUGINS := 0 |
| 72 | + ENABLE_ZLIB := 0 |
| 73 | + END |
| 74 | +
|
| 75 | + make -C build -f ../Makefile CXX=clang -j$(nproc) |
0 commit comments