CI: use dynamic smoke PROG based on run id to avoid conflicts #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI - Make build & smoke tests | ||
|
Check failure on line 1 in .github/workflows/ci.yml
|
||
| on: | ||
| push: | ||
| branches: [ main, fix/makefile-new-script ] | ||
| pull_request: | ||
| branches: [ main ] | ||
| jobs: | ||
| build-linux: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install build essentials | ||
| run: | | ||
| sudo apt-get update -y | ||
| sudo apt-get install -y build-essential make gcc | ||
| - name: Make - new + build | ||
| env: | ||
| SMOKE_PROG: ex${{ (github.run_id % 90) + 11 }} | ||
| run: | | ||
| echo "Using smoke prog: $SMOKE_PROG" | ||
| make -B new PROG=$SMOKE_PROG | ||
| make | ||
| - name: Run smoke test | ||
| env: | ||
| SMOKE_PROG: ex${{ (github.run_id % 90) + 11 }} | ||
| run: | | ||
| if [ -x ./bin/$SMOKE_PROG ]; then ./bin/$SMOKE_PROG; else echo "bin/$SMOKE_PROG missing"; exit 1; fi | ||
| build-windows: | ||
| runs-on: windows-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install MSYS2 and make | ||
| shell: powershell | ||
| run: | | ||
| choco install -y msys2 | ||
| refreshenv | ||
| $env:PATH = "C:\\tools\\msys64\\usr\\bin;" + $env:PATH | ||
| - name: Ensure gcc and make available | ||
| shell: bash | ||
| run: | | ||
| pacman -Syu --noconfirm || true | ||
| pacman -S --noconfirm base-devel mingw-w64-x86_64-gcc mingw-w64-x86_64-make | ||
| - name: Make - new + build (MSYS) | ||
| shell: bash | ||
| env: | ||
| SMOKE_PROG: ex${{ (github.run_id % 90) + 11 }} | ||
| run: | | ||
| echo "Using smoke prog: $SMOKE_PROG" | ||
| make -B new PROG=$SMOKE_PROG | ||
| make | ||
| - name: Run smoke test | ||
| shell: bash | ||
| env: | ||
| SMOKE_PROG: ex${{ (github.run_id % 90) + 11 }} | ||
| run: | | ||
| if [ -x ./bin/$SMOKE_PROG ]; then ./bin/$SMOKE_PROG; else echo "bin/$SMOKE_PROG missing"; exit 1; fi | ||