config: pin rust 1.92.0 and drop SUPPORT_LONGJMP and panic=abort #37
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: Deploy | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| permissions: | |
| pages: write | |
| id-token: write | |
| jobs: | |
| wasm: | |
| name: Build WASM | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Emscripten SDK | |
| uses: mymindstorm/setup-emsdk@v14 | |
| with: | |
| version: 3.1.74 | |
| - name: Pre-warm Emscripten port cache | |
| run: | | |
| echo "int main(){return 0;}" > /tmp/warmup.c | |
| emcc /tmp/warmup.c -o /tmp/warmup.js \ | |
| -sUSE_SDL=2 -sUSE_SDL_IMAGE=2 -sUSE_SDL_MIXER=2 -sUSE_OGG=1 \ | |
| -sUSE_SDL_GFX=2 -sUSE_SDL_TTF=2 -sSDL2_IMAGE_FORMATS="['png']" \ | |
| -sASYNCIFY -sALLOW_MEMORY_GROWTH=1 | |
| - name: Install Rust toolchain | |
| uses: mkroening/rust-toolchain-toml@main | |
| - name: Add wasm target | |
| run: rustup target add wasm32-unknown-emscripten | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build | |
| run: bun scripts/build-wasm.ts -r -e | |
| - name: Upload Pages Artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./dist/ | |
| retention-days: 7 | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| runs-on: ubuntu-latest | |
| needs: wasm | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |