Use Zig musl/libc++ toolchain to build programs #67
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 Engine w/scripts | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
compiler: [ {cpp: g++-12, c: gcc-12}, {cpp: clang++-17, c: clang-17} ] | |
defaults: | |
run: | |
working-directory: ${{github.workspace}}/engine | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y ninja-build ccache cmake build-essential libglew-dev libglfw3-dev \ | |
gcc-12 g++-12 g++-12-riscv64-linux-gnu | |
git submodule update --init ${{github.workspace}}/tests/Catch2 | |
git submodule update --init --recursive ${{github.workspace}}/ext/nanogui | |
git submodule update --init --recursive ${{github.workspace}}/ext/library | |
git submodule update --init ${{github.workspace}}/ext/libriscv | |
git submodule update --init ${{github.workspace}}/programs/micro/ext | |
- name: Install newer Clang | |
run: | | |
wget https://apt.llvm.org/llvm.sh | |
chmod +x ./llvm.sh | |
sudo ./llvm.sh 17 | |
- name: Configure | |
env: | |
CC: ${{ matrix.compiler.c }} | |
CXX: ${{ matrix.compiler.cpp }} | |
run: cmake -B ${{github.workspace}}/engine/build -DCMAKE_BUILD_TYPE=Release | |
- name: Build the engine | |
run: cmake --build ${{github.workspace}}/engine/build --parallel 4 |