Skip to content

Commit 556d4c9

Browse files
committed
ci: add prebuild workflow
For #186.
1 parent b65639a commit 556d4c9

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/prebuild.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
name: Prebuild
3+
description: Pre-Build WASM Binaries
4+
5+
# yamllint disable-line rule:truthy
6+
on:
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
env:
13+
# Disable incremental compilation to avoid overhead.
14+
CARGO_INCREMENTAL: "0"
15+
16+
jobs:
17+
release:
18+
runs-on: ubuntu-latest
19+
steps:
20+
# do NOT load any caches here, we want a clean, freestanding build w/o stateful dependencies!
21+
22+
- name: Checkout
23+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
24+
with:
25+
fetch-depth: 1
26+
27+
- name: Free disk space
28+
uses: ./.github/actions/free-disk-space
29+
30+
- name: Fetch main branch
31+
run: git fetch --depth=1 origin main
32+
33+
- name: Install `just`
34+
uses: taiki-e/install-action@763e3324d4fd026c9bd284c504378585777a87d5 # v2
35+
with:
36+
tool: just
37+
38+
- name: Install stable toolchain
39+
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master
40+
with:
41+
components: clippy, rustfmt
42+
toolchain: stable
43+
targets: wasm32-wasip2
44+
45+
- name: build "add one" example (debug)
46+
run: just guests::rust::build-add-one-debug
47+
48+
- name: build "add one" example (release)
49+
run: just guests::rust::build-add-one-release
50+
51+
- name: build python guest (debug)
52+
run: just guests::python::build-debug
53+
54+
- name: build python guest (release)
55+
run: just guests::python::build-release

0 commit comments

Comments
 (0)