Skip to content

merge

merge #21

Workflow file for this run

name: Linux Build (GCC & Clang)
permissions:
contents: read
on:
push:
branches: [ "**" ]
pull_request:
branches: [ "master" ]
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: [gcc, clang]
build_type: [Release]
shared: [ON, OFF]
include:
- compiler: gcc
c: gcc
cxx: g++
- compiler: clang
c: clang
cxx: clang++
steps:
- name: Checkout repository with submodules
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install compilers
run: |
sudo apt-get update
if [[ "${{ matrix.compiler }}" == "clang" ]]; then
sudo apt-get install -y clang
else
sudo apt-get install -y build-essential
fi
- name: Configure CMake (Linux)
run: >
cmake -B build
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
-DCMAKE_C_COMPILER=${{ matrix.c }}
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DPYRO_COMMON_BUILD_TESTS=ON
-DPYRO_COMMON_SHARED_LIBRARY=${{ matrix.shared }}
-S .
- name: Build (Linux)
run: cmake --build build --config ${{ matrix.build_type }} --parallel 4
- name: Run tests
working-directory: build
run: ctest --build-config ${{ matrix.build_type }}