Skip to content

Workflow

Workflow #67

Workflow file for this run

name: Compile
on:
merge_group:
pull_request:
jobs:
build:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- os: ubuntu-latest
compiler: gcc
generator: Ninja
deps_cmdline: sudo apt-get update && sudo apt-get -y install gcc cmake ninja-build libglu1-mesa-dev mesa-common-dev xorg-dev
- os: ubuntu-latest
compiler: clang
generator: Ninja
deps_cmdline: sudo apt-get update && sudo apt-get -y install clang cmake ninja-build libglu1-mesa-dev mesa-common-dev xorg-dev
- os: windows-latest
compiler: msvc
generator: Visual Studio 17 2022
- os: windows-latest
compiler: mingw
generator: MinGW Makefiles
- os: macos-latest
compiler: clang
generator: Ninja
deps_cmdline: brew install cmake ninja mesa-glu mesa xorg-server
steps:
- if: matrix.config.os == 'windows-latest' && matrix.config.compiler == 'mingw'
name: "Set Windows-MinGW-Compiler"
uses: seanmiddleditch/gha-setup-ninja@master
- name: "Checkout Repository"
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Dependencies
shell: bash
run: |
if [[ ! -z "${{ matrix.config.deps_cmdline }}" ]]; then
eval ${{ matrix.config.deps_cmdline }}
fi
- name: "Setup cmake"
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Debug -G "${{ matrix.config.generator }}"
cmake --build build
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
strategy:
matrix:
path:
- "src"
- "include"
steps:
- uses: actions/checkout@v3
- name: Run clang-format style check for C/C++/Protobuf programs.
uses: jidicula/[email protected]
with:
clang-format-version: "18"
check-path: ${{ matrix.path }}