-
Notifications
You must be signed in to change notification settings - Fork 133
53 lines (48 loc) · 1.65 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: C/C++ CI
on:
push:
pull_request:
branches: [ main ]
jobs:
build-linux-unix:
strategy:
matrix:
os: [ubuntu]
config: [Debug, Release]
standard: [c++11, c++14, c++17, c++20]
name: ${{matrix.os}}-${{matrix.config}}-${{matrix.standard}}
runs-on: ${{matrix.os}}-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt update && sudo apt install -y zlib1g-dev freeglut3-dev libgtest-dev
- name: CMake configure
run: cmake -G "Unix Makefiles" -DPARTIO_GTEST_ENABLED=ON -DCMAKE_BUILD_TYPE=${{matrix.config}} .
env:
CXXFLAGS_STD: ${{matrix.standard}}
- name: Build
run: cmake --build .
build-windows:
runs-on: windows-latest
strategy:
matrix:
architecture: [x64]
config: [Release]
standard: [c++11, c++14, c++17, c++20]
name: windows-${{matrix.architecture}}-${{matrix.config}}-${{matrix.standard}}
steps:
- uses: actions/checkout@v2
- name: Get ZLIB
run: vcpkg install zlib:${{matrix.architecture}}-windows
- name: Get GLUT
run: vcpkg install freeglut:${{matrix.architecture}}-windows
- name: Get OpenGL
run: vcpkg install opengl:${{matrix.architecture}}-windows
- name: Get gtest
run: vcpkg install gtest:${{matrix.architecture}}-windows
- name: CMake configure
run: cmake "-DCMAKE_TOOLCHAIN_FILE=$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -DPARTIO_GTEST_ENABLED=ON -A ${{matrix.architecture}} .
env:
CXXFLAGS_STD: ${{matrix.standard}}
- name: Build
run: cmake --build . --config ${{matrix.config}}