forked from STORM-IRIT/Radium-Engine
-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (74 loc) · 3.45 KB
/
Copy pathpull-request-ci.yml
File metadata and controls
78 lines (74 loc) · 3.45 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: PR CI (release/float)
defaults:
run:
shell: bash
on:
pull_request:
branches:
- release-candidate
env:
ext-dir: $GITHUB_WORKSPACE/external/install/
jobs:
build:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- { name: "Windows MSVC", os: windows-latest, cc: "cl.exe", cxx: "cl.exe", icon: "Windows"}
- { name: "Ubuntu gcc", os: ubuntu-latest, cc: "gcc-10", cxx: "g++-10", icon: "Linux" }
- { name: "MacOS clang", os: macos-latest, cc: "clang", cxx: "clang++", icon: "Apple" }
steps:
- uses: seanmiddleditch/gha-setup-ninja@master
- name: Add msbuild to PATH
uses: seanmiddleditch/gha-setup-vsdevenv@master
if: runner.os == 'Windows'
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
with:
path: ../Qt
key: ${{ matrix.config.name }}-QtCache
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
cached: ${{ steps.cache-qt.outputs.cache-hit }}
- name: Prepare directories
run: |
mkdir -p install/
mkdir -p src/Radium-Engine
mkdir -p build/Radium-Engine
- name: Checkout remote head
uses: actions/checkout@master
with:
path: src/Radium-Engine
- name: Cache externals
id: cache-external
uses: actions/cache@v2
with:
path: external
key: ${{ matrix.config.name }}-external-v1-${{ hashFiles('src/Radium-Engine/external/**/CMakeLists.txt') }}
- name: Configure and build external
if: steps.cache-external.outputs.cache-hit != 'true'
run: |
mkdir -p external/install/
mkdir -p external/build/
cd external/build/
cmake ../../src/Radium-Engine/external -GNinja -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXECUTE_PROCESS_COMMAND_ECHO=STDOUT -DRADIUM_UPDATE_VERSION=OFF -DRADIUM_EXTERNAL_CMAKE_INSTALL_MESSAGE=LAZY -DCMAKE_INSTALL_PREFIX=../install/
cmake --build . --parallel --config Release
- name: Configure Radium
run: |
cd build/Radium-Engine
cmake ../../src/Radium-Engine -GNinja -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../../install/ -DCMAKE_EXECUTE_PROCESS_COMMAND_ECHO=STDOUT -DRADIUM_UPDATE_VERSION=OFF -DRADIUM_EXTERNAL_CMAKE_INSTALL_MESSAGE=LAZY -DRADIUM_INSTALL_DOC=OFF -DRADIUM_ENABLE_TESTING=ON -DEigen3_DIR=${{env.ext-dir}}/share/eigen3/cmake/ -DOpenMesh_DIR=${{env.ext-dir}}/share/OpenMesh/cmake/ -Dcpplocate_DIR=${{env.ext-dir}}/share/cpplocate/ -Dglm_DIR=${{env.ext-dir}}/lib/cmake/glm/ -Dglbinding_DIR=${{env.ext-dir}}/share/glbinding/ -Dglobjects_DIR=${{env.ext-dir}}/share/globjects/ -Dstb_DIR=${{env.ext-dir}}/include/stb/ -Dassimp_DIR=${{env.ext-dir}}/lib/cmake/assimp-5.0/ -Dtinyply_DIR=${{env.ext-dir}}/lib/cmake/tinyply/
- name: Build Radium
run: |
cd build/Radium-Engine
cmake --build . --parallel --config Release --target install
- name: Install tests dep
if: runner.os == 'Linux'
run: sudo apt-get install -y libxml2-utils
- name: Run unit tests
if: runner.os != 'Windows'
run: |
cd build/Radium-Engine
cmake --build . --parallel --config Release --target check