Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure pipelines #4

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

60 changes: 60 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# https://aka.ms/yaml

strategy:
matrix:
mac-stable:
imageName: 'macos-latest'
rustup_toolchain: stable
mac-beta:
imageName: 'macos-latest'
rustup_toolchain: beta
mac-nightly:
imageName: 'macos-latest'
rustup_toolchain: nightly

linux-stable:
imageName: 'ubuntu-latest'
rustup_toolchain: stable
linux-beta:
imageName: 'ubuntu-latest'
rustup_toolchain: beta
linux-nightly:
imageName: 'ubuntu-latest'
rustup_toolchain: nightly

pool:
vmImage: $(imageName)

steps:
# Need to remove rust-toolchain or we will always use the version specified
# there regardless of what version is installed
# Also need to set the PATH environment variable to include the rust executables
- script: |
rm rust-toolchain
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
source $HOME/.cargo/env
rustc --version --verbose
displayName: install

- script: |
rustc --version --verbose
cargo build --verbose --release --all --examples
cargo test --verbose --release --all --no-run
cargo build --verbose --release --all --examples --features render_bounding_volumes
cargo build --verbose --release --all --examples --features flat_scene
cargo build --verbose --release --all --examples --features kdtree
displayName: build

- script: |
cargo test --verbose --release --all
displayName: test

# Need to limit the number of samples so build doesn't take forever
- script: |
source ./run-all-examples.sh --verbose
source ./run-all-examples.sh --verbose --features render_bounding_volumes
source ./run-all-examples.sh --verbose --features flat_scene
source ./run-all-examples.sh --verbose --features kdtree
env: { CI: "true", SAMPLES: "2" }
displayName: run all examples
2 changes: 1 addition & 1 deletion run-all-examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
for file in $(ls examples/*.rs); do
echo "============================================="
echo
echo "Running example: $(basename ${file%.*})"
echo "Running example: $(basename ${file%.*}) with ${SAMPLES:-100} samples"
time RUST_BACKTRACE=1 cargo run --release --example "$(basename ${file%.*})" "$@"
echo
echo "============================================="
Expand Down
1 change: 1 addition & 0 deletions rust-toolchain
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
stable