Switch to using CPM package manager instead of vcpkg as its just a wrapper around cmake and makes things more simple. Switch dependency from spdlog to fmt. Changed the directory structure to match the setup recommended by GitLab
93 lines
2.2 KiB
YAML
93 lines
2.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
env:
|
|
CLANG_TIDY_VERSION: "13.0.0"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{matrix.os}}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
build_configuration: [Debug, Release]
|
|
compiler: [llvm, gcc]
|
|
|
|
exclude:
|
|
- os: windows-latest
|
|
|
|
include:
|
|
- os: 'windows-latest'
|
|
triplet: x64-windows
|
|
compiler: llvm
|
|
build_configuration: Debug
|
|
|
|
- os: 'windows-latest'
|
|
triplet: x64-windows
|
|
compiler: llvm
|
|
build_configuration: Release
|
|
|
|
- os: 'windows-latest'
|
|
triplet: x64-windows
|
|
compiler: gcc
|
|
build_configuration: Debug
|
|
|
|
- os: 'windows-latest'
|
|
triplet: x64-windows
|
|
compiler: gcc
|
|
build_configuration: Release
|
|
|
|
- os: 'windows-latest'
|
|
triplet: x64-windows
|
|
compiler: msvc
|
|
build_configuration: Debug
|
|
|
|
- os: 'windows-latest'
|
|
triplet: x64-windows
|
|
compiler: msvc
|
|
build_configuration: Release
|
|
|
|
- os: 'ubuntu-latest'
|
|
triplet: x64-linux
|
|
|
|
- os: 'macos-latest'
|
|
triplet: x64-osx
|
|
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
|
|
- name: cache
|
|
uses: actions/cache@v3
|
|
path: "**/cpm_modules"
|
|
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
|
|
|
|
- name: setup dependencies
|
|
uses: aminya/setup-cpp@v1
|
|
with:
|
|
compiler: ${{ matrix.compiler }}
|
|
vcvarsall: ${{ contains(matrix.os, 'windows')}}
|
|
cmake: true
|
|
ccache: true
|
|
clangtidy: ${{ env.CLANG_TIDY_VERSION }}
|
|
cppcheck: true
|
|
|
|
- name: Configure CMake
|
|
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_configuration}}
|
|
|
|
- name: Build
|
|
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_configuration}}
|
|
|
|
- name: Test
|
|
working-directory: ${{github.workspace}}/build
|
|
run: ctest -C ${{matrix.build_configuration}}
|
|
|