forked from RustPython/RustPython
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (55 loc) · 2.03 KB
/
rust.yml
File metadata and controls
63 lines (55 loc) · 2.03 KB
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
name: Combile Rust to WebAssembly
on: push
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build Rust
runs-on: ubuntu-latest
steps:
- uses: mymindstorm/setup-emsdk@v13
- name: Verify
run: emcc -v
- uses: actions/checkout@v3
- name: Verify ls
run: ls -R
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: install geckodriver
run: |
wget https://github.com/mozilla/geckodriver/releases/download/v0.34.0/geckodriver-v0.34.0-linux64.tar.gz
mkdir geckodriver
tar -xzf geckodriver-v0.34.0-linux64.tar.gz -C geckodriver
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: actions/setup-node@v4
- uses: mwilliamson/setup-wabt-action@v3
with: { wabt-version: "1.0.30" }
- name: Update Rust
run: rustup update beta && rustup default beta
- name: Verify Rust
run: rustc --version
- name: Add emscripten to rustc
run: rustup target add wasm32-unknown-unknown
- name: Build
run: cargo build --verbose --target wasm32-unknown-unknown --release --manifest-path ./wasm/lib/Cargo.toml
- name: Gather target outputs
run: mkdir biowasm && cp ./target/wasm32-unknown-emscripten/release/fastqe.js biowasm && cp ./target/wasm32-unknown-emscripten/release/fastqe.wasm biowasm && cp ./target/wasm32-unknown-emscripten/release/deps/fastqe.data biowasm
- name: Verify biowasm
run: ls -Rl biowasm
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: biowasm/*
env:
GITHUB_TOKEN: ${{ secrets.RUST_DEPLOY_KEY }}
- name: Run tests (TODO)
run: echo cargo test --verbose
- name: Invoke workflow to build page with latest release
uses: benc-uk/workflow-dispatch@v1
with:
workflow: static.yml