Actions: Separate jobs per OS. #92
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: C CI | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| push: | |
| branches-ignore: | |
| - '_**' | |
| - '**wip**' | |
| jobs: | |
| build-ubuntu: | |
| if: ${{ ! startsWith(github.event.head_commit.message, 'WIP') }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - run: | | |
| sudo apt install -U --no-install-recommends libcriterion-dev | |
| echo MAKEFLAGS=-j4 >> "$GITHUB_ENV" | |
| - name: Test | |
| run: make test | |
| - name: Test -O3 | |
| run: make clean && make test XCFLAGS='-O3 -g0' | |
| build-macos: | |
| if: ${{ ! startsWith(github.event.head_commit.message, 'WIP') }} | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - 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" | |
| echo DYLD_LIBRARY_PATH=. >> "$GITHUB_ENV" | |
| echo MAKEFLAGS=-j3 >> "$GITHUB_ENV" | |
| - name: Test | |
| run: make test CC=clang | |
| - name: Test -O3 | |
| run: make clean && make test CC=clang XCFLAGS='-O3 -g0' |