-
-
Notifications
You must be signed in to change notification settings - Fork 41
134 lines (95 loc) · 3.01 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: CI
on:
push:
pull_request:
schedule:
- cron: '30 5 * * *'
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macOS-latest ]
steps:
- uses: actions/checkout@v2
- name: Build
run: cargo build
- name: Build (release)
run: cargo build --release
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install xvfb
run: sudo apt-get --yes install xvfb
- name: Start X server and run tests
run: xvfb-run --auto-servernum cargo test
- name: Start X server and run tests in release mode
run: xvfb-run --auto-servernum cargo test --release
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Clippy
run: cargo clippy
fmt:
name: Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install nightly toolchain
run: rustup toolchain install nightly --component rustfmt --allow-downgrade
- name: Formatting
run: cargo +nightly fmt -- --check
doc:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Documentation
run: cargo doc --no-deps
build_wasm32:
name: Build (wasm32)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup wasm32 toolchain
run: rustup target add wasm32-unknown-unknown
- name: Build
run: cargo build --target=wasm32-unknown-unknown
- name: Build (no features)
run: cargo build --target=wasm32-unknown-unknown --no-default-features
- name: Build (no features, release)
run: cargo build --target=wasm32-unknown-unknown --no-default-features --release
- name: Clippy
run: cargo clippy --target=wasm32-unknown-unknown
- name: Install utilities
run: cargo install just wasm-bindgen-cli
- name: Build WebGL example
run: just build-example-webgl
build_features_disabled:
name: Build (features disabled)
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macOS-latest ]
steps:
- uses: actions/checkout@v2
- name: Build (no features)
run: cargo build --no-default-features
- name: Build (no features, release)
run: cargo build --no-default-features --release
test_features_disabled:
name: Test (features disabled)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install xvfb
run: sudo apt-get --yes install xvfb
- name: Start X server and run tests
run: xvfb-run --auto-servernum cargo test --no-default-features --lib --examples --tests
- name: Start X server and run tests (release)
run: xvfb-run --auto-servernum cargo test --release --no-default-features --lib --examples --tests