-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (47 loc) · 1.48 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
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 update
sudo apt install --no-install-recommends libcriterion-dev
- if: runner.os == 'macOS'
run: |
brew update
brew install criterion coreutils
echo CPATH="/opt/homebrew/include:$CPATH" >> "$GITHUB_ENV"
echo LIBRARY_PATH="/opt/homebrew/lib:$LIBRARY_PATH" >> "$GITHUB_ENV"
- name: Make binaries
run: make -j2 schaf basic-test
- name: Test
run: make test
- name: Test with Santizer
run: make sanitize
- name: Test optimized
run: make clean && make -j2 test OPTFLAGS='-O3 -flto=auto'
- name: Test optimized with Sanitizer
run: make -j2 sanitize OPTFLAGS='-O3 -flto=auto'
- name: Clang - Make binaries
run: make clean && make -j2 schaf basic-test CC=clang
- name: Clang - Test
run: make test CC=clang
- name: Clang - Test with Santizer
run: make sanitize CC=clang
- name: Clang - Test optimized
run: make clean && make -j2 test CC=clang OPTFLAGS='-O3 -flto=auto'
- name: Clang - Test optimized with Sanitizer
run: make -j2 sanitize CC=clang OPTFLAGS='-O3 -flto=auto'