-
Notifications
You must be signed in to change notification settings - Fork 14
163 lines (122 loc) · 4.6 KB
/
rust.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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
on:
pull_request:
merge_group:
push:
branches:
- main
tags:
- "*"
name: Continuous integration
# The check, clippy-lint, and test-stable-* jobs should typically be direct copies from
# https://github.com/googlefonts/fontations/blob/main/.github/workflows/rust.yml.
# other than the list of crates for cargo check no std
jobs:
check:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: rustup component add rustfmt
run: rustup component add rustfmt
- name: rustfmt check
run: cargo fmt --all -- --check
- name: cargo doc
run: cargo doc --all-features --document-private-items --no-deps
- name: check no println! or eprintln! statements
run: resources/scripts/check_no_println.sh
clippy-lint:
name: Clippy lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: cargo clippy --all-features
run: cargo clippy --all-features --all-targets -- -D warnings
- name: cargo clippy --no-default-features
run: cargo clippy --all-targets --no-default-features -- -D warnings
# test all packages individually to ensure deterministic resolution
# of dependencies for each package
# Try to group our tests into sets of crates that take roughly equal time to run
# so we get concurrent execution on multiple runners
test-stable-fontbe:
name: fontbe tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: cargo test fontbe
run: cargo test -p fontbe --all-targets --all-features
test-stable-fontc:
name: fontc tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: cargo test fontc
run: cargo test -p fontc --all-targets --all-features
test-stable-misc-quick:
name: tests other than fontbe,fontc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: cargo test fontdrasil
run: cargo test -p fontdrasil --all-targets --all-features
- name: cargo test fontir
run: cargo test -p fontir --all-targets --all-features
- name: cargo test glyphs-reader
run: cargo test -p glyphs-reader --all-targets --all-features
- name: cargo test glyphs2fontir
run: cargo test -p glyphs2fontir --all-targets --all-features
- name: cargo test ufo2fontir
run: cargo test -p ufo2fontir --all-targets --all-features
check-no-std:
name: cargo check no std
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: cargo check fontdrasil
run: cargo check --manifest-path=fontdrasil/Cargo.toml --no-default-features
- name: cargo check fontir
run: cargo check --manifest-path=fontir/Cargo.toml --no-default-features
- name: cargo check ufo2fontir
run: cargo check --manifest-path=ufo2fontir/Cargo.toml --no-default-features
- name: cargo check glyphs2fontir
run: cargo check --manifest-path=glyphs2fontir/Cargo.toml --no-default-features
- name: cargo check fontbe
run: cargo check --manifest-path=fontbe/Cargo.toml --no-default-features
- name: cargo check fontc
run: cargo check --manifest-path=fontc/Cargo.toml --no-default-features
check-ots:
name: resources/scripts/ots_test.sh
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run resources/scripts/ots_test.sh
run: resources/scripts/ots_test.sh
test-fea-rs:
name: cargo test fea-rs
runs-on: ubuntu-latest
steps:
- name: install stable toolchain
uses: dtolnay/rust-toolchain@stable
- uses: actions/checkout@v3
- uses: getsentry/[email protected]
id: venv
with:
python-version: 3.10.7
requirement-files: resources/scripts/fea_ci_requirements.txt
- run: pip install -r resources/scripts/fea_ci_requirements.txt
if: steps.venv.outputs.cache-hit != 'true'
- name: cargo test fea-rs
run: cargo test -p fea-rs