-
Notifications
You must be signed in to change notification settings - Fork 11
66 lines (63 loc) · 1.71 KB
/
ci.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
57
58
59
60
61
62
63
64
65
66
name: CI
on:
push:
branches:
- main
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
formatting:
name: rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- run: cargo fmt --check
cargo-deny:
name: cargo-deny
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check bans licenses sources
build_and_test_x86_mac:
name: Native Build x86_64-apple-darwin
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- run: rustup default stable
- uses: Swatinem/rust-cache@v2
- run: pip3 install toml maturin==0.14.13
- run: python3 ci/build.py --target x86_64-apple-darwin
- name: Upload `carton_logs` on failure
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: tmp_carton_logs
path: /tmp/carton_logs
build_wasi:
name: WASM Build wasm32-wasi
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- run: rustup target add wasm32-wasi
- run: cargo build -p carton --verbose --target wasm32-wasi
build_wasm:
name: WASM Build wasm32-unknown-unknown
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- run: rustup target add wasm32-unknown-unknown
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install -g wasm-pack [email protected]
- run: >
cd source/carton-bindings-wasm && ./build.sh &&
cd tests && yarn install && node basic.js