-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.33 KB
/
Copy pathcpp_ci.yml
File metadata and controls
53 lines (45 loc) · 1.33 KB
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: C++ Engine CI
on:
push:
branches: [ "main", "master" ]
paths:
- 'src_cpp/**'
- '.github/workflows/cpp_ci.yml'
pull_request:
branches: [ "main", "master" ]
paths:
- 'src_cpp/**'
- '.github/workflows/cpp_ci.yml'
jobs:
build-and-test:
name: Build & Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
build_type: [Release]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies (pybind11)
run: python -m pip install --upgrade pip pybind11
- name: Configure CMake
# Working directory is the root.
# We tell CMake that the source is in `src_cpp` (where CMakeLists.txt is).
run: cmake -B build -S src_cpp -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
- name: Build C++ Engine
run: cmake --build build --config ${{ matrix.build_type }} --parallel
- name: Run C++ Tests
working-directory: build
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
./${{ matrix.build_type }}/engine_test.exe
else
./engine_test
fi
shell: bash