Skip to content

CI: use dynamic smoke PROG based on run id to avoid conflicts #3

CI: use dynamic smoke PROG based on run id to avoid conflicts

CI: use dynamic smoke PROG based on run id to avoid conflicts #3

Workflow file for this run

name: CI - Make build & smoke tests

Check failure on line 1 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

(Line: 20, Col: 23): Unexpected symbol: '%'. Located at position 16 within expression: (github.run_id % 90) + 11, (Line: 27, Col: 23): Unexpected symbol: '%'. Located at position 16 within expression: (github.run_id % 90) + 11, (Line: 49, Col: 23): Unexpected symbol: '%'. Located at position 16 within expression: (github.run_id % 90) + 11, (Line: 57, Col: 23): Unexpected symbol: '%'. Located at position 16 within expression: (github.run_id % 90) + 11
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