-
Notifications
You must be signed in to change notification settings - Fork 2
76 lines (67 loc) · 1.73 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
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
name: Rust
on:
push:
branches: [main, release/**]
pull_request:
merge_group:
defaults:
run:
shell: bash
env:
RUSTFLAGS: -Dwarnings
jobs:
complete:
if: always()
needs: [fmt, check-git-rev-deps, build-and-test]
runs-on: ubuntu-latest
steps:
- if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: exit 1
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup update
- run: cargo fmt --all --check
cargo-deny:
runs-on: ubuntu-latest
strategy:
matrix:
checks:
- advisories
- bans licenses sources
# Prevent sudden announcement of a new advisory from failing ci:
continue-on-error: ${{ matrix.checks == 'advisories' }}
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@e2f4ede4a4e60ea15ff31bc0647485d80c66cfba
with:
command: check ${{ matrix.checks }}
check-git-rev-deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: stellar/actions/rust-check-git-rev-deps@main
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: stellar/actions/rust-cache@main
- uses: stellar/binaries@v33
with:
name: wasm-pack
version: 0.13.0
- uses: stellar/binaries@v33
with:
name: wasm-bindgen-cli
version: 0.2.92
- run: echo RUSTFLAGS='-Dwarnings' >> $GITHUB_ENV
- run: rustup update
- run: cargo version
- run: rustup target add wasm32-unknown-unknown
- run: make build
- uses: actions/upload-artifact@v4
with:
path: pkg
- run: make test
- run: git add -N . && git diff HEAD --exit-code