Skip to content

Improved CI

Improved CI #179

Workflow file for this run

name: Langulus::Logger CI
on: [push, repository_dispatch]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-latest]
build: [Debug, Release]
arch: [x86, x64]
cxx: [g++, clang++, cl]
exclude:
- os: ubuntu-22.04
cxx: cl
- os: windows-latest
cxx: g++
- os: windows-latest
cxx: clang++
include:
- os: ubuntu-22.04
arch: x86
cmake_args: "-DCMAKE_CXX_FLAGS=-m32"
- os: ubuntu-22.04
arch: x64
cmake_args: "-DCMAKE_CXX_FLAGS=-m64"
- os: windows-latest
arch: x86
cmake_args: "-G \"Visual Studio 17 2022\" -A Win32"
- os: windows-latest
arch: x64
cmake_args: "-G \"Visual Studio 17 2022\" -A x64"
name: "${{matrix.os}}-${{matrix.cxx}}-${{matrix.build}}-${{matrix.arch}}"
runs-on: ${{matrix.os}}
steps:
- name: Dispatch Trigger
if: ${{ startsWith(github.event.action, 'Dependency') }}
run: >
echo "Triggered by dependency: ${{github.event.client_payload.cause}}"
- name: Clone
uses: actions/checkout@v3
- if: matrix.os == 'ubuntu-22.04' && matrix.arch == 'x86'
name: Prepare Linux for cross-compilation
run: |
sudo apt update
sudo apt install g++-multilib
- name: Configure
run: >
cmake
-DCMAKE_CXX_COMPILER=${{matrix.cxx}}
-S .
-B out
-DCMAKE_BUILD_TYPE=${{matrix.build}}
${{matrix.cmake_args}}
- name: Build
run: cmake --build out --config ${{matrix.build}}
- name: Test
run: cd out && ctest -V -C ${{matrix.build}}