-
Notifications
You must be signed in to change notification settings - Fork 3
95 lines (79 loc) · 3.93 KB
/
Copy pathpull-request-ci.yml
File metadata and controls
95 lines (79 loc) · 3.93 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Compile Radium Plugins
defaults:
run:
shell: bash
on:
pull_request:
branches:
- master
env:
ext-dir: ${GITHUB_WORKSPACE//\\//}/external/install/
jobs:
build:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- { name: "Windows MSVC", suffix: "Windows", os: windows-latest, cc: "cl.exe", cxx: "cl.exe", assimp: "OFF" }
- { name: "Ubuntu gcc", suffix: "Linux-gcc10", os: ubuntu-20.04, cc: "gcc-10", cxx: "g++-10", assimp: "ON" }
- { name: "MacOS clang", suffix: "macOS", os: macos-latest, cc: "clang", cxx: "clang++", assimp: "ON" }
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@v2
with:
path: ../Qt
key: ${{ runner.os }}-${{ matrix.config.cc }}-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/
mkdir -p src/Radium-Plugins
mkdir -p build/Radium-Engine
mkdir -p build/Radium-Plugins
mkdir -p external/install/
mkdir -p external/build/
- name: Clone Radium
run: |
cd src && git clone https://github.com/STORM-IRIT/Radium-Engine.git --single-branch && cd ..
- name: Cache externals
id: cache-external
uses: actions/cache@v2
with:
path: external
key: ${{ runner.os }}-${{ matrix.config.cc }}-external-${{ hashFiles('src/Radium-Engine/external/**/CMakeLists.txt') }}
- name: Configure and build external
if: steps.cache-external.outputs.cache-hit != 'true'
run: |
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: Clone Radium Plugins
uses: actions/checkout@master
with:
path: src/Radium-Plugins
- name: Configure Radium Plugins
run: |
cd build/Radium-Plugins
cmake ../../src/Radium-Plugins -GNinja -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../../install/ -DRadium_DIR=../../install/lib/cmake/Radium
- name: Build Radium Plugins
run: |
cd build/Radium-Plugins
cmake --build . --parallel --config Release --target install