mirror of
https://github.com/tower-rs/tower.git
synced 2025-10-02 23:34:59 +00:00
ci: cd
into crate instead of -p $crate
(#176)
Cargo is buggy when specifying the crate to run a command against.
This commit is contained in:
parent
0a234af4ba
commit
749e46b3f5
@ -1,26 +1,28 @@
|
|||||||
steps:
|
steps:
|
||||||
- ${{ if not(startsWith(parameters.platform, 'Windows')) }}:
|
# Linux and macOS.
|
||||||
# Linux and macOS.
|
- script: |
|
||||||
- script: |
|
set -e
|
||||||
set -e
|
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
|
||||||
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
|
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
|
||||||
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
|
env:
|
||||||
env:
|
RUSTUP_TOOLCHAIN: ${{parameters.rust_version}}
|
||||||
RUSTUP_TOOLCHAIN: ${{parameters.rust_version}}
|
displayName: "Install rust (*nix)"
|
||||||
displayName: Install rust
|
condition: not(eq(variables['Agent.OS'], 'Windows_NT'))
|
||||||
- ${{ if startsWith(parameters.platform, 'Windows') }}:
|
|
||||||
# Windows.
|
# Windows.
|
||||||
- script: |
|
- script: |
|
||||||
echo "windows"
|
echo "windows"
|
||||||
curl -sSf -o rustup-init.exe https://win.rustup.rs
|
curl -sSf -o rustup-init.exe https://win.rustup.rs
|
||||||
rustup-init.exe -y --default-toolchain %RUSTUP_TOOLCHAIN%
|
rustup-init.exe -y --default-toolchain %RUSTUP_TOOLCHAIN%
|
||||||
set PATH=%PATH%;%USERPROFILE%\.cargo\bin
|
set PATH=%PATH%;%USERPROFILE%\.cargo\bin
|
||||||
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin"
|
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin"
|
||||||
env:
|
env:
|
||||||
RUSTUP_TOOLCHAIN: ${{parameters.rust_version}}
|
RUSTUP_TOOLCHAIN: ${{parameters.rust_version}}
|
||||||
displayName: Install rust (windows)
|
displayName: Install rust (windows)
|
||||||
|
condition: eq(variables['Agent.OS'], 'Windows_NT')
|
||||||
|
|
||||||
# All platforms.
|
# All platforms.
|
||||||
- bash: |
|
- script: |
|
||||||
rustc -Vv
|
rustc -Vv
|
||||||
cargo -V
|
cargo -V
|
||||||
displayName: Query rust and cargo versions
|
displayName: Query rust and cargo versions
|
||||||
|
@ -7,9 +7,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- template: azure-install-rust.yml
|
- template: azure-install-rust.yml
|
||||||
parameters:
|
parameters:
|
||||||
platform: Linux
|
rust_version: stable
|
||||||
# Pin the version of Rust in case rustfmt changes.
|
|
||||||
rust_version: 1.32.0
|
|
||||||
- bash: |
|
- bash: |
|
||||||
rustup component add rustfmt
|
rustup component add rustfmt
|
||||||
displayName: Install rustfmt
|
displayName: Install rustfmt
|
||||||
|
@ -9,9 +9,9 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- template: azure-install-rust.yml
|
- template: azure-install-rust.yml
|
||||||
parameters:
|
parameters:
|
||||||
platform: ${{parameters.name}}
|
|
||||||
rust_version: stable
|
rust_version: stable
|
||||||
|
|
||||||
- ${{ each crate in parameters.crates }}:
|
- ${{ each crate in parameters.crates }}:
|
||||||
- script: cargo test -p tower-${{ crate }}
|
- script: cargo test
|
||||||
displayName: cargo test -p tower-${{ crate }}
|
displayName: cargo test -p tower-${{ crate }}
|
||||||
|
workingDirectory: $(Build.SourcesDirectory)/tower-${{ crate }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user