-
-
Notifications
You must be signed in to change notification settings - Fork 8
81 lines (66 loc) · 1.81 KB
/
main.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
name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
ci:
env:
RUST_BACKTRACE: 1
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- nightly
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt
- name: Load cache
uses: Swatinem/rust-cache@v2
- name: Format host
run: |
cargo fmt --all -- --check
- name: Check host
run: |
cargo check --all --verbose
ci-modules:
env:
RUST_BACKTRACE: 1
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- nightly
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
targets: wasm32-unknown-unknown
components: rustfmt
- uses: Swatinem/rust-cache@v2
- name: Format modules
run: |
cargo fmt --all --manifest-path ./modules/Cargo.toml -- --check
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install cargo-component
working-directory: ./modules/
run: |
wget https://github.com/bytecodealliance/cargo-component/releases/download/v0.4.0/cargo-component-x86_64-unknown-linux-gnu
chmod +x ./cargo-component-x86_64-unknown-linux-gnu
mv ./cargo-component-x86_64-unknown-linux-gnu ~/.cargo/bin/cargo-component
- name: Check modules
working-directory: ./modules/
run: cargo component check