Fix: Sub-type anotation. #24
This file contains hidden or 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: pages | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: compiler | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Install wasm target | |
| run: rustup target add wasm32-unknown-unknown | |
| working-directory: compiler | |
| - name: Install wasm-opt | |
| run: sudo apt-get update && sudo apt-get install -y binaryen | |
| - name: Build wasm | |
| run: cargo build --target wasm32-unknown-unknown --features wasm --lib --release | |
| working-directory: compiler | |
| - name: Optimize wasm | |
| run: | | |
| wasm-opt -Oz --converge --strip-debug \ | |
| --enable-bulk-memory \ | |
| --enable-nontrapping-float-to-int \ | |
| --enable-sign-ext \ | |
| -o compiler/target/wasm32-unknown-unknown/release/compiler_lib.wasm \ | |
| compiler/target/wasm32-unknown-unknown/release/compiler_lib.wasm | |
| - name: Stage demo | |
| run: cp compiler/target/wasm32-unknown-unknown/release/compiler_lib.wasm demo/ | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| with: | |
| enablement: true | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: demo | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |