WIP #1300
This file contains 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: | |
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' |