Skip to content

Commit

Permalink
Symmetry: Bundle custom ninja v1.11.0 version
Browse files Browse the repository at this point in the history
Including ninja-build/ninja#2019 for adaptive
scheduling.
  • Loading branch information
kinke committed Mar 13, 2023
1 parent c916d2a commit 1b03d64
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/actions/7-package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,43 @@ runs:
../installed/bin/reggae --version -b ninja
fi
# Symmetry: bundle ninja too
- name: Clone ninja
shell: bash
run: |
set -eux
cd ..
git clone --recursive https://github.com/symmetryinvestments/ninja.git
cd ninja
git checkout "$(cat ../ldc/packaging/ninja_version)"
- name: Build & copy ninja (Posix)
if: runner.os != 'Windows' && inputs.os != 'android' # compile errors on Android
shell: bash
run: |
set -eux
cd ../ninja
extraFlags="${CROSS_CMAKE_FLAGS:-}"
if [[ '${{ runner.os }}' == Linux && '${{ inputs.os }}' == '' ]]; then
extraFlags+=" -DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++"
fi
cmake -G Ninja -Bbuild -DCMAKE_BUILD_TYPE=Release $extraFlags
cmake --build build
cp build/ninja ../installed/bin/
if [[ '${{ inputs.cross_target_triple }}' == '' ]]; then
../installed/bin/ninja --version
fi
- name: Build & copy ninja (Windows) # needs MSVC env
if: runner.os == 'Windows'
shell: cmd
run: |
call "%LDC_VSDIR%\Common7\Tools\VsDevCmd.bat" -arch=${{ inputs.arch }} || exit /b
echo on
cd ..\ninja || exit /b
cmake -G Ninja -Bbuild -DCMAKE_BUILD_TYPE=Release || exit /b
cmake --build build || exit /b
copy build\ninja.exe ..\installed\bin\ || exit /b
..\installed\bin\ninja --version || exit /b
- name: 'Symmetry: Add default switch `-link-internally` to Windows ldc2.conf'
if: runner.os == 'Windows'
shell: pwsh
Expand Down
1 change: 1 addition & 0 deletions packaging/ninja_version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f6a0707eeb4167b8734b55b412bb3991fa118319

0 comments on commit 1b03d64

Please sign in to comment.