forked from serenity-rs/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-template-unix.yml
47 lines (43 loc) · 1.24 KB
/
azure-template-unix.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
parameters:
name: ''
vmImage: ''
toolchain: 'stable'
features: 'all'
jobs:
- job: ${{ parameters.name }}
pool:
vmImage: ${{ parameters.vmImage }}
variables:
tc: ${{ parameters.toolchain }}
os: ${{ parameters.vmImage }}
features: ${{ parameters.features }}
steps:
- bash: |
if [[ "$OS" == "macOS-latest" ]]; then
HOMEBREW_NO_AUTO_UPDATE=1 brew install automake autoconf libtool libsodium pkg-config
fi
if [[ "$OS" == "ubuntu-latest" ]]; then
sudo apt-get update
sudo apt-get install -y libsodium-dev libssl-dev
fi
displayName: 'Install dependencies'
- bash: |
curl -o rustup-init.sh https://sh.rustup.rs -sSf
sh rustup-init.sh --default-toolchain $(tc) -y
displayName: 'Install Rust'
- bash: |
source $HOME/.cargo/env
if [[ "$(features)" == "all" ]]; then
cargo build --all-features
else
cargo build --no-default-features --features "$(features)"
fi
displayName: 'Build Serenity'
- bash: |
source $HOME/.cargo/env
if [[ "$(features)" == "all" ]]; then
cargo test --all-features
else
cargo test --no-default-features --features "$(features)"
fi
displayName: 'Test Serenity'