45 lines (36 loc) · 1.29 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
36
37
38
39
40
41
42
43
44
45
name: CMake
on: [push]
env:
BUILD_TYPE: Debug
jobs:
Linux-Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Package Dependencies
run: |
sudo apt-get update
sudo apt-get install -yq gettext pkg-config zlib1g-dev libjpeg-dev libxml2-dev libsigc++-2.0-dev
sudo apt-get install -yq libgtest-dev libeigen3-dev libwxgtk3.0-gtk3-dev libpng-dev
sudo apt-get install -yq libftgl-dev libglew-dev libalut-dev libvorbis-dev python3-dev
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/install
- name: Build
env:
CMAKE_BUILD_PARALLEL_LEVEL: 3
CTEST_OUTPUT_ON_FAILURE: ON
shell: bash
run: cmake --build . --config $BUILD_TYPE --target install
- name: Run Unit Tests
env:
DR_VERBOSE_TEST_LOG: ON
shell: bash
run: ctest -C $BUILD_TYPE --output-log dr-test-run.log --verbose
- name: Upload Test Results
uses: actions/upload-artifact@v2
with:
name: unit-test-results
path: dr-test-run.log