-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (40 loc) · 1.19 KB
/
build.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: CMake Build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up CMake
uses: lukka/get-cmake@latest
- name: Install dependencies on Ubuntu
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y g++-12
- name: Install dependencies on Windows
if: runner.os == 'Windows'
run: |
choco install -y cmake --installargs 'ADD_CMAKE_TO_PATH=System'
choco install -y visualstudio2019buildtools
choco install -y visualstudio2019-workload-vctools
- name: Create build directory
run: mkdir build
- name: Configure with CMake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
- name: Build with CMake
run: cmake --build build --config Release
- name: Install
run: cmake --install build --prefix install
- name: Package with CPack
run: cpack --config build/CPackConfig.cmake