-
Notifications
You must be signed in to change notification settings - Fork 26
116 lines (106 loc) · 3.93 KB
/
Copy pathtest.yaml
File metadata and controls
116 lines (106 loc) · 3.93 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
name: Rust CI
on:
push:
branches: ["next", "main"]
pull_request:
branches: ["next", "main"]
schedule:
- cron: "0 0 * * 0"
permissions:
contents: read
jobs:
c-api:
name: C API
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0
with:
toolchain: nightly
components: miri
rustflags: ""
build-warnings: warn
- run: cargo miri test -p tinywasm-c-api --lib
- run: make -C crates/c-api test
- run: make -C crates/c-api test TINYWASM_C_API_PREFIX=test_ TARGET_DIR=../../target/c-api-prefixed
run-tests:
strategy:
matrix:
include:
- os: ubuntu-26.04
rust: stable
name: "Linux x86 (stable)"
target: x86_64-unknown-linux-gnu
- os: ubuntu-26.04
rust: nightly
name: "Linux x86 (nightly)"
target: x86_64-unknown-linux-gnu
- os: ubuntu-26.04
rust: nightly
name: "Linux x86 (nightly tail calls)"
target: x86_64-unknown-linux-gnu
args: "--features tinywasm/nightly-tail-calls"
- os: ubuntu-26.04
rust: stable
name: "Linux x86 (stable, no default features)"
target: x86_64-unknown-linux-gnu
args: "--no-default-features"
- os: ubuntu-26.04
rust: nightly
name: "Linux x86 (nightly, no default features)"
target: x86_64-unknown-linux-gnu
args: "--no-default-features"
- os: ubuntu-26.04
rust: nightly
name: "Linux x86 (nightly tail calls, no default features)"
target: x86_64-unknown-linux-gnu
args: "--no-default-features --features tinywasm/nightly-tail-calls"
- os: macos-26
rust: stable
name: "macOS arm64 (Apple M1)"
target: aarch64-apple-darwin
- os: windows-2025
rust: stable
name: "Windows x86_64"
target: x86_64-pc-windows-msvc
- os: ubuntu-26.04-arm
rust: stable
name: "Linux arm64"
target: aarch64-unknown-linux-gnu
- os: ubuntu-26.04-arm
rust: stable
name: "Linux armv7"
target: armv7-unknown-linux-gnueabihf
args: "--release"
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 }}
target: ${{ matrix.target }}
rustflags: ""
build-warnings: warn
components: rustfmt, clippy
- name: Install armv7 tools
run: sudo apt-get update && sudo apt-get install -y gcc-arm-linux-gnueabihf qemu-user
if: matrix.target == 'armv7-unknown-linux-gnueabihf'
- name: Run tests
run: cargo test --workspace --target ${{ matrix.target }} ${{ matrix.args }}
env:
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_RUNNER: qemu-arm -L /usr/arm-linux-gnueabihf
- name: Run examples
run: cargo test --workspace --target ${{ matrix.target }} ${{ matrix.args }} --examples
if: matrix.target != 'armv7-unknown-linux-gnueabihf'
- name: Run clippy
run: cargo clippy --workspace --target ${{ matrix.target }} ${{ matrix.args }}
if: matrix.target != 'armv7-unknown-linux-gnueabihf'