-
Notifications
You must be signed in to change notification settings - Fork 7
97 lines (83 loc) · 2.37 KB
/
build.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: CI
on:
pull_request:
push:
branches:
- master
env:
RUSTFLAGS: -Dwarnings
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
rust: stable
other: x86_64-pc-windows-msvc
platform: x64
- os: windows-latest
rust: nightly
other: i686-pc-windows-msvc
platform: x86
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
7.0.0
8.x
- name: Setup Visual Studio
run: |
Start-Process -Wait "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vs_installer.exe" -ArgumentList {`
modify `
--quiet `
--installPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" `
--add `
Microsoft.NetCore.Component.Runtime.6.0 `
Microsoft.NetCore.Component.Runtime.8.0 `
Microsoft.NetCore.Component.SDK `
Microsoft.VisualStudio.Component.VC.Tools.ARM64 `
Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
Microsoft.VisualStudio.Component.Windows11SDK.22000 `
}
- name: Build metadata
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
dotnet build .metadata
- name: Update toolchain
run: rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
- name: Add toolchain target
run: rustup target add ${{ matrix.other }}
- name: Build (${{ matrix.os }})
run: cargo test --all --target ${{ matrix.other }}
cargo_fmt:
name: Check cargo formatting
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run cargo fmt
run: cargo fmt --all -- --check
cargo_clippy:
name: Check cargo clippy
runs-on: windows-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run cargo clippy
run: cargo clippy --all -- -D warnings
cargo_doc:
name: Check cargo docs
runs-on: windows-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run cargo doc
run: cargo doc --no-deps --workspace