Skip to content

Commit 40eddff

Browse files
committed
Actions: Separate jobs per OS.
1 parent 5eaf25d commit 40eddff

1 file changed

Lines changed: 21 additions & 18 deletions

File tree

.github/workflows/c-test.yml

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,32 @@ on:
99
- '**wip**'
1010

1111
jobs:
12-
build:
12+
build-ubuntu:
1313
if: ${{ ! startsWith(github.event.head_commit.message, 'WIP') }}
14-
strategy:
15-
matrix:
16-
os: [ ubuntu-latest, macos-latest ]
17-
runs-on: ${{ matrix.os }}
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v5
17+
- run: |
18+
sudo apt install -U --no-install-recommends libcriterion-dev
19+
echo MAKEFLAGS=-j4 >> "$GITHUB_ENV"
20+
- name: Test
21+
run: make test
22+
- name: Test -O3
23+
run: make clean && make test XCFLAGS='-O3 -g0'
1824

25+
build-macos:
26+
if: ${{ ! startsWith(github.event.head_commit.message, 'WIP') }}
27+
runs-on: macos-latest
1928
steps:
20-
- uses: actions/checkout@v4
21-
- if: runner.os == 'Linux'
22-
run: |
23-
sudo apt install --no-install-recommends libcriterion-dev
24-
- if: runner.os == 'macOS'
25-
run: |
26-
brew install criterion
29+
- uses: actions/checkout@v5
30+
- run: |
31+
brew update
32+
brew install criterion coreutils
2733
echo CPATH="/opt/homebrew/include:$CPATH" >> "$GITHUB_ENV"
2834
echo LIBRARY_PATH="/opt/homebrew/lib:$LIBRARY_PATH" >> "$GITHUB_ENV"
29-
- run: echo MAKEFLAGS=-j2 >> "$GITHUB_ENV"
35+
echo DYLD_LIBRARY_PATH=. >> "$GITHUB_ENV"
36+
echo MAKEFLAGS=-j3 >> "$GITHUB_ENV"
3037
- name: Test
31-
run: make test
38+
run: make test CC=clang
3239
- name: Test -O3
33-
run: make clean && make test XCFLAGS='-O3 -g0'
34-
- name: Clang - Test
35-
run: make clean && make test CC=clang
36-
- name: Clang - Test -O3
3740
run: make clean && make test CC=clang XCFLAGS='-O3 -g0'

0 commit comments

Comments
 (0)