about summary refs log tree commit diff
path: root/src/ci/scripts/install-ninja.sh
blob: 7ac19173923cf0a91d251166d2d77b186fbd05d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
# Note that this is originally from the github releases patch of Ninja

set -euo pipefail
IFS=$'\n\t'

source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"

if isWindows; then
    mkdir ninja
    curl -o ninja.zip "${MIRRORS_BASE}/2024-03-28-v1.11.1-ninja-win.zip"
    7z x -oninja ninja.zip
    rm ninja.zip
    ciCommandSetEnv "RUST_CONFIGURE_ARGS" "${RUST_CONFIGURE_ARGS} --enable-ninja"
    ciCommandAddPath "$(cygpath -m "$(pwd)/ninja")"
elif isMacOS; then
    brew install ninja
fi