-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (34 loc) · 981 Bytes
/
c-test.yml
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
name: C CI
on:
pull_request:
workflow_dispatch:
push:
branches-ignore:
- '_**'
- '**wip**'
jobs:
build:
if: ${{ ! startsWith(github.event.head_commit.message, 'WIP') }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- if: runner.os == 'Linux'
run: |
sudo apt install --no-install-recommends libcriterion-dev
- if: runner.os == 'macOS'
run: |
brew install criterion
echo CPATH="/opt/homebrew/include:$CPATH" >> "$GITHUB_ENV"
echo LIBRARY_PATH="/opt/homebrew/lib:$LIBRARY_PATH" >> "$GITHUB_ENV"
- run: echo MAKEFLAGS=-j2 >> "$GITHUB_ENV"
- name: Test
run: make test
- name: Test -O3
run: make clean && make test XCFLAGS=-O3
- name: Clang - Test
run: make clean && make test CC=clang
- name: Clang - Test -O3
run: make clean && make test CC=clang XCFLAGS=-O3