Work in progress #509
This file contains 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: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- name: macOS | |
os: macos-latest | |
- name: Ubuntu | |
os: ubuntu-latest | |
- name: WebAssembly | |
os: ubuntu-latest | |
- name: Windows | |
os: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cache Dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.conan2/p | |
C:/Users/runneradmin/.conan2/p | |
key: ${{ matrix.config.name }}-${{ hashFiles('**/conanfile.txt') }} | |
restore-keys: | | |
${{ matrix.config.name }}-${{ hashFiles('**/conanfile.txt') }} | |
${{ matrix.config.name }}- | |
- name: Prepare Build Directory | |
run: mkdir build | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install Conan | |
run: pip install conan | |
- name: Detect Conan Profile | |
run: conan profile detect --force | |
- name: Detect WebAssembly Conan Profile | |
if: matrix.config.name == 'WebAssembly' | |
run: | | |
cat > ~/.conan2/profiles/webassembly <<EOF | |
include(default) | |
[settings] | |
arch=wasm | |
os=Emscripten | |
[tool_requires] | |
*: emsdk/3.1.44 | |
EOF | |
- name: Install Windows Or macOS Dependencies | |
if: matrix.config.name == 'Windows' || matrix.config.name == 'macOS' | |
run: conan install . --output-folder=build --build=missing --settings compiler.cppstd=20 --settings build_type=Release | |
- name: Install Ubuntu Dependencies | |
if: matrix.config.name == 'Ubuntu' | |
run: conan install . --output-folder=build --build=missing --settings compiler.cppstd=20 --settings build_type=Release --conf "tools.system.package_manager:mode=install" --conf "tools.system.package_manager:sudo=True" | |
- name: Install WebAssembly Dependencies | |
if: matrix.config.name == 'WebAssembly' | |
run: conan install . --output-folder=build --build=missing --profile=webassembly --settings compiler.cppstd=20 --settings build_type=Release | |
- name: Configure | |
run: cmake .. -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_BUILD_TYPE=Release | |
working-directory: build | |
- name: Build | |
run: cmake --build . --parallel 4 --config Release --verbose | |
working-directory: build |