-
Notifications
You must be signed in to change notification settings - Fork 7
122 lines (112 loc) · 3.57 KB
/
Copy pathrust.yaml
File metadata and controls
122 lines (112 loc) · 3.57 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
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
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
name: Lint and Test
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy, rustfmt
- run: |
cargo +nightly fmt --all -- --check
# Check formatting for each example
for manifest in $(find examples -name Cargo.toml); do
cargo +nightly fmt --manifest-path "$manifest" -- --check
done
## clippy is currently broken, require big refactor
# - run: cargo clippy -- -D warnings
test:
name: Test / ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: Core Libs
command: |
cargo test -r --lib --no-fail-fast \
-p tvm_abi \
-p tvm_types \
-p tvm_block_json \
-p tvm_sdk \
-p tvm_vm \
--features tvm_vm/gosh,tvm_vm/signature_with_id
- name: tvm_block / default
command: |
cargo test -r --tests --no-fail-fast \
-p tvm_block
- name: tvm_block / signature_with_id
command: |
cargo test -r --lib --no-fail-fast \
-p tvm_block \
--features tvm_block/signature_with_id
- name: tvm_executor
command: |
cargo test -r --no-fail-fast \
-p tvm_executor \
--lib \
--test node_executor_gosh \
--features tvm_executor/gosh,tvm_executor/signature_with_id,tvm_executor/wasmtime
env:
CARGO_TERM_COLOR: always
SCCACHE_GHA_ENABLED: "true"
SCCACHE_GHA_VERSION: ${{ vars.SCCACHE_GHA_VERSION || 1 }}
RUSTC_WRAPPER: sccache
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- uses: rui314/setup-mold@v1
- uses: mozilla-actions/sccache-action@v0.0.10
- name: Setup cargo cache
uses: actions/cache@v5
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Run ${{ matrix.name }} tests
run: ${{ matrix.command }}
test-client:
name: Test / tvm_client
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
SCCACHE_GHA_ENABLED: "true"
SCCACHE_GHA_VERSION: ${{ vars.SCCACHE_GHA_VERSION || 1 }}
RUSTC_WRAPPER: sccache
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- uses: rui314/setup-mold@v1
- uses: mozilla-actions/sccache-action@v0.0.10
- name: Setup cargo cache
uses: actions/cache@v5
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Run tvm_client tests
run: |
cargo test -r --lib --no-fail-fast \
-p tvm_client \
--no-default-features \
--features tvm_client/std,tvm_client/rustls-tls-webpki-roots