Update Changelog #327
Workflow file for this run
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: CI | |
on: | |
push: | |
pull_request: | |
release: | |
types: [published] | |
jobs: | |
ci: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
name: | |
[ubuntu-gcc-9, ubuntu-clang-12, macos-apple-clang-11, windows-msvc-19] | |
include: | |
- name: ubuntu-gcc-9 | |
os: ubuntu-22.04 | |
compiler: g++ | |
compiler-version: 9 | |
compiler-name-conan: gcc | |
- name: ubuntu-clang-12 | |
os: ubuntu-22.04 | |
compiler: clang++ | |
compiler-version: "12" | |
compiler-name-conan: clang | |
- name: macos-apple-clang-11 | |
os: macos-11 | |
- name: windows-msvc-19 | |
os: windows-2019 | |
configure-preset: "ci-windows-msvc2019" | |
build-preset: "ci-msvc2019-debug" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: dependencies (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt install shunit2 ninja-build python3-setuptools python3-pip -y | |
sudo pip3 install conan | |
- name: dependencies (macos) | |
if: runner.os == 'macOS' | |
run: | | |
brew install shunit2 ninja conan coreutils | |
- name: dependencies (windows) | |
if: runner.os == 'Windows' | |
run: | | |
pip install conan | |
curl -L0 https://github.com/kward/shunit2/archive/v2.1.7.zip --output shunit2.zip | |
unzip -j -n shunit2.zip | |
- name: set-compiler-env | |
run: | | |
if [ "${{ matrix.compiler }}" != "" ]; then | |
echo "CXX=${{ matrix.compiler }}-${{ matrix.compiler-version }}" >> $GITHUB_ENV | |
fi | |
shell: bash | |
- name: conan-profile | |
run: | | |
conan profile detect --force | |
if [ "${{ matrix.compiler-name-conan }}" != "" ]; then | |
sed -i 's/compiler=.*/compiler=${{ matrix.compiler-name-conan }}/g' ~/.conan2/profiles/default | |
fi | |
if [ "${{ matrix.compiler-version }}" != "" ]; then | |
sed -i 's/compiler.version=[0-9]\+/compiler.version=${{ matrix.compiler-version }}/g' ~/.conan2/profiles/default | |
fi | |
shell: bash | |
- name: cmake-configure-debug | |
run: | | |
conan install . --output-folder=build --build=missing --settings=build_type=Debug | |
if [ "${{ matrix.configure-preset }}" != "" ]; then | |
cmake --preset=${{ matrix.configure-preset }} | |
else | |
cmake --preset=ci-ninja-debug | |
fi | |
shell: bash | |
- name: build-debug | |
run: | | |
if [ "${{ matrix.build-preset }}" != "" ]; then | |
cmake --build ./build --preset=${{ matrix.build-preset }} | |
else | |
cmake --build ./build | |
fi | |
shell: bash | |
- name: ctest | |
run: ctest -C Debug | |
working-directory: ./build | |
- name: installation-tests | |
if: runner.os == 'Linux' || runner.os == 'macOs' | |
run: | | |
./test/installation-tests.sh | |
shell: bash | |
- name: program-termination-tests | |
if: runner.os == 'Linux' || runner.os == 'macOs' | |
run: | | |
./test/compilation-tests.sh | |
version-consistency-check: | |
if: github.event.action == 'published' || github.ref != 'refs/heads/main' | |
needs: ci | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: dependencies (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt install shunit2 python3-setuptools python3-pip -y | |
sudo pip3 install conan | |
- name: version-consistency | |
run: | | |
git fetch --tags --force | |
./test/version-consistency.sh |