-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (35 loc) · 1.13 KB
/
cmake.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: CMake
on: [push]
jobs:
build:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
configuration: [Debug, Release]
include:
- os: ubuntu-latest
cxx: g++-12
steps:
- uses: actions/checkout@v3
- name: Prepare vcpkg
if: ${{matrix.os == 'windows-latest'}}
run: vcpkg install libiconv:x64-windows
- name: Create Build Environment
run: cmake -E make_directory build
- name: Configure CMake
if: ${{matrix.os != 'windows-latest'}}
env:
CXX: ${{matrix.cxx}}
working-directory: build
run: cmake .. -DCMAKE_BUILD_TYPE=${{matrix.configuration}}
- name: Configure CMake
if: ${{matrix.os == 'windows-latest'}}
working-directory: build
run: cmake .. -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake"
- name: Build
working-directory: build
run: cmake --build . --config ${{matrix.configuration}}
- name: Test
working-directory: build
run: ctest -C ${{matrix.configuration}}