-
Notifications
You must be signed in to change notification settings - Fork 2
194 lines (165 loc) · 6.14 KB
/
large-scope.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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# Test pre-releases on a larger scope (platforms & versions) to avoid bad surprises.
name: Large scope
on:
push:
branches:
- staging
jobs:
test_linux:
name: Test on Linux
runs-on: ubuntu-latest
strategy:
matrix:
# rust: [1.74.0, beta, nightly]
rust: [1.74.0, beta]
steps:
- name: Rust install
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
- name: Checkout
uses: actions/checkout@v4
- name: Cache crates from crates.io
uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: '${{ runner.os }}-cargo-${{ matrix.rust }}-hash-${{ hashFiles(''**/Cargo.lock'') }}'
- name: Lint
run: |
cargo fmt --all -- --check
cargo clippy -- -D warnings
# - name: Quality - convco check
# run: |
# git show-ref
# curl -sSfLO https://github.com/convco/convco/releases/latest/download/convco-ubuntu.zip
# unzip convco-ubuntu.zip
# chmod +x convco
# ./convco --version
# ./convco check -c .convco
# rm convco
# - name: Quality - cargo deny check
# run: |
# curl -sSfL https://github.com/EmbarkStudios/cargo-deny/releases/download/0.12.2/cargo-deny-0.12.2-x86_64-unknown-linux-musl.tar.gz | tar zx --no-anchored cargo-deny --strip-components=1
# chmod +x cargo-deny
# mv cargo-deny ~/.cargo/bin/
# cargo deny check
# - name: Quality - cargo audit check
# run: |
# curl -sSfL https://github.com/rustsec/rustsec/releases/download/cargo-audit%2Fv0.17.3/cargo-audit-x86_64-unknown-linux-musl-v0.17.3.tgz | tar zx --no-anchored cargo-audit --strip-components=1
# chmod +x cargo-audit
# mv cargo-audit ~/.cargo/bin/
# rm -rf ~/.cargo/advisory-db/
# cargo audit --ignore RUSTSEC-2020-0071 # time-rs, but not used by chrono, see https://github.com/chronotope/chrono/issues/602
# - name: Quality - cargo outdated
# timeout-minutes: 20
# run: |
# cargo install --locked cargo-outdated || true
# rm -rf ~/.cargo/advisory-db
# cargo outdated --exit-code 1
# - name: Quality - cargo udeps (needs nightly)
# run: |
# cargo install --locked cargo-udeps || true
# cargo udeps
# - name: Quality - cargo pants
# run: |
# cargo install --locked cargo-pants || true
# cargo pants
- name: Build (dev)
run: cargo build --all-features
- name: Build (release)
run: cargo build --all-features --release
- name: Test
run: ./ci/test_full.sh
test-other-platforms:
name: Test on other platforms with stable
runs-on: '${{ matrix.os }}'
strategy:
matrix:
include:
- os: macos-13
target: x86_64-apple-darwin
type: unix
toolchain: stable
- os: macos-latest
target: aarch64-apple-darwin
type: unix
toolchain: stable
- os: windows-latest
target: x86_64-pc-windows-msvc
type: windows
toolchain: stable
steps:
- name: Rust install
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
components: rustfmt, clippy
- name: Checkout
uses: actions/checkout@v4
- name: Cache crates from crates.io
uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: '${{ runner.os }}-${{ matrix.target }}-cargo-stable-${{ hashFiles(''**/Cargo.lock'') }}'
# - name: Quality - cargo fmt
# run: |
# cargo fmt --all -- --check
# - name: Quality - cargo clippy
# run: |
# cargo clippy -- -D warnings
# - name: Quality - convco check
# run: |
# git show-ref
# curl -sSfLO https://github.com/convco/convco/releases/latest/download/convco-ubuntu.zip
# unzip convco-ubuntu.zip
# chmod +x convco
# ./convco --version
# ./convco check -c .convco
# rm convco
# - name: Quality - cargo deny check
# run: |
# curl -sSfL https://github.com/EmbarkStudios/cargo-deny/releases/download/0.12.2/cargo-deny-0.12.2-x86_64-unknown-linux-musl.tar.gz | tar zx --no-anchored cargo-deny --strip-components=1
# chmod +x cargo-deny
# mv cargo-deny ~/.cargo/bin/
# cargo deny check
# - name: Quality - cargo audit check
# run: |
# curl -sSfL https://github.com/rustsec/rustsec/releases/download/cargo-audit%2Fv0.17.3/cargo-audit-x86_64-unknown-linux-musl-v0.17.3.tgz | tar zx --no-anchored cargo-audit --strip-components=1
# chmod +x cargo-audit
# mv cargo-audit ~/.cargo/bin/
# rm -rf ~/.cargo/advisory-db/
# cargo audit --ignore RUSTSEC-2020-0071 # time-rs, but not used by chrono, see https://github.com/chronotope/chrono/issues/602
# - name: Quality - cargo outdated
# timeout-minutes: 20
# run: |
# cargo install --locked cargo-outdated || true
# rm -rf ~/.cargo/advisory-db
# cargo outdated --exit-code 1
# - name: Quality - cargo udeps (needs nightly)
# run: |
# cargo install --locked cargo-udeps || true
# cargo udeps
# - name: Quality - cargo pants
# run: |
# cargo install --locked cargo-pants || true
# cargo pants
- name: Build (dev)
run: cargo build --all-features
- name: Build (release)
run: cargo build --all-features --release
- name: Test
run: ./ci/test_full.sh