-
Notifications
You must be signed in to change notification settings - Fork 26
84 lines (76 loc) · 2.55 KB
/
Copy pathtest.yaml
File metadata and controls
84 lines (76 loc) · 2.55 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
name: Rust CI
on:
push:
branches: ["**"]
pull_request:
branches: ["next", "main"]
schedule:
- cron: "0 0 * * 0"
permissions:
contents: read
jobs:
run-tests:
strategy:
matrix:
include:
- os: ubuntu-latest
rust: stable
name: "Linux x86 (stable)"
- os: ubuntu-latest
rust: nightly
name: "Linux x86 (nightly)"
- os: ubuntu-latest
rust: nightly
name: "Linux x86 (nightly tail calls)"
args: "--features tinywasm/nightly-tail-calls"
- os: ubuntu-latest
rust: stable
name: "Linux x86 (stable, no default features)"
args: "--no-default-features"
- os: ubuntu-latest
rust: nightly
name: "Linux x86 (nightly, no default features)"
args: "--no-default-features"
- os: ubuntu-latest
rust: nightly
name: "Linux x86 (nightly tail calls, no default features)"
args: "--no-default-features --features tinywasm/nightly-tail-calls"
- os: macos-14
rust: stable
name: "macOS arm64 (Apple M1)"
- os: ubuntu-latest
rust: stable
name: "Linux arm64"
target: aarch64-unknown-linux-gnu
- os: ubuntu-latest
rust: stable
name: "Linux armv7"
target: armv7-unknown-linux-gnueabihf
name: Run tests on ${{ matrix.name }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: true
persist-credentials: false
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0
with:
toolchain: ${{ matrix.rust }}
rustflags: ""
components: rustfmt, clippy
if: matrix.target == ''
- name: Run tests
run: cargo test --workspace ${{ matrix.args }} && cargo test --workspace ${{ matrix.args }} --examples
if: matrix.target == ''
- name: Run clippy
run: cargo clippy --workspace ${{ matrix.args }}
if: matrix.target == ''
- name: Run tests (${{ matrix.target }})
uses: houseabsolute/actions-rust-cross@21b0f18dc621b25bfae556ff2791fca4173121e8 # v1.0.8
with:
command: test
target: ${{ matrix.target }}
toolchain: ${{ matrix.rust }}
if: matrix.target != ''