Skip to content

CMake fix

CMake fix #80

Workflow file for this run

name: Langulus::Fractalloc CI
on: push
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]
managed: [ON, OFF]
cxx: [g++, clang++-16, ClangCl, v143]
exclude:
- os: ubuntu-22.04
cxx: v143
- os: ubuntu-22.04
cxx: ClangCl
- os: windows-latest
cxx: g++
- os: windows-latest
cxx: clang++-16
include:
- cxx: g++
c: gcc
- cxx: clang++-16
c: clang-16
- 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"
- managed: OFF
suffix: ''
- managed: ON
suffix: '-managed'
name: "${{matrix.os}}-${{matrix.cxx}}-${{matrix.build}}-${{matrix.arch}}${{matrix.suffix}}"
runs-on: ${{matrix.os}}
steps:
- 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
- if: matrix.cxx == 'clang++-16'
name: Installing Clang 16
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main"
sudo apt update
sudo apt install clang-16
- if: matrix.os == 'ubuntu-22.04'
name: Configure (Linux)
run: >
mkdir build && cd build && cmake ..
-DCMAKE_C_COMPILER=${{matrix.c}}
-DCMAKE_CXX_COMPILER=${{matrix.cxx}}
${{matrix.cmake_args}}
-DCMAKE_BUILD_TYPE=${{matrix.build}}
-DCMAKE_CXX_FLAGS="${{matrix.feature[2]}}"
-DLANGULUS_FEATURE_MANAGED_REFLECTION=${{matrix.managed}}
- if: matrix.os == 'windows-latest'
name: Configure (Windows)
run: >
mkdir build && cd build && cmake ..
${{matrix.cmake_args}} -T "${{matrix.cxx}}"
-DCMAKE_BUILD_TYPE=${{matrix.build}}
-DCMAKE_CXX_FLAGS="${{matrix.feature[3]}} /EHsc"
-DLANGULUS_FEATURE_MANAGED_REFLECTION=${{matrix.managed}}
- name: Build
run: cmake --build build -j4 --config ${{matrix.build}}
- name: Test
run: cd build && ctest -V -C ${{matrix.build}}