-
Notifications
You must be signed in to change notification settings - Fork 42
59 lines (57 loc) · 1.63 KB
/
pullrequest_check.yml
File metadata and controls
59 lines (57 loc) · 1.63 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
name: Checks
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
- labeled
workflow_dispatch:
jobs:
validate:
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.draft == false && github.event.pull_request.base.ref == 'master')
runs-on: ubuntu-latest
env:
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "true"
SCCACHE_DIR: /mnt/sccache
SCCACHE_CACHE_SIZE: "8G"
CARGO_TARGET_DIR: /mnt/target
TMPDIR: /mnt/tmp
TEMP: /mnt/tmp
TMP: /mnt/tmp
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare build directories
run: |
sudo mkdir -p /mnt/target /mnt/sccache /mnt/tmp
sudo chown -R runner:runner /mnt
df -h
- name: libudev-dev
run: |
sudo apt-get update
sudo apt-get install -y libudev-dev
- name: Set up Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Install just
run: cargo install just --locked
- name: Validate workspace
timeout-minutes: 30
env:
# Environment variable is needed for snapshot testing in Rust via `insta` crate
CI: true
run: just validate
- name: Show sccache stats
if: always()
run: sccache --show-stats || true
- name: Stop sccache
if: always()
run: sccache --stop-server || true