88 pull_request :
99 branches :
1010 - master
11+ - release-candidate
12+ push :
13+ branches :
14+ - release-candidate
15+
1116env :
12- ext-dir : ${GITHUB_WORKSPACE//\\//}/external/install/
17+ install_prefix : install
18+ build_prefix : build
19+ src_prefix : src
1320
1421jobs :
1522 build :
2330 - { name: "MacOS clang", suffix: "macOS", os: macos-latest, cc: "clang", cxx: "clang++", assimp: "ON" }
2431
2532 steps :
26- - uses : seanmiddleditch/gha-setup-ninja@master
33+ - name : Compute paths
34+ id : paths
35+ run : |
36+ radium_build_dir="${{ env.build_prefix }}/${{ matrix.build-type }}/Radium-Engine"
37+ radium_install_dir="${{ env.install_prefix }}/${{ matrix.build-type }}/Radium-Engine"
38+ external_build_dir="${{ env.build_prefix }}/${{ matrix.build-type }}/external"
39+ external_install_dir="${{ env.install_prefix }}/${{ matrix.build-type }}/external"
40+ echo "radium_build_dir=$radium_build_dir" >> $GITHUB_OUTPUT
41+ echo "radium_install_dir=$radium_install_dir" >> $GITHUB_OUTPUT
42+ echo "external_build_dir=$external_build_dir" >> $GITHUB_OUTPUT
43+ echo "external_install_dir=$external_install_dir" >> $GITHUB_OUTPUT
2744
2845 - name : Add msbuild to PATH
2946 uses : seanmiddleditch/gha-setup-vsdevenv@master
@@ -33,58 +50,62 @@ jobs:
3350 uses : jurplel/install-qt-action@v4
3451 with :
3552 cache : true
36- cache-key-prefix : install-qt-action-${{ matrix.config.name }}-6.2.9
53+ cache-key-prefix : install-qt-action-${{ matrix.config.name }}-6.2.0
3754 version : 6.2.0
3855
3956 - name : Prepare directories
4057 run : |
41- mkdir -p install/
42- mkdir -p src/
43- mkdir -p src/Radium-Apps
44- mkdir -p build/Radium-Engine
45- mkdir -p build/Radium-Apps
46- mkdir -p external/install/
47- mkdir -p external/build/
58+ mkdir -p "${{ env.src_prefix }}"
59+ mkdir -p "${{ steps.paths.outputs.radium_build_dir }}"
60+ mkdir -p "${{ steps.paths.outputs.external_build_dir }}"
61+ mkdir -p "${{ steps.paths.outputs.radium_install_dir }}"
62+ mkdir -p "${{ steps.paths.outputs.external_install_dir }}"
4863
4964 - name : Clone Radium
5065 run : |
51- cd src && git clone --recurse-submodules https://github.com/STORM-IRIT/Radium-Engine.git --single-branch && cd ..
66+ git clone --recurse-submodules https://github.com/STORM-IRIT/Radium-Engine.git --single-branch ${{ env.src_dir }}/Radium-Engine
67+ radium_sha=`git -C ${{ env.src_dir }}/Radium-Engine rev-parse --short HEAD`
68+ echo "radium_sha=$radium_sha" >> $GITHUB_OUTPUT
5269
53- - name : Cache externals
54- id : cache-external
70+ - name : Cache radium install
71+ id : cache-radium-install
5572 uses : actions/cache@v4
5673 with :
57- path : external
58- key : ${{ runner.os }}-${{ matrix.config.cc }}-external-${{ hashFiles('src/Radium-Engine/external/**/CMakeLists.txt') }}
59-
60- - name : Configure and build external
61- if : steps.cache-external.outputs.cache-hit != 'true'
62- run : |
63- cd external/build/
64- cmake ../../src/Radium-Engine/external -GNinja -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DCMAKE_BUILD_TYPE=Release -DRADIUM_IO_ASSIMP=${{ matrix.config.assimp }} -DCMAKE_EXECUTE_PROCESS_COMMAND_ECHO=STDOUT -DRADIUM_UPDATE_VERSION=OFF -DRADIUM_EXTERNAL_CMAKE_INSTALL_MESSAGE=LAZY -DCMAKE_INSTALL_PREFIX=../install/
65- cmake --build . --parallel --config Release
66-
67- - name : Configure Radium
68- run : |
69- cd build/Radium-Engine
70- 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/ -DRADIUM_IO_ASSIMP=${{ matrix.config.assimp }} -DCMAKE_EXECUTE_PROCESS_COMMAND_ECHO=STDOUT -DRADIUM_UPDATE_VERSION=OFF -DRADIUM_EXTERNAL_CMAKE_INSTALL_MESSAGE=LAZY -DRADIUM_INSTALL_DOC=OFF -DRADIUM_ENABLE_TESTING=OFF -C ${{env.ext-dir}}/radium-options.cmake
71-
72- - name : Build Radium
74+ path : |
75+ ${{ steps.paths.outputs.external_install_dir }}
76+ ${{ steps.paths.outputs.radium_install_dir }}
77+ key : ${{ matrix.config.name }}-radium-v1-${{ steps.sha.outputs.radium_sha }}
78+ - name : Cache radium build
79+ id : cache-radium-build
80+ uses : actions/cache@v4
81+ with :
82+ path : |
83+ ${{ steps.paths.outputs.external_build_dir }}
84+ ${{ steps.paths.outputs.radium_build_dir }}
85+ key : ${{ matrix.config.name }}-radium-build-v1
86+ - name : Configure and build radium
87+ if : steps.cache-radium-install.outputs.cache-hit != 'true'
7388 run : |
74- cd build/Radium-Engine
75- cmake --build . --parallel --config Release --target install
76-
89+ "${{ env.src_prefix }}/Radium-Engine/scripts/build.sh" \
90+ -B ${{ env.build-prefix }} \
91+ -G Ninja --cxx ${{ matrix.config.cxx }} --cc ${{ matrix.config.cc }} \
92+ -c Release --enable-testing OFF \
93+ --install-external "${{ steps.paths.outputs.external_install_dir }}" \
94+ --install-radium "${{ steps.paths.outputs.radium_install_dir }}"
95+
7796 - name : Clone Radium Apps
7897 uses : actions/checkout@master
7998 with :
8099 path : src/Radium-Apps
81100
82101 - name : Configure Radium Apps
83102 run : |
84- cd build/Radium-Apps
85- cmake ../../src/Radium-Apps -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
86-
103+ cmake -S ${{ env.src-dir }}/Radium-Apps -B ${{ env.build-dir }}/Radium-Apps -GNinja \
104+ -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} \
105+ -DCMAKE_BUILD_TYPE=Release \
106+ -DCMAKE_INSTALL_PREFIX=${{ env.install-dir }}/Radium-Apps \
107+ -DRadium_DIR="${{ steps.paths.outputs.radium_install_dir }}/lib/cmake/Radium"
108+
87109 - name : Build Radium Apps
88110 run : |
89- cd build/Radium-Apps
90- cmake --build . --parallel --config Release --target install
111+ cmake --build ${{ env.build-dir }}/Radium-Apps --parallel --config Release --target install
0 commit comments