Skip to content

fix compilation according to radium, and update cmake version #51

fix compilation according to radium, and update cmake version

fix compilation according to radium, and update cmake version #51

name: Compile Radium Apps
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: "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" }
steps:
- uses: seanmiddleditch/gha-setup-ninja@master
- 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.9
version: 6.2.0
- name: Prepare directories
run: |
mkdir -p install/
mkdir -p src/
mkdir -p src/Radium-Apps
mkdir -p build/Radium-Engine
mkdir -p build/Radium-Apps
mkdir -p external/install/
mkdir -p external/build/
- name: Clone Radium
run: |
cd src && git clone --recurse-submodules https://github.com/STORM-IRIT/Radium-Engine.git --single-branch && cd ..
- name: Cache externals
id: cache-external
uses: actions/cache@v4
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 -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/
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/ -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
- name: Build Radium
run: |
cd build/Radium-Engine
cmake --build . --parallel --config Release --target install
- name: Clone Radium Apps
uses: actions/checkout@master
with:
path: src/Radium-Apps
- name: Configure Radium Apps
run: |
cd build/Radium-Apps
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
- name: Build Radium Apps
run: |
cd build/Radium-Apps
cmake --build . --parallel --config Release --target install