Use pre-compiled cargo-make (#281)
This commit is contained in:
parent
e2212a539a
commit
fe2bf611bb
2 changed files with 33 additions and 2 deletions
|
@ -34,8 +34,21 @@ jobs:
|
||||||
rustc -Vv
|
rustc -Vv
|
||||||
cargo -V
|
cargo -V
|
||||||
displayName: Query rust and cargo versions
|
displayName: Query rust and cargo versions
|
||||||
- script: cargo install -f cargo-make
|
- ${{ if eq(parameters.name, 'Linux') }}:
|
||||||
displayName: Install cargo-make
|
# Linux.
|
||||||
|
- script: _build/cargo-make.sh "0.15.1" "x86_64-unknown-linux-musl"
|
||||||
|
displayName: Install cargo-make binary
|
||||||
|
- ${{ if eq(parameters.name, 'macOS') }}:
|
||||||
|
# Mac.
|
||||||
|
- script: _build/cargo-make.sh "0.15.1" "x86_64-apple-darwin"
|
||||||
|
displayName: Install cargo-make binary
|
||||||
|
- ${{ if eq(parameters.name, 'Windows') }}:
|
||||||
|
# Windows.
|
||||||
|
- script: |
|
||||||
|
# TODO: There is no build of cargo-make for windows yet.
|
||||||
|
cargo install -f cargo-make --vers 0.15.1
|
||||||
|
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin"
|
||||||
|
displayName: Install cargo-make
|
||||||
- script: cargo make workspace-ci-flow --no-workspace
|
- script: cargo make workspace-ci-flow --no-workspace
|
||||||
env: { CARGO_MAKE_RUN_CODECOV: true }
|
env: { CARGO_MAKE_RUN_CODECOV: true }
|
||||||
displayName: Build and run tests
|
displayName: Build and run tests
|
||||||
|
|
18
_build/cargo-make.sh
Executable file
18
_build/cargo-make.sh
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -z ${1+x} ];
|
||||||
|
then
|
||||||
|
echo "Missing version as first argument";
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z ${2+x} ];
|
||||||
|
then
|
||||||
|
echo "Missing target as second argument";
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl https://github.com/sagiegurari/cargo-make/releases/download/${1}/cargo-make-v${1}-${2}.zip -sSfL -o /tmp/cargo-make.zip;
|
||||||
|
unzip /tmp/cargo-make.zip;
|
||||||
|
mv cargo-make-*/* $HOME/.cargo/bin;
|
||||||
|
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
|
Loading…
Reference in a new issue