diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index df8a3b9..0000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: rust -rust: - - stable -cache: cargo -env: - # Limit number of samples so build doesn't take forever - - SAMPLES=2 -jobs: - include: - - stage: build - script: - - cargo build --verbose --release --all --examples - - cargo test --verbose --release --all - - 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 - - stage: run all examples - script: source ./run-all-examples.sh --verbose - - script: source ./run-all-examples.sh --verbose --features render_bounding_volumes - - script: source ./run-all-examples.sh --verbose --features flat_scene - - script: source ./run-all-examples.sh --verbose --features kdtree diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..31fddfd --- /dev/null +++ b/azure-pipelines.yml @@ -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 diff --git a/run-all-examples.sh b/run-all-examples.sh index f2aa8bc..ff5add1 100755 --- a/run-all-examples.sh +++ b/run-all-examples.sh @@ -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 "=============================================" diff --git a/rust-toolchain b/rust-toolchain new file mode 100644 index 0000000..2bf5ad0 --- /dev/null +++ b/rust-toolchain @@ -0,0 +1 @@ +stable