forked from fastqe/fastqe_rust
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (39 loc) · 1.33 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
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
- 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-emscripten
- uses: actions/checkout@v3
- name: Verify ls
run: ls -R
- name: Build
run: cargo build --verbose --target wasm32-unknown-emscripten --release
- 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