ci: extract installing ninja into a script
This commit is contained in:
parent
e55059a5e6
commit
bc9a0dc1b3
3 changed files with 21 additions and 14 deletions
|
|
@ -1,13 +0,0 @@
|
|||
steps:
|
||||
|
||||
# Note that this is originally from the github releases patch of Ninja
|
||||
- bash: |
|
||||
set -e
|
||||
mkdir ninja
|
||||
curl -o ninja.zip https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/2017-03-15-ninja-win.zip
|
||||
7z x -oninja ninja.zip
|
||||
rm ninja.zip
|
||||
echo "##vso[task.setvariable variable=RUST_CONFIGURE_ARGS]$RUST_CONFIGURE_ARGS --enable-ninja"
|
||||
echo "##vso[task.prependpath]`pwd`/ninja"
|
||||
displayName: Download and install ninja
|
||||
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
|
||||
|
|
@ -105,7 +105,11 @@ steps:
|
|||
displayName: Install MinGW
|
||||
condition: and(succeeded(), not(variables.SKIP_JOB))
|
||||
|
||||
- template: install-windows-build-deps.yml
|
||||
- bash: src/ci/scripts/install-ninja.sh
|
||||
env:
|
||||
AGENT_OS: $(Agent.OS)
|
||||
displayName: Install ninja
|
||||
condition: and(succeeded(), not(variables.SKIP_JOB))
|
||||
|
||||
# Looks like docker containers have IPv6 disabled by default, so let's turn it
|
||||
# on since libstd tests require it
|
||||
|
|
|
|||
16
src/ci/scripts/install-ninja.sh
Executable file
16
src/ci/scripts/install-ninja.sh
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
#!/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 https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/2017-03-15-ninja-win.zip
|
||||
7z x -oninja ninja.zip
|
||||
rm ninja.zip
|
||||
ciCommandSetEnv "RUST_CONFIGURE_ARGS" "${RUST_CONFIGURE_ARGS} --enable-ninja"
|
||||
ciCommandAddPath "$(pwd)/ninja"
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue