Skip to content

Commit

Permalink
Symmetry: Bundle custom ninja v1.11.1 version
Browse files Browse the repository at this point in the history
  • Loading branch information
kinke committed Apr 14, 2024
1 parent 85459b2 commit c7e16ee
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 @@ -83,6 +83,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 @@
v1.11.1-sym2

0 comments on commit c7e16ee

Please sign in to comment.