Update clang-format config #13
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 | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
permissions: | |
contents: write | |
env: | |
CMAKE_GENERATOR: Ninja | |
DISPLAY: :0 | |
HOMEBREW_NO_INSTALL_CLEANUP: 1 | |
jobs: | |
build: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
env: | |
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.osx_target }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: Linux | |
os: ubuntu-24.04 | |
osx_target: "" | |
cxx_flags: "-march=x86-64-v2" | |
- name: macOS-X64 | |
os: macos-13 | |
osx_target: "10.15" | |
cxx_flags: "-march=x86-64-v2" | |
- name: macOS-ARM64 | |
os: macos-14 | |
osx_target: "11.0" | |
cxx_flags: "" | |
- name: Windows | |
os: windows-latest | |
osx_target: "" | |
cxx_flags: "-march=x86-64-v2" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
lfs: true | |
- name: Install dependencies (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt update -y | |
sudo apt install -y libasound2-dev mesa-common-dev libx11-xcb-dev xorg-dev libx11-dev libxinerama-dev libxext-dev libfreetype6-dev libglu1-mesa-dev xvfb ninja-build ccache | |
pip3 install --break-system-packages conan | |
- name: Install dependencies (macOS) | |
if: runner.os == 'macOS' | |
run: brew install conan ninja osxutils | |
- name: Install dependencies (Windows) | |
if: runner.os == 'Windows' | |
shell: bash | |
run: | | |
choco install ninja ccache | |
pip3 install --upgrade conan | |
- name: Install clang | |
if: runner.os == 'Windows' | |
uses: egor-tensin/setup-clang@v1 | |
- name: Setup conan | |
run: | | |
conan profile detect -f | |
conan remote add conan-mpusz https://mpusz.jfrog.io/artifactory/api/conan/conan-oss | |
- name: Install ccache | |
uses: hendrikmuhs/ccache-action@main | |
with: | |
key: ${{ matrix.name }}-ccache-v1 | |
- name: CMake configure | |
run: > | |
cmake | |
-B build | |
-G Ninja | |
-D CMAKE_BUILD_TYPE=Release | |
-D CMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" | |
-D CMAKE_PROJECT_TOP_LEVEL_INCLUDES=3rd_party/cmake-conan/conan_provider.cmake | |
- name: CMake build | |
run: cmake --build build --config Release | |
- name: CTest | |
run: ctest --test-dir build -C Release --output-on-failure -j 1 |