Skip to content

Add job icon sprites #36

Add job icon sprites

Add job icon sprites #36

Workflow file for this run

name: Build & Test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build-test-x86_64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
shared-key: "cargo"
- name: Build
run: cargo build --all --verbose
- name: Test
run: cargo test --all --verbose
build-wasm:
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main'
env:
RUSTFLAGS: "--cfg=web_sys_unstable_apis"
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
shared-key: "cargo"
- name: Install Target
run: rustup target add wasm32-unknown-unknown
- name: Build
run: cargo build --all --verbose --target wasm32-unknown-unknown
build-release-wasm:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
env:
RUSTFLAGS: "--cfg=web_sys_unstable_apis"
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
shared-key: "cargo"
- name: Install Target
run: rustup target add wasm32-unknown-unknown
- name: Install Bindgen
uses: jetli/[email protected]
- name: Build
run: cargo build --profile release-size --target wasm32-unknown-unknown
- name: Run Bindgen
run: wasm-bindgen --target web --no-typescript --out-dir public/static/app --out-name stratmat target/wasm32-unknown-unknown/release-size/stratmat.wasm
- name: Optimise Wasm
uses: NiklasEi/wasm-opt-action@v2
with:
file: public/static/app/stratmat_bgwasm
- name: Tataru
run: cargo run --package tataru -- --all
- name: Copy Assets to public/
run: cp -r assets public/static/app
- name: Upload Release Package
uses: actions/upload-artifact@v4
with:
name: release-package
path: public
include-hidden-files: true
deploy-gh-pages:
needs:
- build-release-wasm
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Download Release Package
uses: actions/download-artifact@v4
with:
path: public
name: release-package
- name: Deploy to GitHub Pages
uses: crazy-max/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
build_dir: public
fqdn: stratmat.dynamis.gg
jekyll: false