Migrate DOM interop to BridgeJS #63
Workflow file for this run
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: Performance Benchmarks | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "Sources/**" | |
| - "Benchmarks/**" | |
| - "BrowserRuntime/**" | |
| - "Package.swift" | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "Sources/**" | |
| - "Benchmarks/**" | |
| - "BrowserRuntime/**" | |
| - "Package.swift" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| env: | |
| SWIFT_VERSION: "6.2.3" | |
| WASM_SDK_URL: https://download.swift.org/swift-6.2.3-release/wasm-sdk/swift-6.2.3-RELEASE/swift-6.2.3-RELEASE_wasm.artifactbundle.tar.gz | |
| WASM_SDK_CHECKSUM: 394040ecd5260e68bb02f6c20aeede733b9b90702c2204e178f3e42413edad2a | |
| jobs: | |
| measure: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: "pnpm" | |
| cache-dependency-path: Benchmarks/PerformanceBenchmarks/pnpm-lock.yaml | |
| - name: Setup Swift | |
| uses: swift-actions/setup-swift@v3 | |
| with: | |
| swift-version: ${{ env.SWIFT_VERSION }} | |
| skip-verify-signature: true | |
| - name: Install Swift WASM SDK | |
| run: swift sdk install ${{ env.WASM_SDK_URL }} --checksum ${{ env.WASM_SDK_CHECKSUM }} | |
| - name: Install wasm-opt | |
| uses: phi-ag/setup-binaryen@v1 | |
| with: | |
| version: "123" | |
| - name: Install dependencies | |
| working-directory: Benchmarks/PerformanceBenchmarks | |
| run: pnpm preinstall && pnpm install | |
| - name: Install Puppeteer Chrome | |
| working-directory: Benchmarks/PerformanceBenchmarks | |
| run: npx puppeteer browsers install chrome | |
| - name: Build and measure | |
| working-directory: Benchmarks/PerformanceBenchmarks | |
| run: pnpm --silent measure -- --iterations 5 > benchmark-results.json | |
| - name: Upload benchmark results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: perf-benchmark-results | |
| path: Benchmarks/PerformanceBenchmarks/benchmark-results.json | |
| # On push to main / schedule: store results directly (has write permissions) | |
| - name: Store benchmark results | |
| if: github.event_name != 'pull_request' | |
| uses: benchmark-action/github-action-benchmark@v1 | |
| with: | |
| tool: customSmallerIsBetter | |
| output-file-path: Benchmarks/PerformanceBenchmarks/benchmark-results.json | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| gh-pages-branch: benchmark-data | |
| benchmark-data-dir-path: perf-benchmarks | |
| auto-push: true | |
| comment-on-alert: true | |
| alert-threshold: "110%" | |
| fail-on-alert: false |