feat(binary-object): decode non-executable function images #285
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 playground to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: {} | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| env: | |
| WASM_BINDGEN_VERSION: "0.2.126" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| artifact_id: ${{ steps.pages_artifact.outputs.artifact_id }} | |
| glue_sha256: ${{ steps.pages_hashes.outputs.glue_sha256 }} | |
| index_sha256: ${{ steps.pages_hashes.outputs.index_sha256 }} | |
| page_url: ${{ steps.pages.outputs.base_url }} | |
| wasm_sha256: ${{ steps.pages_hashes.outputs.wasm_sha256 }} | |
| env: | |
| QUICKJS_OXIDE_COMMIT: ${{ github.sha }} | |
| permissions: | |
| contents: read | |
| pages: read | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Install ripgrep | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install --yes ripgrep | |
| - name: Install Rust and the WebAssembly target | |
| run: | | |
| rustup toolchain install stable --profile minimal | |
| rustup default stable | |
| rustup target add --toolchain stable wasm32-unknown-unknown | |
| - name: Install matching wasm-bindgen CLI | |
| run: cargo install wasm-bindgen-cli --version "${WASM_BINDGEN_VERSION}" --locked | |
| - name: Test the native generator stack-budget floor | |
| run: >- | |
| cargo test --locked --lib | |
| generator_delegation_reaches_the_portable_floor_and_recovers_after_overflow | |
| - name: Build and test the real quickjs-oxide WebAssembly playground | |
| run: ./scripts/test-web-playground.sh | |
| - name: Install browser acceptance dependencies | |
| run: npm ci --ignore-scripts | |
| - name: Install the pinned Chromium browser | |
| run: ./node_modules/.bin/playwright install --with-deps chromium | |
| - name: Test the final Pages artifact in a real browser | |
| run: npm run test:browser | |
| - name: Test the non-cancelling Pages deploy client | |
| run: node scripts/test-deploy-pages.mjs | |
| - name: Configure GitHub Pages | |
| id: pages | |
| uses: actions/configure-pages@v6 | |
| - name: Authenticate final Pages asset bytes | |
| id: pages_hashes | |
| run: | | |
| set -euo pipefail | |
| index_sha256=$(sha256sum target/pages/index.html | cut -d ' ' -f 1) | |
| glue_sha256=$(sha256sum target/pages/pkg/quickjs_oxide_web.js | cut -d ' ' -f 1) | |
| wasm_sha256=$(sha256sum target/pages/pkg/quickjs_oxide_web_bg.wasm | cut -d ' ' -f 1) | |
| echo "index_sha256=${index_sha256}" >> "$GITHUB_OUTPUT" | |
| echo "glue_sha256=${glue_sha256}" >> "$GITHUB_OUTPUT" | |
| echo "wasm_sha256=${wasm_sha256}" >> "$GITHUB_OUTPUT" | |
| - name: Upload GitHub Pages artifact | |
| id: pages_artifact | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: target/pages | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 35 | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ needs.build.outputs.page_url }} | |
| steps: | |
| - name: Check out non-cancelling deployment client | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Create and observe GitHub Pages deployment | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| QUICKJS_OXIDE_PAGES_ARTIFACT_ID: ${{ needs.build.outputs.artifact_id }} | |
| QUICKJS_OXIDE_PAGES_POLL_INTERVAL_MS: "5000" | |
| QUICKJS_OXIDE_PAGES_POLL_TIMEOUT_MS: "1500000" | |
| run: node scripts/deploy-pages.mjs | |
| verify: | |
| needs: [build, deploy] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Check out deployment verifier | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Verify the live WASM deployment | |
| env: | |
| QUICKJS_OXIDE_COMMIT: ${{ github.sha }} | |
| QUICKJS_OXIDE_GLUE_SHA256: ${{ needs.build.outputs.glue_sha256 }} | |
| QUICKJS_OXIDE_INDEX_SHA256: ${{ needs.build.outputs.index_sha256 }} | |
| QUICKJS_OXIDE_LIVE_ATTEMPTS: "60" | |
| QUICKJS_OXIDE_LIVE_RETRY_MAX_MS: "15000" | |
| QUICKJS_OXIDE_LIVE_RETRY_MS: "5000" | |
| QUICKJS_OXIDE_LIVE_TIMEOUT_MS: "10000" | |
| QUICKJS_OXIDE_PAGES_URL: ${{ needs.build.outputs.page_url }} | |
| QUICKJS_OXIDE_WASM_SHA256: ${{ needs.build.outputs.wasm_sha256 }} | |
| run: node scripts/test-live-pages.mjs |