c workflow #5
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 | ||
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- '.github/workflows/C.yml' | ||
- 'src/**' | ||
pull_request: | ||
branches: [ main ] | ||
paths: | ||
- '.github/workflows/C.yml' | ||
- 'src/**' | ||
jobs: | ||
build: | ||
if: "! contains(github.event.head_commit.message, '[skip ci]')" | ||
name: Build C code on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest, macOS-latest, ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install GSL | ||
if: runner.os == 'macOS' | ||
run: brew install gsl | ||
- name: Install GSL | ||
if: runner.os == 'Windows' | ||
run: | | ||
pushd $RUNNER_TEMP | ||
curl --silent --show-error -L https://github.com/rwinlib/gsl/archive/v2.7.zip -o gsl.zip | ||
7z x gsl.zip | ||
popd | ||
echo "GSL_CFLAGS=-I${RUNNER_TEMP}/gsl-2.7/include" >> $GITHUB_ENV | ||
echo "GSL_LIBS=-L$(RUNNER_TEMP)/gsl-2.7/lib/x64" >> $GITHUB_ENV | ||
shell: bash | ||
- name: Put MSYS2_MinGW64 on PATH (https://github.com/actions/runner-images/issues/1613) | ||
if: runner.os == 'Windows' | ||
run: | | ||
echo "${{ runner.temp }}/msys64/mingw64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | ||
echo "${{ runner.temp }}/msys64/mingw64/usr/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | ||
(https://github.com/actions/runner-images/issues/1613) | ||
- run: cd src && ./configure | ||
- run: make -C src all DEBUG=1 WARN_FLAGS='-Werror' | ||
- run: make -C src all DEBUG=0 WARN_FLAGS='-Werror' | ||
- name: Functional tests | ||
run: | | ||
./bin/dominatedsets --help | ||
./bin/dominatedsets --help | ||
./bin/eaf --help | ||
./bin/epsilon --help | ||
./bin/hv --help | ||
./bin/igd --help | ||
./bin/ndsort --help | ||
./bin/nondominated --help | ||