Benchmark #36
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: Benchmark | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| repository_dispatch: | |
| jobs: | |
| benchmark: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v3 | |
| continue-on-error: false | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v1 | |
| continue-on-error: true | |
| - name: Install Dependencies | |
| run: bun install || true | |
| continue-on-error: true | |
| - name: Install JSVU and V8 | |
| run: | | |
| bunx jsvu --os=linux64 --engines=v8 || true | |
| echo "${HOME}/.jsvu/bin" >> $GITHUB_PATH | |
| continue-on-error: true | |
| - name: Install Binaryen | |
| run: sudo apt-get update && sudo apt-get install -y binaryen || true | |
| continue-on-error: true | |
| - name: Run AssemblyScript Benchmarks | |
| run: ./run-bench.as.sh || true | |
| continue-on-error: true | |
| - name: Run JavaScript Benchmarks | |
| run: ./run-bench.js.sh || true | |
| continue-on-error: true | |
| - name: Build Charts | |
| run: | | |
| mkdir -p ./build/charts | |
| bun ./scripts/build-chart01.ts || true | |
| bun ./scripts/build-chart02.ts || true | |
| bun ./scripts/build-chart03.ts || true | |
| continue-on-error: true | |
| - name: Commit Charts to docs branch | |
| continue-on-error: true | |
| run: | | |
| set -e | |
| git config user.name "github-actions" | |
| git config user.email "actions@github.com" | |
| # Ensure the docs branch exists locally | |
| git fetch origin docs || true | |
| if git rev-parse --verify docs >/dev/null 2>&1; then | |
| git branch -D docs || true | |
| fi | |
| git checkout -b docs origin/docs || git checkout --orphan docs || true | |
| # Copy generated charts | |
| mkdir -p charts | |
| cp build/charts/* charts/ || true | |
| git add charts/ || true | |
| git commit -m "Update benchmark charts [skip ci]" || echo "No changes to commit" | |
| git push origin docs --force || true |