-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (68 loc) · 2.28 KB
/
build.yaml
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
77
78
79
80
81
82
83
84
85
86
87
name: Wirdigen Workflow
on: [ push, pull_request ]
jobs:
wirdigen_cli:
name: Wirdigen CLI
runs-on: ubuntu-latest
steps:
- name: Install nightly toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
components: rustfmt, clippy
- name: Install cargo2junit
run: cargo install cargo2junit
- name: Checkout sources
uses: actions/checkout@v4
- name: Check formatting
uses: actions-rust-lang/rustfmt@v1
with:
manifest-path: './Cargo.toml'
- name: Check sources
run: cargo check --release
- name: Run clippy
run: cargo clippy
- name: Build sources
run: cargo build --release
- name: Run tests
run: cargo test --release -- -Z unstable-options --format json | cargo2junit > results.xml
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
check_name: Test Results
files: results.xml
- name: Publish artifact
uses: actions/upload-artifact@v4
with:
name: wirdigen_cli
path: target/release/wirdigen
retention-days: 7
wirdigen_wasm:
name: Wirdigen WASM
runs-on: ubuntu-latest
steps:
- name: Install nightly toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
components: rustfmt
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Checkout sources
uses: actions/checkout@v4
- name: Check formatting
uses: actions-rust-lang/rustfmt@v1
with:
manifest-path: './wasm/Cargo.toml'
- name: Build sources
run: wasm-pack build ./wasm -t nodejs --out-name wirdigen_wasm --target-dir target
- name: Run tests
run: wasm-pack test --node --release ./wasm
- name: Pack NPM package
run: wasm-pack pack ./wasm
- name: Publish artifact
uses: actions/upload-artifact@v4
with:
name: wirdigen_wasm
path: wasm/pkg/*.tgz
retention-days: 7