Skip to content

readme

readme #81

Workflow file for this run

name: build
on:
push:
branches:
- 'main'
- 'master'
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ github.ref || github.run_id }}
- uses: dtolnay/rust-toolchain@stable
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- name: Install wasm target
run: rustup target install wasm32-unknown-unknown && cargo install -f wasm-bindgen-cli
- name: Build
run: cargo build --release --target wasm32-unknown-unknown && wasm-bindgen --out-dir ./out/ --target web ./target/wasm32-unknown-unknown/release/weber_fechner.wasm
- name: Copy
run: cp -R assets out/ && cp index.html out/index.html && ls -R out
- name: Push
uses: s0/git-publish-subdir-action@develop
env:
SQUASH_HISTORY: true
REPO: self
BRANCH: gh-pages
FOLDER: out
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MESSAGE: "Build: ({sha}) {msg}"