Skip to content

Commit 0510c9e

Browse files
authored
Merge pull request #388 from alexcrichton/azure-pipelines
Set up CI with Azure Pipelines
2 parents 1f0cd6f + 392b0a7 commit 0510c9e

File tree

6 files changed

+128
-118
lines changed

6 files changed

+128
-118
lines changed

.travis.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
A library to compile C/C++/assembly into a Rust library/application.
44

5-
[![Build Status](https://travis-ci.com/alexcrichton/cc-rs.svg?branch=master)](https://travis-ci.com/alexcrichton/cc-rs)
6-
[![Build status](https://ci.appveyor.com/api/projects/status/onu270iw98h81nwv?svg=true)](https://ci.appveyor.com/project/alexcrichton/cc-rs)
5+
[![Build Status](https://dev.azure.com/alexcrichton/cc-rs/_apis/build/status/alexcrichton.cc-rs?branchName=master)](https://dev.azure.com/alexcrichton/cc-rs/_build/latest?definitionId=5&branchName=master)
76

87
[Documentation](https://docs.rs/cc)
98

appveyor.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

azure-pipelines.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
trigger:
2+
- master
3+
4+
jobs:
5+
- job: min
6+
displayName: Minimum Rust
7+
steps:
8+
- template: ci/azure-install-rust.yml
9+
parameters:
10+
toolchain: 1.16.0
11+
- script: cargo build
12+
13+
- job: Linux
14+
pool:
15+
vmImage: ubuntu-16.04
16+
strategy:
17+
matrix:
18+
x86_64:
19+
TARGET: x86_64-unknown-linux-gnu
20+
i686:
21+
TARGET: i686-unknown-linux-gnu
22+
x86_64-beta:
23+
TARGET: x86_64-unknown-linux-gnu
24+
TOOLCHAIN: beta
25+
x86_64-nightly:
26+
TARGET: x86_64-unknown-linux-gnu
27+
TOOLCHAIN: nightly
28+
29+
- job: macOS
30+
pool:
31+
vmImage: macos-10.13
32+
steps:
33+
- template: ci/azure-steps.yml
34+
strategy:
35+
matrix:
36+
x86_64:
37+
TARGET: x86_64-apple-darwin
38+
aarch64-ios:
39+
TARGET: aarch64-apple-ios
40+
NO_RUN: --no-run
41+
42+
- job: Windows_vs2019
43+
pool:
44+
vmImage: windows-2019
45+
steps:
46+
- template: ci/azure-steps.yml
47+
strategy:
48+
matrix:
49+
x86_64-msvc:
50+
TARGET: x86_64-pc-windows-msvc
51+
52+
- job: Windows_vs2017
53+
pool:
54+
vmImage: vs2017-win2016
55+
steps:
56+
- template: ci/azure-steps.yml
57+
strategy:
58+
matrix:
59+
x86_64-msvc:
60+
TARGET: x86_64-pc-windows-msvc
61+
i686-msvc:
62+
TARGET: i686-pc-windows-msvc
63+
x86_64-gnu:
64+
TARGET: x86_64-pc-windows-gnu
65+
i686-gnu:
66+
TARGET: i686-pc-windows-gnu
67+
68+
- job: Windows_vs2015
69+
pool:
70+
vmImage: vs2015-win2012r2
71+
steps:
72+
- template: ci/azure-steps.yml
73+
strategy:
74+
matrix:
75+
x86_64-msvc:
76+
TARGET: x86_64-pc-windows-msvc
77+
i686-msvc:
78+
TARGET: i686-pc-windows-msvc
79+
80+
- job: docs
81+
steps:
82+
- template: ci/azure-install-rust.yml
83+
- script: cargo doc --no-deps --all-features
84+
- script: curl -LsSf https://git.io/fhJ8n | rustc - && (cd target/doc && ../../rust_out)
85+
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
86+
env:
87+
GITHUB_DEPLOY_KEY: $(GITHUB_DEPLOY_KEY)

ci/azure-install-rust.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
steps:
2+
- bash: |
3+
set -e
4+
toolchain=$TOOLCHAIN
5+
if [ "$toolchain" = "" ]; then
6+
toolchain=stable
7+
fi
8+
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $toolchain
9+
echo "##vso[task.prependpath]$HOME/.cargo/bin"
10+
displayName: Install rust (unix)
11+
condition: ne( variables['Agent.OS'], 'Windows_NT' )
12+
13+
- script: |
14+
curl -sSf -o rustup-init.exe https://win.rustup.rs
15+
rustup-init.exe -y --default-toolchain stable-%TARGET%
16+
echo ##vso[task.prependpath]%USERPROFILE%\.cargo\bin
17+
displayName: Install rust (windows)
18+
condition: eq( variables['Agent.OS'], 'Windows_NT' )
19+
20+
- script: |
21+
rustc -Vv
22+
cargo -V
23+
displayName: Query rust and cargo versions

ci/azure-steps.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
steps:
2+
- template: azure-install-rust.yml
3+
- bash: rustup target add $TARGET
4+
displayName: Install Rust target
5+
6+
- script: cargo build
7+
displayName: "Normal build"
8+
- bash: cargo test $NO_RUN -- --test-threads 1
9+
displayName: "Crate tests"
10+
- bash: cargo test $NO_RUN --features parallel -- --test-threads 1
11+
displayName: "Crate tests (parallel)"
12+
- bash: cargo test $NO_RUN --manifest-path cc-test/Cargo.toml --target $TARGET
13+
displayName: "cc-test tests"
14+
- bash: cargo test $NO_RUN --manifest-path cc-test/Cargo.toml --target $TARGET --features parallel
15+
displayName: "cc-test tests (parallel)"
16+
- bash: cargo test $NO_RUN --manifest-path cc-test/Cargo.toml --target $TARGET --release
17+
displayName: "cc-test tests (release)"

0 commit comments

Comments
 (0)