-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathazure-pipelines.yml
66 lines (63 loc) · 2.25 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
trigger:
- master
strategy:
matrix:
windows-stable:
imageName: 'vs2017-win2016'
rustup_toolchain: stable
mac-stable:
imageName: 'macos-latest'
rustup_toolchain: stable
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:
- checkout: self
submodules: true
- script: |
sudo apt-get install -y build-essential libgcrypt20-dev cmake clang flex bison
displayName: apt install dependencies
condition: eq( variables['Agent.OS'], 'Linux')
- script: |
brew install glib libgcrypt pkg-config flex bison
displayName: brew install dependencies
condition: eq( variables['Agent.OS'], 'Darwin')
- script: |
git clone https://github.com/Microsoft/vcpkg.git
.\vcpkg\bootstrap-vcpkg.bat
.\vcpkg\vcpkg.exe install glib
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: vcpkg install dependencies
- script: |
Install-Package instchoco -Version 2.10.0
choco install -y winflexbison
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: windows install dependencies
- 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
condition: ne( variables['Agent.OS'], 'Windows_NT' )
- script: |
curl -sSf -o rustup-init.exe https://win.rustup.rs
rustup-init.exe -y --default-toolchain %RUSTUP_TOOLCHAIN%
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin"
displayName: Windows install rust
condition: eq( variables['Agent.OS'], 'Windows_NT' )
- script: |
echo ##vso[task.setvariable variable=PLATFORM;]win64
echo ##vso[task.setvariable variable=WIRESHARK_BASE_DIR;]C:/wireshark-libs
displayName: Windows set environment variables
condition: eq( variables['Agent.OS'], 'Windows_NT' )
- script: cargo build --all --verbose
displayName: Cargo build
- script: cargo test --all --verbose
displayName: Cargo test