-
Notifications
You must be signed in to change notification settings - Fork 69
99 lines (87 loc) · 2.48 KB
/
rust.yaml
File metadata and controls
99 lines (87 loc) · 2.48 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
name: Rust
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches: [main]
pull_request:
paths:
- "backend/**"
- "crates/**"
- ".github/**"
env:
CARGO_TERM_COLOR: always
jobs:
rust-tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: Test (Ubuntu)
os: depot-ubuntu-22.04-4
atuin_run_url: https://atuin-binary.t3.storage.dev/bin/main/x86_64-unknown-linux-gnu/atuin-run
- name: Test (macOS)
os: macos-latest
atuin_run_url: https://atuin-binary.t3.storage.dev/bin/main/aarch64-apple-darwin/atuin-run
steps:
- uses: actions/checkout@v4
- name: Install atuin-run
run: |
curl -L -o atuin-run ${{ matrix.atuin_run_url }}
sudo mv atuin-run /usr/local/bin/atuin-run
sudo chmod +x /usr/local/bin/atuin-run
- name: ${{ matrix.name }}
run: |
atuin-run ./runbooks/Run\ Rust\ tests.atrb
rust-checks:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: Check
command: check
components: ""
os: depot-ubuntu-22.04-4
- name: Clippy
command: clippy
components: clippy
os: depot-ubuntu-22.04-4
- name: Format
command: fmt
components: rustfmt
os: depot-ubuntu-22.04-4
steps:
- uses: actions/checkout@v4
- name: Install latest rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: ${{ matrix.components }}
- uses: awalsh128/cache-apt-pkgs-action@latest
if: runner.os == 'Linux'
with:
packages: libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libasound2-dev
version: 1.0
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.7
- name: Run ${{ matrix.name }}
env:
RUSTC_WRAPPER: sccache
run: |
case "${{ matrix.command }}" in
test)
cargo test
;;
check)
cargo check --no-default-features --features wry
;;
clippy)
cargo clippy -- -D warnings
;;
fmt)
cargo fmt -- --check
;;
esac