Repository navigation
RangeLiteral records whether the step was written (#6) #18
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install bison/flex (Linux) | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update && sudo apt-get install -y bison flex | |
| - name: Install bison/flex (macOS) | |
| if: runner.os == 'macOS' | |
| run: brew install bison flex | |
| - name: Install bison/flex (Windows) | |
| if: runner.os == 'Windows' | |
| # windows-latest ships MSYS2 pre-installed at C:\msys64 (not on | |
| # PATH). Its bison (3.8.2) satisfies parser.y's %require "3.8"; | |
| # winflexbison3's Chocolatey package is stuck on bison 3.7.4 (2021 | |
| # release) and fails that check. CMakeLists.txt's own WIN32 block | |
| # points BISON_EXECUTABLE/FLEX_EXECUTABLE straight at the MSYS2 | |
| # binaries. | |
| run: C:\msys64\usr\bin\bash.exe -lc "pacman -Sy --noconfirm bison flex" | |
| - name: Configure | |
| run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release | |
| # --config/-C Release: a no-op on the single-config generators | |
| # Linux/macOS use (CMAKE_BUILD_TYPE already picked the config), but | |
| # required on Windows's default multi-config Visual Studio | |
| # generator, which ignores CMAKE_BUILD_TYPE entirely -- passing it | |
| # unconditionally on all three platforms is simpler than branching. | |
| - name: Build | |
| run: cmake --build build --config Release -j | |
| - name: Test | |
| run: ctest --test-dir build --output-on-failure -C Release |