mirror of
https://github.com/hedge-dev/XenonRecomp.git
synced 2025-10-30 07:11:38 +00:00
55 lines
1.3 KiB
YAML
55 lines
1.3 KiB
YAML
name: CMake with Clang and Ninja
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
build_type: [Debug]
|
|
include:
|
|
- os: windows-latest
|
|
c_compiler: clang-cl
|
|
cpp_compiler: clang-cl
|
|
- os: ubuntu-latest
|
|
c_compiler: clang
|
|
cpp_compiler: clang++
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Ninja (Linux)
|
|
if: runner.os == 'Linux'
|
|
run: sudo apt-get update && sudo apt-get install -y ninja-build
|
|
shell: bash
|
|
|
|
- name: Install Ninja (Windows)
|
|
if: runner.os == 'Windows'
|
|
run: choco install ninja
|
|
shell: powershell
|
|
|
|
- name: Configure CMake
|
|
run: >
|
|
cmake -B ${{ github.workspace }}/build
|
|
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
|
|
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
|
|
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
|
-G Ninja
|
|
-S ${{ github.workspace }}
|
|
shell: bash
|
|
|
|
- name: Build
|
|
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.build_type }}
|
|
shell: bash
|
|
|
|
- name: Test
|
|
working-directory: ${{ github.workspace }}/build
|
|
run: ctest --build-config ${{ matrix.build_type }}
|
|
shell: bash
|