Fix CI (#288)
This commit is contained in:
parent
7bb62ff259
commit
e6923defb1
3 changed files with 38 additions and 8 deletions
14
.travis.yml
14
.travis.yml
|
@ -17,8 +17,20 @@ env:
|
|||
- RUSTFLAGS="-C link-dead-code"
|
||||
- CARGO_MAKE_RUN_CODECOV=true
|
||||
|
||||
before_script:
|
||||
- |
|
||||
if [ "$TRAVIS_OS_NAME" = 'windows' ]; then
|
||||
powershell -executionpolicy bypass -file _build/cargo-make.ps1 -version "0.15.3" -target "x86_64-pc-windows-msvc"
|
||||
fi
|
||||
- |
|
||||
if [ "$TRAVIS_OS_NAME" = 'linux' ]; then
|
||||
_build/cargo-make.sh "0.15.3" "x86_64-unknown-linux-musl"
|
||||
fi
|
||||
- |
|
||||
if [ "$TRAVIS_OS_NAME" = 'osx' ]; then
|
||||
_build/cargo-make.sh "0.15.3" "x86_64-apple-darwin"
|
||||
fi
|
||||
script:
|
||||
- cargo install --debug cargo-make -f
|
||||
- cargo make workspace-ci-flow --no-workspace
|
||||
|
||||
before_deploy:
|
||||
|
|
|
@ -36,19 +36,16 @@ jobs:
|
|||
displayName: Query rust and cargo versions
|
||||
- ${{ if eq(parameters.name, 'Linux') }}:
|
||||
# Linux.
|
||||
- script: _build/cargo-make.sh "0.15.1" "x86_64-unknown-linux-musl"
|
||||
- script: _build/cargo-make.sh "0.15.3" "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"
|
||||
- script: _build/cargo-make.sh "0.15.3" "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: powershell -executionpolicy bypass -file _build/cargo-make.ps1 -version "0.15.3" -target "x86_64-pc-windows-msvc"
|
||||
displayName: Install cargo-make binary
|
||||
- script: cargo make workspace-ci-flow --no-workspace
|
||||
env: { CARGO_MAKE_RUN_CODECOV: true }
|
||||
displayName: Build and run tests
|
||||
|
|
21
_build/cargo-make.ps1
Normal file
21
_build/cargo-make.ps1
Normal file
|
@ -0,0 +1,21 @@
|
|||
param (
|
||||
[Parameter(Mandatory=$true)][string]$version,
|
||||
[Parameter(Mandatory=$true)][string]$target
|
||||
)
|
||||
|
||||
# Location to put cargo-make binary.
|
||||
$cargobindir = "$env:userprofile\.cargo\bin"
|
||||
|
||||
# Location to stage downloaded zip file.
|
||||
$zipfile = "$env:temp\cargo-make.zip"
|
||||
|
||||
$url = "https://github.com/sagiegurari/cargo-make/releases/download/${version}/cargo-make-v${version}-${target}.zip"
|
||||
|
||||
# Download the zip file.
|
||||
Invoke-WebRequest -Uri $url -OutFile $zipfile
|
||||
|
||||
# Extract the binary to the correct location.
|
||||
Expand-Archive -Path $zipfile -DestinationPath $cargobindir
|
||||
|
||||
# Tell azure pipelines the PATH has changed for future steps.
|
||||
Write-Host "##vso[task.setvariable variable=PATH;]%PATH%;$cargobindir"
|
Loading…
Reference in a new issue