Build sources per OS clean #51
Workflow file for this run
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 sources per OS clean | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ${{matrix.host}} | |
strategy: | |
matrix: | |
target: [Linux, Windows] | |
build_type: [Debug, Release] | |
include: | |
- target: Linux | |
host: ubuntu-latest | |
- target: Windows | |
host: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: "recursive" | |
- name: Set clang as the default compiler | |
if: ${{ matrix.host == 'ubuntu-latest' }} | |
run: | | |
sudo update-alternatives --install /usr/bin/cc cc $(which clang) 100 | |
sudo update-alternatives --install /usr/bin/c++ c++ $(which clang++) 100 | |
sudo update-alternatives --set cc $(which clang) | |
sudo update-alternatives --set c++ $(which clang++) | |
- name: Install bindgen | |
run: cargo install cbindgen | |
- name: Add Rust target | |
run: rustup target add wasm32-unknown-emscripten | |
- name: Configure CMake | |
run: cmake -S build/${{matrix.target}} -B build/${{matrix.target}}/${{matrix.build_type}} | |
- name: Build project | |
run: cmake --build build/${{matrix.target}}/${{matrix.build_type}} --config ${{matrix.build_type}} -j |