-
-
Notifications
You must be signed in to change notification settings - Fork 8
90 lines (74 loc) · 2.2 KB
/
main.yml
File metadata and controls
90 lines (74 loc) · 2.2 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
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 wasm compile tools
working-directory: ./modules/
run: |
# Keep those values in sync with the Makefile!
wget https://github.com/bytecodealliance/wasm-tools/releases/download/v1.229.0/wasm-tools-1.229.0-x86_64-linux.tar.gz
tar pfx wasm-tools-1.229.0-x86_64-linux.tar.gz
mv wasm-tools-1.229.0-x86_64-linux/wasm-tools .
chmod +x wasm-tools
mv wasm-tools /usr/local/bin
wget https://github.com/bytecodealliance/wit-bindgen/releases/download/v0.41.0/wit-bindgen-0.41.0-x86_64-linux.tar.gz
tar pfx wit-bindgen-0.41.0-x86_64-linux.tar.gz
mv wit-bindgen-0.41.0-x86_64-linux/wit-bindgen .
chmod +x wit-bindgen
mv wit-bindgen /usr/local/bin
- name: Check modules
working-directory: ./modules/
run: make check