-
-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: define Azure Pipelines configuration
Inspired by mozilla/lmdb-rs#16. Surprisingly, I was able to get this working on the first attempt. This is the easiest cross-platform CI I have ever set up for a project. I'm in awe.
- Loading branch information
Showing
4 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
jobs: | ||
- job: ${{ parameters.name }} | ||
pool: | ||
vmImage: ${{ parameters.vmImage }} | ||
strategy: | ||
matrix: | ||
stable: | ||
rustup_toolchain: stable | ||
beta: | ||
rustup_toolchain: beta | ||
nightly: | ||
rustup_toolchain: nightly | ||
|
||
steps: | ||
- ${{ if ne(parameters.name, 'Windows') }}: | ||
- script: | | ||
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN | ||
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin" | ||
displayName: Install Rust | ||
- ${{ if eq(parameters.name, 'Windows') }}: | ||
- script: | | ||
curl -sSf -o rustup-init.exe https://win.rustup.rs | ||
rustup-init.exe -y --default-toolchain %RUSTUP_TOOLCHAIN% | ||
set PATH=%PATH%;%USERPROFILE%\.cargo\bin | ||
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin" | ||
displayName: Install Rust (Windows) | ||
- script: | | ||
rustc -Vv | ||
cargo -V | ||
displayName: Query rust and cargo versions | ||
- script: cargo build -p pyoxidizer | ||
displayName: Build | ||
|
||
- ${{ if ne(parameters.name, 'Windows') }}: | ||
- script: | | ||
if [ "$RUSTUP_TOOLCHAIN" = 'nightly' ] | ||
then cargo test -p pyoxidizer | ||
fi | ||
displayName: Test | ||
- ${{ if eq(parameters.name, 'Windows') }}: | ||
- script: if "%RUSTUP_TOOLCHAIN%" == "nightly" cargo test -p pyoxidizer | ||
displayName: Test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
jobs: | ||
- template: azure-pipelines-template.yml | ||
parameters: | ||
name: Linux | ||
vmImage: ubuntu-16.04 | ||
|
||
- template: azure-pipelines-template.yml | ||
parameters: | ||
name: macOS | ||
vmImage: macOS-10.14 | ||
|
||
- template: azure-pipelines-template.yml | ||
parameters: | ||
name: Windows | ||
vmImage: vs2017-win2016 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters