Skip to content

Commit f2b4aed

Browse files
committed
[#1334] make CI Windows build use ninja
1 parent f473772 commit f2b4aed

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.github/actions/build/action.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ runs:
4242
pip install -r requirements.txt -r requirements_dev.txt
4343
fi
4444
45+
- name: Install Ninja
46+
if: ${{ runner.os == 'Windows' }}
47+
shell: bash
48+
run: pip install ninja
49+
4550
- name: Setup sccache
4651
uses: mozilla/sccache-action@v0.0.9
4752

@@ -51,6 +56,9 @@ runs:
5156
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
5257
echo "CMAKE_C_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV
5358
echo "CMAKE_CXX_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV
59+
if [[ "${{ runner.os }}" == 'Windows' ]]; then
60+
echo "CMAKE_BUILD_PARALLEL_LEVEL=$(python -c 'import os; print(os.cpu_count() or 1)')" >> $GITHUB_ENV
61+
fi
5462
5563
- name: Cache Conan
5664
uses: actions/cache@v4
@@ -72,10 +80,6 @@ runs:
7280
printf "tools.system.package_manager:mode=install\n" >> "$prof_path"
7381
grep -q '^tools.system.package_manager:sudo=True$' "$prof_path" || \
7482
printf "tools.system.package_manager:sudo=True\n" >> "$prof_path"
75-
if [[ "${{ runner.os }}" == 'Windows' ]]; then
76-
grep -q '^tools.microsoft.msbuild:max_cpu_count=0$' "$prof_path" || \
77-
printf "tools.microsoft.msbuild:max_cpu_count=0\n" >> "$prof_path"
78-
fi
7983
8084
- name: Build Basilisk
8185
shell: bash

.github/workflows/pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
- uses: ./.github/actions/build
5151
with:
5252
python-version: 3.14
53-
conan-args: --opNav True --mujoco True --mujocoReplay True
53+
conan-args: --opNav True --mujoco True --mujocoReplay True --generator Ninja
5454
- name: Pytest
5555
shell: pwsh
5656
working-directory: src

0 commit comments

Comments
 (0)