Update bench results #206
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: Run benchmark and commit results | |
| permissions: | |
| contents: write | |
| on: | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - "bench/**" | |
| - "schemas/**" | |
| workflow_dispatch: | |
| jobs: | |
| build-schemas: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup environment | |
| uses: ./.github/actions/environments | |
| - name: Build schemas | |
| shell: bash | |
| env: | |
| TTSC_CACHE_DIR: ${{ runner.temp }}/ttsc-cache | |
| TTSC_GO_CACHE_DIR: ${{ runner.temp }}/ttsc-go-build | |
| run: pnpm schemas:build | |
| - name: Upload schemas | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: schemas-build | |
| path: schemas/dist/ | |
| retention-days: 1 | |
| bench-stack: | |
| needs: build-schemas | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Download schemas | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: schemas-build | |
| path: schemas/dist/ | |
| - name: Setup environment | |
| uses: ./.github/actions/environments | |
| - name: Run stack benchmark | |
| run: pnpm bench:stack | |
| - name: Upload stack results | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: stack-results | |
| path: bench/stack.json | |
| bench-download: | |
| needs: build-schemas | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Download schemas | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: schemas-build | |
| path: schemas/dist/ | |
| - name: Setup environment | |
| uses: ./.github/actions/environments | |
| - name: Run download benchmark | |
| env: | |
| TTSC_CACHE_DIR: ${{ runner.temp }}/ttsc-cache | |
| TTSC_GO_CACHE_DIR: ${{ runner.temp }}/ttsc-go-build | |
| run: pnpm bench:download | |
| - name: Upload download results | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: download-results | |
| path: | | |
| bench/download.json | |
| schemas/libraries/**/download_compiled/** | |
| bench-bench: | |
| needs: build-schemas | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Download schemas | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: schemas-build | |
| path: schemas/dist/ | |
| - name: Setup environment | |
| uses: ./.github/actions/environments | |
| - name: Run bench benchmark | |
| run: pnpm bench:bench | |
| - name: Upload bench results | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: bench-results | |
| path: bench/bench.json | |
| collect-results: | |
| needs: [bench-stack, bench-download, bench-bench] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - parallel: | |
| - name: Download bench results | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: bench-results | |
| path: bench | |
| - name: Download stack results | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: stack-results | |
| path: bench | |
| - name: Download download results | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: download-results | |
| path: . | |
| - name: Commit & Push changes | |
| uses: actions-js/push@master | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: main | |
| message: "Update bench results" |