Repository navigation
147 lines (117 loc) · 3.51 KB
/
Copy pathci.yml
File metadata and controls
147 lines (117 loc) · 3.51 KB
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
name: CI
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
merge_group:
types: [checks_requested]
push:
branches: [main]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
read_msrv:
name: Read MSRV
uses: actions-rust-lang/msrv/.github/workflows/msrv.yml@983d9d27da8fe8aaa47732160b7a14805004d4b2 # v0.1.3
build_and_test:
needs: read_msrv
strategy:
fail-fast: false
matrix:
version:
- { name: msrv, version: "${{ needs.read_msrv.outputs.msrv }}" }
- { name: stable, version: stable }
name: Test / ${{ matrix.version.name }}
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- uses: useblacksmith/checkout@v1.8.2
with:
persist-credentials: false
- name: Setup mold linker
uses: rui314/setup-mold@main
- name: Install Rust (${{ matrix.version.name }})
id: rust
background: true
uses: actions-rust-lang/setup-rust-toolchain@v2.0.0
env:
LD_LIBRARY_PATH: ""
with:
toolchain: ${{ matrix.version.version }}
cache-key: ${{ hashFiles('flake.lock') }}
- name: Install Nix
uses: nixbuild/nix-quick-install-action@v35
- name: Enter Nix devshell
id: devshell
background: true
uses: nicknovitski/nix-develop@v1.2.1
- name: Wait for Rust
wait: rust
- name: Install just,cargo-hack,cargo-nextest,cargo-ci-cache-clean
uses: taiki-e/install-action@v2.90.1
env:
LD_LIBRARY_PATH: ""
with:
tool: just,cargo-hack,cargo-nextest,cargo-ci-cache-clean
- name: Wait for Nix devshell
wait: devshell
- name: workaround MSRV issues
if: matrix.version.name == 'msrv'
run: just downgrade-for-msrv
- name: tests
timeout-minutes: 60
run: just test-no-docs
- name: CI cache clean
run: cargo-ci-cache-clean
rustdoc:
name: Documentation Tests
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- uses: useblacksmith/checkout@v1.8.2
with:
persist-credentials: false
- name: Install Rust (nightly)
id: rust
background: true
uses: actions-rust-lang/setup-rust-toolchain@v2.0.0
env:
LD_LIBRARY_PATH: ""
with:
toolchain: nightly
cache-key: ${{ hashFiles('flake.lock') }}
- name: Install Nix
uses: nixbuild/nix-quick-install-action@v35
- name: Enter Nix devshell
id: devshell
background: true
uses: nicknovitski/nix-develop@v1.2.1
- name: Wait for Rust
wait: rust
- name: Install just
uses: taiki-e/install-action@v2.90.1
env:
LD_LIBRARY_PATH: ""
with:
tool: just
- name: Wait for Nix devshell
wait: devshell
- name: doc tests
run: just test-docs
features:
name: Feature Combinations
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- uses: useblacksmith/checkout@v1.8.2
with:
persist-credentials: false
- name: Install Rust (stable)
uses: actions-rust-lang/setup-rust-toolchain@v2.0.0
- name: Install cargo-hack
uses: taiki-e/install-action@v2.90.1
with:
tool: cargo-hack
- name: doc tests
run: |
cargo hack --each-feature check
cargo hack --each-feature check --all-targets