Skip to content

Merge pull request #106 from fdefelici/102-sigsegv-while-running-test… #356

Merge pull request #106 from fdefelici/102-sigsegv-while-running-test…

Merge pull request #106 from fdefelici/102-sigsegv-while-running-test… #356

Workflow file for this run

name: CI Action
on:
push:
branches:
- '**'
- '!master'
paths-ignore:
- '**/*.md'
- '**/*.png'
pull_request:
branches:
- '**'
jobs:
build_windows:
name: Build windows_msvc
runs-on: windows-latest
defaults:
run:
shell: cmd
env:
BUILD_DIR: ${{ github.workspace }}\build
steps:
- name: Checkout
uses: actions/checkout@v3
- name: List Workspace
run: dir /a ${{ github.workspace }}
- name: Compile
run: |
echo "== CMAKE VERSION =="
cmake --version
echo "== CMAKE CONFIGURE =="
cmake -B${{env.BUILD_DIR}} -DCLOVE_CMAKE__UC_BUILD=true
echo "== CMAKE BUILD =="
cmake --build ${{env.BUILD_DIR}} --config Release
- name: List Build
run: dir /a ${{env.BUILD_DIR}}
- name: Test
run: |
cd ${{env.BUILD_DIR}}
ctest -C Release -T test --output-on-failure
IF %ERRORLEVEL% NEQ 0 (
exit /b %ERRORLEVEL%
)
cd ${{ github.workspace }}
build_macos:
name: Build macos_apple-clang
runs-on: macos-latest
defaults:
run:
shell: bash
env:
BUILD_DIR: ${{ github.workspace }}/build
steps:
- name: Checkout
uses: actions/checkout@v3
- name: List Workspace
run: ls -la ${{ github.workspace }}
- name: Compile
run: |
echo "== CMAKE VERSION =="
cmake --version
echo "== CMAKE CONFIGURE =="
cmake -B${{env.BUILD_DIR}} -DCLOVE_CMAKE__UC_BUILD=true
echo "== CMAKE BUILD =="
cmake --build ${{env.BUILD_DIR}} --config Release
- name: List Build
run: ls -la ${{env.BUILD_DIR}}
- name: Test
run: |
cd ${{env.BUILD_DIR}}
ctest -C Release -T test --output-on-failure
cd ${{ github.workspace }}
build_ubuntu:
name: Build ubuntu_${{matrix.compiler.c}}-${{matrix.compiler.v}}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
compiler:
- {c: gcc, cpp: g++, v: 11, strict: false}
- {c: gcc, cpp: g++, v: 12, strict: false}
- {c: gcc, cpp: g++, v: 13, strict: true}
- {c: clang, cpp: clang++, v: 13, strict: true}
- {c: clang, cpp: clang++, v: 14, strict: true}
- {c: clang, cpp: clang++, v: 15, strict: true}
- {c: clang, cpp: clang++, v: 16, strict: true}
- {c: clang, cpp: clang++, v: 17, strict: true}
defaults:
run:
shell: bash
env:
BUILD_DIR: ${{ github.workspace }}/build
steps:
- name: Checkout
uses: actions/checkout@v3
- name: List Workspace
run: ls -la ${{ github.workspace }}
- name: Install Clang (if needed)
uses: KyleMayes/install-llvm-action@v1
if: ${{ matrix.compiler.c == 'clang' && matrix.compiler.v > 15 }}
with:
version: "${{ matrix.compiler.v }}"
env: true # set CC / CXX variable
- name: Install GCC (if needed)
# Installing GCC-13 due to regression introduced in ubuntu 22.04 image
# https://github.com/actions/runner-images/issues/9866
if: ${{ matrix.compiler.c == 'gcc' && matrix.compiler.v == 13 }}
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update -y
sudo apt-get install gcc-13
sudo apt-get install g++-13
- name: Set Compiler # only if CC / CXX are not already set from new installation
run: |
if [ -z "${CC}" ]; then
echo "CC=${{matrix.compiler.c}}-${{matrix.compiler.v}}" >> "$GITHUB_ENV"
echo "CXX=${{matrix.compiler.cpp}}-${{matrix.compiler.v}}" >> "$GITHUB_ENV"
else
echo CC=$CC
echo CXX=$CXX
fi
- name: Compile
run: |
echo "== CMAKE VERSION =="
cmake --version
echo "== CMAKE CONFIGURE =="
cmake -B${{env.BUILD_DIR}} -DCLOVE_CMAKE__UC_BUILD=true -DCLOVE_CMAKE__CPP_STRICT_WARN_AS_ERROR=${{matrix.compiler.strict}}
echo "== CMAKE BUILD =="
cmake --build ${{env.BUILD_DIR}} --config Release
- name: List Build
run: ls -la ${{env.BUILD_DIR}}
- name: Test
run: |
cd ${{env.BUILD_DIR}}
ctest -C Release -T test --output-on-failure
cd ${{ github.workspace }}
sanity_check:
name: Sanity Check
runs-on: ubuntu-latest
defaults:
run:
shell: bash
env:
BUILD_DIR: ${{ github.workspace }}/build
steps:
- name: Checkout
uses: actions/checkout@v3
- name: List Workspace
run: ls -la ${{ github.workspace }}
- name: Compile
run: |
echo "== CMAKE VERSION =="
cmake --version
echo "== CMAKE CONFIGURE =="
cmake -B${{env.BUILD_DIR}} -DCLOVE_CMAKE__UC_SANITY=true
echo "== CMAKE BUILD =="
cmake --build ${{env.BUILD_DIR}} --config Release
- name: List Build
run: ls -la ${{env.BUILD_DIR}}
- name: Sanity
run: |
cd ${{env.BUILD_DIR}}
ctest -C Release -T test --output-on-failure
cd ${{ github.workspace }}