Skip to content

a few minor edits

a few minor edits #3

Workflow file for this run

name: C
on:
push:
branches-ignore: [gh-pages]
paths:
- '.github/workflows/C.yaml'
- 'src/**'
pull_request:
branches-ignore: [gh-pages]
paths:
- '.github/workflows/C.yaml'
- 'src/**'
jobs:
build:
if: "! contains(github.event.head_commit.message, '[skip ci]')"
name: Build C code on ${{ matrix.config.os }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, cc: gcc }
- {os: ubuntu-latest, cc: gcc }
- {os: macOS-latest, cc: gcc }
- {os: macOS-latest, cc: clang }
env:
CC: ${{ matrix.config.cc }}
steps:
- uses: actions/checkout@v4
- name: Install GSL (macOS)
if: runner.os == 'macOS'
run: brew install gsl
- name: Put MSYS2_MinGW64 on PATH
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
- name: Install GSL (Windows)
if: runner.os == 'Windows'
run: |
curl --silent --show-error -L https://github.com/rwinlib/gsl/archive/v2.7.zip -o gsl.zip
7z x gsl.zip
echo "GSL_CFLAGS=-I../gsl-2.7/include" >> $GITHUB_ENV
echo "GSL_LIBS=-L../gsl-2.7/lib/x64" >> $GITHUB_ENV
echo "CC=$CC"
shell: bash
- run: |
cd src
./configure
shell: bash
env:
GSL_CFLAGS: ${{ env.GSL_CFLAGS }}
GSL_LIBS: ${{ env.GSL_LIBS }}
- run: make -C src all DEBUG=1 WARN_FLAGS='-Werror'
if: runner.os != 'Windows'
# FIXME: How to install sanitizers?
- 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
msys2:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
config:
- { sys: clang64, cc: clang }
#- { sys: mingw64, cc: gcc }
#- { sys: ucrt64, cc: gcc }
defaults:
run:
shell: msys2 {0}
steps:
- name: Disable autocrlf
shell: pwsh
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.config.sys }}
update: true
install: >-
make
pacboy: >-
${{ matrix.config.cc }}:p
gsl:p
pkg-config:p
- run: |
cd src
./configure
- run: make -C src all DEBUG=1 WARN_FLAGS='-Werror' CC=${{ matrix.config.cc }}
- run: make -C src all DEBUG=0 WARN_FLAGS='-Werror' CC=${{ matrix.config.cc }}
- 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