web: wasm-opt in lto mode #58
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache dprint | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.dprint | |
~/.cache/dprint | |
key: dprint | |
- name: Install dprint | |
run: | | |
if [ ! -f $HOME/.dprint/bin/dprint ]; then | |
curl -fsSL https://dprint.dev/install.sh | sh | |
fi | |
echo $HOME/.dprint/bin >> $GITHUB_PATH | |
- run: ./misc/fmt.sh --check | |
build-x86-emu: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build | |
run: cargo build -F x86-emu -p retrowin32 --release | |
# TODO: web build needs wasm-bindgen-cli, but installing it is a bit annoying. | |
# Perhaps we should go back to wasm-pack for builds. | |
# build-web: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Rust Setup | |
# run: rustup toolchain install stable --profile minimal --no-self-update --target wasm32-unknown-unknown | |
# - name: Wasm-pack Setup | |
# run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
# - uses: Swatinem/rust-cache@v2 | |
# - name: Build | |
# run: make -C web profile=lto |