forked from serenity-rs/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-template-win.yml
34 lines (33 loc) · 1.04 KB
/
azure-template-win.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
parameters:
name: ''
vmImage: ''
toolchain: 'stable'
features: 'all'
jobs:
- job: ${{ parameters.name }}
pool:
vmImage: ${{ parameters.vmImage }}
variables:
tc: ${{ parameters.toolchain }}
features: ${{ parameters.features }}
steps: # TODO: Add installing of dependencies in the future
- powershell: |
Invoke-WebRequest -Uri "https://win.rustup.rs" -OutFile "rustup-init.exe"
&".\rustup-init.exe" --default-toolchain $(tc) -y
displayName: 'Install rust'
- powershell: |
If ("$(features)" -eq "all") {
&"$env:USERPROFILE\.cargo\bin\cargo" build --all-features
}
Else {
&"$env:USERPROFILE\.cargo\bin\cargo" build --no-default-features --features "$(features)"
}
displayName: 'Build Serenity'
- powershell: |
If ("$(features)" -eq "all") {
&"$env:USERPROFILE\.cargo\bin\cargo" test --all-features
}
Else {
&"$env:USERPROFILE\.cargo\bin\cargo" test --no-default-features --features "$(features)"
}
displayName: 'Test Serenity'