59 lines (52 loc) · 1.45 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
name: Build
on:
pull_request:
push:
branches:
- master
env:
RUSTFLAGS: -Dwarnings
jobs:
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_doc:
name: Check cargo docs
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run cargo doc
run: cargo doc --no-deps -p windows
generation:
name: Check generation of `windows_${{ matrix.generator }}`
runs-on: windows-latest
strategy:
matrix:
generator: [bindings, api, sys, yml]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run windows_${{ matrix.generator }}
run: cargo run -p windows_${{ matrix.generator }}
- name: Compare
shell: bash
run: git diff --exit-code || (echo '::error::Generated `windows_${{ matrix.generator }}` are out-of-date. Please run `cargo run -p windows_${{ matrix.generator }}`'; exit 1)
cargo_sys:
name: Check windows-sys
runs-on: windows-latest
strategy:
matrix:
rust: [1.46.0, stable, nightly]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Update toolchain
run: rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
- name: Run cargo check
run: cargo check -p windows-sys --all-features