setup ninja

This commit is contained in:
2026-03-21 00:33:59 +03:00
parent 1199f53632
commit 59e820e27f
3 changed files with 24 additions and 2 deletions

17
.github/actions/setup-ninja/action.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: Setup Ninja
description: Sets up Ninja
inputs:
host:
description: 'Host platform: win, mac or linux'
required: true
runs:
using: "composite"
steps:
- name: Setup
shell: bash
run: |
curl -L https://github.com/ninja-build/ninja/releases/latest/download/ninja-${{ inputs.host }}.zip -o ninja.zip
7z x ninja.zip -o"$GITHUB_WORKSPACE/ninja"
echo "$GITHUB_WORKSPACE/ninja" >> $GITHUB_PATH

View File

@@ -30,6 +30,11 @@ jobs:
host: win host: win
target: win target: win
- name: Setup Ninja
uses: ./.github/actions/setup-ninja
with:
host: linux
- name: Download xwin - name: Download xwin
uses: robinraju/release-downloader@v1.10 uses: robinraju/release-downloader@v1.10
with: with:
@@ -93,7 +98,7 @@ jobs:
- name: Configure CMake - name: Configure CMake
working-directory: ${{github.workspace}}/build working-directory: ${{github.workspace}}/build
run: cmake ${{github.workspace}} -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ run: cmake ${{github.workspace}} -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -G Ninja
env: env:
SPLAT_DIR: ${{ github.workspace }}/.xwin-cache/splat SPLAT_DIR: ${{ github.workspace }}/.xwin-cache/splat
TOOLCHAIN: ${{ github.workspace }}/toolchain/clang-cl-msvc.cmake TOOLCHAIN: ${{ github.workspace }}/toolchain/clang-cl-msvc.cmake

View File

@@ -27,7 +27,7 @@
// #endif // #endif
#ifdef PLATFORM_DESKTOP #if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)
#include "main_glfw.h" #include "main_glfw.h"
#endif #endif