-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (37 loc) · 1.13 KB
/
rust.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
name: Build Rust
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Exit if not on master branch
if: endsWith(github.ref, 'master') == false
run: exit -1
- name: Set up Rust
uses: dtolnay/rust-toolchain@nightly
with:
targets: wasm32-unknown-unknown, wasm32-wasi
toolchain: nightly-x86_64-unknown-linux-gnu
components: rust-src
# run `cargo component build` in the crates/delano-wit folder first
- name: Install binstall
uses: taiki-e/install-action@cargo-binstall
- name: Install cargo component
run: echo yes | cargo binstall [email protected]
- name: Cargo component build workspace
run: cargo component build --workspace
# run the tests
- name: Run workspace tests
run: cargo test --workspace --verbose