Skip to content

Replace testing command in building workflow #72

Replace testing command in building workflow

Replace testing command in building workflow #72

Workflow file for this run

name: 'Build libraries'
on:
push:
branches:
- '**'
paths:
- '.github/workflows/**'
- 'cmake/**'
- 'include/**'
- 'src/**'
- 'tests/**'
- '**/CMakeLists.txt'
pull_request:
branches:
- '**'
paths:
- '.github/workflows/**'
- 'cmake/**'
- 'include/**'
- 'src/**'
- 'tests/**'
- '**/CMakeLists.txt'
defaults:
run:
shell: pwsh
jobs:
build-libraries:
name: 'Build libraries'
strategy:
matrix:
include:
- { system: windows-latest, config: Debug, cc: cl, cpp: cl }
- { system: windows-latest, config: Release, cc: cl, cpp: cl }
- { system: windows-latest, config: Debug, cc: gcc, cpp: g++ }
- { system: windows-latest, config: Release, cc: gcc, cpp: g++ }
- { system: ubuntu-latest, config: Debug, cc: gcc-11, cpp: g++-11 }
- { system: ubuntu-latest, config: Release, cc: gcc-11, cpp: g++-11}
- { system: ubuntu-latest, config: Debug, cc: clang-14, cpp: clang++-14 }
- { system: ubuntu-latest, config: Release, cc: clang-14, cpp: clang++-14 }
fail-fast: false
runs-on: ${{ matrix.system }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Visual Studio Build Tools
uses: ilammy/msvc-dev-cmd@v1
if: ${{ runner.os == 'Windows' && matrix.cc == 'cl' }}
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
if: ${{ runner.os == 'Windows' && matrix.cc == 'gcc' }}
with:
msystem: UCRT64
update: true
install: mingw-w64-ucrt-x86_64-gcc
- name: Setup GCC and Clang
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt update && `
sudo apt install -y `
gcc-11 `
g++-11 `
clang-14
- name: Setup Ninja
uses: imesense/[email protected]
- name: Configure project
run: |
cmake `
-S . `
-B build `
-G "Ninja" `
-DCMAKE_C_COMPILER=${{ matrix.cc }} `
-DCMAKE_CXX_COMPILER=${{ matrix.cpp }} `
-DFLAME_CONAN_SUPPORT=OFF `
-DCMAKE_BUILD_TYPE=${{ matrix.config }}
- name: Build project
run: |
cmake `
--build build `
--config ${{ matrix.config }}
- name: Run tests
run: |
ctest `
--test-dir build `
--extra-verbose