-
Notifications
You must be signed in to change notification settings - Fork 51
56 lines (43 loc) · 1.74 KB
/
cross-platform.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
name: Cross platform checks
on:
# tests must run for a PR to be valid and pass merge queue muster
# on main, we want to know that all commits are passing at a glance, any deviation should help bisecting errors
# the merge run checks should show on master and enable this clear test/passing history
merge_group:
branches: [main]
pull_request:
branches: ["*"]
env:
CARGO_INCREMENTAL: 0 # bookkeeping for incremental builds has overhead, not useful in CI.
jobs:
wasm:
if: "!startsWith(github.event.head_commit.message, 'chore(release):')"
name: wasm32-unknown-unknown builds
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build WASM package
# --dev to avoid optimisation
run: wasm-pack build --dev --target=web autonomi
timeout-minutes: 30
- name: Cargo check for WASM
# Allow clippy lints (these can be pedantic on WASM), but deny regular Rust warnings
run: cargo clippy --target=wasm32-unknown-unknown --package=autonomi --all-targets -- --allow=clippy::all --deny=warnings
timeout-minutes: 30
websocket:
if: "!startsWith(github.event.head_commit.message, 'chore(release):')"
name: Standard Websocket builds
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build all for `websockets`
run: cargo build --features="websockets"
timeout-minutes: 30