-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.6 KB
/
Copy pathci.yml
File metadata and controls
47 lines (39 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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