-
Notifications
You must be signed in to change notification settings - Fork 19
148 lines (146 loc) · 4.35 KB
/
framework-check.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
name: framework-check
permissions:
contents: read
on:
push:
branches: [main]
paths:
- "framework/**"
pull_request:
paths:
- "framework/**"
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
jobs:
fmt:
runs-on: ubuntu-latest
name: stable / fmt
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.SSH_PRIVATE_KEY_MULTI_TEST }}
${{ secrets.SSH_PRIVATE_KEY_CW_ORCH_INTERCHAIN }}
- name: Install stable
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: cargo fmt --check
working-directory: ./framework
run: cargo fmt --check
clippy:
runs-on: ubuntu-latest
name: ${{ matrix.toolchain }} / clippy
permissions:
contents: read
checks: write
strategy:
fail-fast: false
matrix:
toolchain: [stable]
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.SSH_PRIVATE_KEY_MULTI_TEST }}
${{ secrets.SSH_PRIVATE_KEY_CW_ORCH_INTERCHAIN }}
- name: Setup sccache
uses: mozilla-actions/[email protected]
with:
version: "v0.8.1"
- name: Install ${{ matrix.toolchain }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: clippy
- uses: Swatinem/rust-cache@v2
with:
workspaces: "framework -> target"
- name: cargo clippy
working-directory: ./framework
run: cargo clippy --all-targets --all-features -- -D warnings
doc:
runs-on: ubuntu-latest
name: nightly / doc
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.SSH_PRIVATE_KEY_MULTI_TEST }}
${{ secrets.SSH_PRIVATE_KEY_CW_ORCH_INTERCHAIN }}
- name: Setup sccache
uses: mozilla-actions/[email protected]
with:
version: "v0.8.1"
- name: Install nightly
uses: dtolnay/rust-toolchain@nightly
- name: cargo doc
working-directory: ./framework
run: cargo doc --no-deps --all-features
env:
RUSTDOCFLAGS: --cfg docsrs
hack:
runs-on: ubuntu-latest
name: ubuntu / stable / features
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.SSH_PRIVATE_KEY_MULTI_TEST }}
${{ secrets.SSH_PRIVATE_KEY_CW_ORCH_INTERCHAIN }}
- name: Setup sccache
uses: mozilla-actions/[email protected]
with:
version: "v0.8.1"
- name: Install stable
uses: dtolnay/rust-toolchain@stable
- name: cargo install cargo-hack
uses: taiki-e/install-action@cargo-hack
- uses: Swatinem/rust-cache@v2
with:
workspaces: "framework -> target"
- name: cargo hack
working-directory: ./framework
run: cargo hack --feature-powerset check --lib --tests
# Find any unused dependencies
unused-deps:
runs-on: ubuntu-latest
name: nigtly / unused-deps
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.SSH_PRIVATE_KEY_MULTI_TEST }}
${{ secrets.SSH_PRIVATE_KEY_CW_ORCH_INTERCHAIN }}
- name: Setup sccache
uses: mozilla-actions/[email protected]
with:
version: "v0.8.1"
- name: Install nightly
uses: dtolnay/rust-toolchain@nightly
- name: cargo install cargo-udeps
uses: taiki-e/install-action@cargo-udeps
- name: cargo install cargo-workspaces
run: cargo +stable install cargo-workspaces
- uses: Swatinem/rust-cache@v2
with:
workspaces: "framework -> target"
- name: cargo udeps framework
working-directory: ./framework
run: cargo workspaces exec cargo +nightly udeps --workspace --exclude "workspace-hack"