-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathci.sh
executable file
·69 lines (61 loc) · 1.96 KB
/
ci.sh
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
#!/usr/bin/env bash
# TODO: I should be a CI check, but I'm not yet.
set -euxo pipefail
rustup target add \
thumbv6m-none-eabi \
thumbv7em-none-eabihf \
wasm32-unknown-unknown
# Host + STD checks
cargo check \
--manifest-path source/postcard-rpc/Cargo.toml \
--no-default-features
cargo test \
--manifest-path source/postcard-rpc/Cargo.toml \
--no-default-features
# Host + all non-wasm host-client impls
cargo check \
--manifest-path source/postcard-rpc/Cargo.toml \
--no-default-features \
--features=use-std,cobs-serial,raw-nusb
cargo test \
--manifest-path source/postcard-rpc/Cargo.toml \
--no-default-features \
--features=use-std,cobs-serial,raw-nusb
# Host + wasm host-client impls
RUSTFLAGS="--cfg=web_sys_unstable_apis" \
cargo check \
--manifest-path source/postcard-rpc/Cargo.toml \
--no-default-features \
--features=use-std,webusb \
--target wasm32-unknown-unknown
RUSTFLAGS="--cfg=web_sys_unstable_apis" \
cargo build \
--manifest-path source/postcard-rpc/Cargo.toml \
--no-default-features \
--features=use-std,webusb \
--target wasm32-unknown-unknown
# Embedded + embassy server impl
cargo check \
--manifest-path source/postcard-rpc/Cargo.toml \
--no-default-features \
--features=embassy-usb-0_3-server \
--target thumbv7em-none-eabihf
cargo check \
--manifest-path source/postcard-rpc/Cargo.toml \
--no-default-features \
--features=embassy-usb-0_4-server \
--target thumbv7em-none-eabihf
# Example projects
cargo build \
--manifest-path example/workbook-host/Cargo.toml
# Current (embassy-usb v0.4)
cargo build \
--manifest-path example/firmware/Cargo.toml \
--target thumbv6m-none-eabi
# Legacy (embassy-usb v0.3)
cargo build \
--manifest-path example/firmware-eusb-v0_3/Cargo.toml \
--target thumbv6m-none-eabi
# Test Project
cargo test \
--manifest-path source/postcard-rpc-test/Cargo.toml