Release candidate #67
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Compile Radium Apps | |
| defaults: | |
| run: | |
| shell: bash | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| - release-candidate | |
| push: | |
| branches: | |
| - release-candidate | |
| env: | |
| install_prefix: install | |
| build_prefix: build | |
| src_prefix: src | |
| 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: "Ubuntu-gcc", os: ubuntu-24.04, cc: "gcc", cxx: "g++", assimp: "ON" } | |
| - { name: "MacOS clang", suffix: "macOS", os: macos-latest, cc: "clang", cxx: "clang++", assimp: "ON" } | |
| build-type: | |
| - "Release" | |
| steps: | |
| - name: Compute paths | |
| id: paths | |
| run: | | |
| radium_build_dir="${{ env.build_prefix }}/${{ matrix.build-type }}/Radium-Engine" | |
| radium_install_dir="${{ env.install_prefix }}/${{ matrix.build-type }}/Radium-Engine" | |
| external_build_dir="${{ env.build_prefix }}/${{ matrix.build-type }}/external" | |
| external_install_dir="${{ env.install_prefix }}/${{ matrix.build-type }}/external" | |
| echo "radium_build_dir=$radium_build_dir" >> $GITHUB_OUTPUT | |
| echo "radium_install_dir=$radium_install_dir" >> $GITHUB_OUTPUT | |
| echo "external_build_dir=$external_build_dir" >> $GITHUB_OUTPUT | |
| echo "external_install_dir=$external_install_dir" >> $GITHUB_OUTPUT | |
| - name: Add msbuild to PATH | |
| uses: seanmiddleditch/gha-setup-vsdevenv@master | |
| if: runner.os == 'Windows' | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| cache: true | |
| cache-key-prefix: install-qt-action-${{ matrix.config.name }}-6.2.0 | |
| version: 6.2.0 | |
| - name: Prepare directories | |
| run: | | |
| mkdir -p "${{ env.src_prefix }}" | |
| mkdir -p "${{ steps.paths.outputs.radium_build_dir }}" | |
| mkdir -p "${{ steps.paths.outputs.external_build_dir }}" | |
| mkdir -p "${{ steps.paths.outputs.radium_install_dir }}" | |
| mkdir -p "${{ steps.paths.outputs.external_install_dir }}" | |
| - name: Clone Radium | |
| id: sha | |
| run: | | |
| git clone --recurse-submodules https://github.com/STORM-IRIT/Radium-Engine.git --single-branch ${{ env.src_prefix }}/Radium-Engine | |
| radium_sha=`git -C ${{ env.src_prefix }}/Radium-Engine rev-parse --short HEAD` | |
| echo "radium_sha=$radium_sha" >> $GITHUB_OUTPUT | |
| - name: Cache radium install | |
| id: cache-radium-install | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ steps.paths.outputs.external_install_dir }} | |
| ${{ steps.paths.outputs.radium_install_dir }} | |
| key: ${{ matrix.config.name }}-radium-v1-${{ steps.sha.outputs.radium_sha }} | |
| - name: Cache radium build | |
| id: cache-radium-build | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ steps.paths.outputs.external_build_dir }} | |
| ${{ steps.paths.outputs.radium_build_dir }} | |
| key: ${{ matrix.config.name }}-radium-build-v1 | |
| - name: Configure and build radium | |
| if: steps.cache-radium-install.outputs.cache-hit != 'true' | |
| run: | | |
| "${{ env.src_prefix }}/Radium-Engine/scripts/build.sh" \ | |
| -B ${{ env.build_prefix }} \ | |
| -G Ninja --cxx ${{ matrix.config.cxx }} --cc ${{ matrix.config.cc }} \ | |
| -c ${{ matrix.build-type }} --enable-testing OFF \ | |
| --install-external "${{ steps.paths.outputs.external_install_dir }}" \ | |
| --install-radium "${{ steps.paths.outputs.radium_install_dir }}" | |
| - name: Clone Radium Apps | |
| uses: actions/checkout@master | |
| with: | |
| path: src/Radium-Apps | |
| - name: Configure Radium Apps | |
| run: | | |
| cmake -S "${{ env.src_prefix }}/Radium-Apps" -B "${{ env.build_prefix }}/Radium-Apps" -GNinja \ | |
| -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} \ | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \ | |
| -DCMAKE_INSTALL_PREFIX=${{ env.install_prefix }}/Radium-Apps \ | |
| -DRadium_DIR="${{ github.workspace }}/${{ steps.paths.outputs.radium_install_dir }}/lib/cmake/Radium" | |
| - name: Build Radium Apps | |
| run: | | |
| cmake --build "${{ env.build_prefix }}/Radium-Apps" --parallel --config ${{ matrix.build-type }} --target install |