-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (40 loc) · 1.26 KB
/
build.yaml
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
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
check-format:
name: Check Formatting 🔍
uses: ./.github/workflows/clang-format-check.yaml
permissions:
contents: read
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
build_type: [Release, Debug]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up CMake
uses: jwlawson/actions-setup-cmake@v2
- name: Set up dependencies
run: |
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
sudo apt-get update
sudo apt-get install -y cmake g++ wget
elif [ "${{ matrix.os }}" == "macos-latest" ]; then
brew update
brew install cmake
elif [ "${{ matrix.os }}" == "windows-latest" ]; then
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'
fi
- name: Configure CMake
run: cmake -B build -S . -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
- name: Build
run: cmake --build build --config ${{ matrix.build_type }}
- name: Install
run: cmake --install build --prefix dist