-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (39 loc) · 1.18 KB
/
rust_fmt_auto_build_test.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
name: rust_fmt_auto_build_test
on:
# push to any branch
push:
# any pull requests
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
rust_fmt_auto_build_test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: cargo fmt -- --check
run: cargo fmt -- --check
- name: Run cache for rust dependencies
uses: Swatinem/rust-cache@v2.7.3
- name: Configure sccache
run: printf "RUSTC_WRAPPER=sccache\n" >> $GITHUB_ENV; printf "SCCACHE_GHA_ENABLED=true\n" >> $GITHUB_ENV
- name: Run sccache-cache for artifacts
uses: mozilla-actions/sccache-action@v0.0.4
- name: install and cache cargo-auto
uses: baptiste0928/cargo-install@v3.0.0
with:
crate: cargo-auto
- name: Cache for automation tasks
uses: actions/cache@v4.0.0
with:
path: |
automation_tasks_rs/.file_hashes.json
automation_tasks_rs/target
automation_tasks_rs/Cargo.toml
automation_tasks_rs/Cargo.lock
key: automation_tasks_rs
- name: cargo auto build
run: cargo auto build
- name: cargo auto test
run: cargo auto test