mirror of
https://github.com/tig-foundation/tig-monorepo.git
synced 2026-03-10 10:47:54 +08:00
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
name: Build Benchmarker
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'test/benchmarker'
|
|
- 'dev/benchmarker'
|
|
|
|
jobs:
|
|
build_wasm:
|
|
name: Compile Benchmarker to WASM
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
statuses: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install
|
|
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
|
- name: Cargo Build
|
|
run: >
|
|
wasm-pack build tig-benchmarker --release --target web;
|
|
rm tig-benchmarker/pkg/.gitignore;
|
|
- name: Auto commit
|
|
id: auto_commit
|
|
uses: stefanzweifel/git-auto-commit-action@v5
|
|
with:
|
|
commit_message: Add compiled WASM for benchmarker
|
|
- name: Update Commit Status (Success)
|
|
if: success()
|
|
uses: myrotvorets/set-commit-status-action@master
|
|
with:
|
|
status: 'success'
|
|
sha: ${{ steps.auto_commit.outputs.commit_hash }}
|
|
- name: Update Commit Status (Failure)
|
|
if: failure()
|
|
uses: myrotvorets/set-commit-status-action@master
|
|
with:
|
|
status: 'failure'
|