Skip to content

MIR Backend

MIR Backend #785

Workflow file for this run

name: build
on:
push:
branches:
- '**'
tags-ignore:
- 'v*.*.*'
pull_request:
workflow_call:
jobs:
Build:
name: ${{ matrix.os-name }} (${{ matrix.compiler }}, ${{ matrix.config }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
config: [Release]
name: [windows-msvc, windows-clang, linux-clang, linux-gcc, macos-clang]
include:
- name: windows-msvc
os: windows-latest
os-name: windows
compiler: msvc
cxx: cl
cc: cl
- name: windows-clang
os: windows-latest
os-name: windows
compiler: clang-16
cxx: clang-cl
cc: clang-cl
- name: linux-clang
os: ubuntu-latest
os-name: linux
compiler: clang-16
cxx: clang++
cc: clang
- name: linux-gcc
os: ubuntu-latest
os-name: linux
compiler: gcc-13
cxx: g++
cc: gcc
- name: macos-clang
os: macos-14
os-name: macos
compiler: clang-16
cxx: clang++
cc: clang
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Install dependencies
if: ${{ matrix.os-name == 'linux'}}
run: |
sudo apt-get update
sudo apt-get install -y build-essential xz-utils curl libx11-dev xorg-dev libglu1-mesa-dev
- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
compiler: ${{ matrix.compiler }}
vcvarsall: ${{ matrix.os-name == 'windows' }}
cmake: true
ninja: true
- name: Cache Build
uses: actions/cache@v3
with:
path: Build
key: ${{ matrix.os-name }}-${{ matrix.compiler }}-${{ matrix.config }}-build-${{ secrets.VCACHE}}
- name: Configure
run: cmake -GNinja -S . -B Build -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_C_COMPILER=${{ matrix.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} -DRIFT_LLVM_PATH='${{ runner.temp }}/rift/llvm'
- name: Build
run: cmake --build Build --config ${{ matrix.config }}
- name: Upload binaries as artifacts
uses: actions/upload-artifact@v3
if: ${{ matrix.config == 'Release' && contains(matrix.compiler, 'clang') }} # Only clang artifacts are stored
with:
name: rift-${{ matrix.os-name }}
path: Build/Bin
- name: Run Tests
working-directory: ./Build
run: ctest --output-on-failure -j2 -C ${{ matrix.config }}