name: CMake on: # push only on master: a branch push and its pull request otherwise run # every job twice on the same commit. paths-ignore skips work the change # cannot affect - no job here builds anything # under contrib/, and prose does not change decoded output. push: branches: [master] paths-ignore: - 'docs/**' - '**.md' - 'LICENSE' - '.gitignore' - 'contrib/**' pull_request: paths-ignore: - 'docs/**' - '**.md' - 'LICENSE' - '.gitignore' - 'contrib/**' # Cancel superseded runs: a force-push otherwise leaves the previous commit's # jobs running to completion alongside the new ones. Never cancels master. concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} jobs: build: runs-on: ${{ matrix.os }} # Cap a wedged runner. The slowest legitimate job here finishes well # inside this; without it a VM that fails to boot runs to GitHub's # six-hour maximum, which has happened. timeout-minutes: 15 strategy: matrix: os: [macos-latest, ubuntu-26.04-arm, ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v7 - name: Configure CMake run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release - name: Build run: cmake --build ${{github.workspace}}/build --config Release # The CHDv3/v4 fixtures need nothing but a Python interpreter - unlike # the CHDv5 corpus, which needs chdman. Without them legacy-decode # skips itself, so a runner missing python3 loses coverage rather than # failing. - name: Generate the CHDv3/v4 fixtures shell: bash run: python3 tests/corpus/mklegacy.py tests/corpus/legacy || true # Known-answer tests for the hand-optimised ECC and CRC16 primitives, # plus the decode tests that have their corpus. - name: Known-answer tests run: ctest --test-dir ${{github.workspace}}/build -C Release --output-on-failure