mirror of
https://github.com/hedge-dev/XenonRecomp.git
synced 2025-04-22 16:51:31 +00:00
Update cmake-multi-platform.yml
This commit is contained in:
parent
1d7852d709
commit
73467700c9
39
.github/workflows/cmake-multi-platform.yml
vendored
39
.github/workflows/cmake-multi-platform.yml
vendored
@ -1,21 +1,16 @@
|
||||
name: CMake on multiple platforms
|
||||
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: [Release]
|
||||
c_compiler: [clang, clang-cl]
|
||||
build_type: [Release, Debug]
|
||||
include:
|
||||
- os: windows-latest
|
||||
c_compiler: clang-cl
|
||||
@ -23,43 +18,35 @@ jobs:
|
||||
- os: ubuntu-latest
|
||||
c_compiler: clang
|
||||
cpp_compiler: clang++
|
||||
exclude:
|
||||
- os: ubuntu-latest
|
||||
c_compiler: clang-cl
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive # Ensure submodules are cloned
|
||||
|
||||
- name: Set up Clang-Cl on Windows
|
||||
if: runner.os == 'Windows'
|
||||
shell: pwsh
|
||||
run: |
|
||||
echo "Setting up Clang-Cl..."
|
||||
echo "CC=clang-cl" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "CXX=clang-cl" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "Using Clang Version:"
|
||||
clang-cl --version
|
||||
- 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 on Windows
|
||||
- name: Install Ninja (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
choco install ninja --no-progress
|
||||
shell: pwsh
|
||||
run: choco install ninja
|
||||
shell: powershell
|
||||
|
||||
- name: Configure CMake
|
||||
run: >
|
||||
cmake -B ${{ github.workspace }}/build
|
||||
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
|
||||
-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
|
||||
|
Loading…
x
Reference in New Issue
Block a user