Benchmark Turborepo #245
Workflow file for this run
This file contains 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 Turborepo | |
on: | |
workflow_dispatch: | |
workflow_run: | |
# Make sure this matches the name of the workflow in ./github/workflows/turborepo-release.yml. | |
workflows: [Turborepo Release] | |
types: | |
- completed | |
jobs: | |
benchmark: | |
name: Run Benchmarks | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup-node | |
- uses: ./.github/actions/setup-go | |
with: | |
github-token: "${{ secrets.GITHUB_TOKEN }}" | |
- uses: ./.github/actions/setup-turborepo-environment | |
with: | |
target: ubuntu-latest | |
github-token: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Build | |
run: cd cli && make turbo-prod | |
- name: Run benchmarks | |
run: pnpm -F benchmark benchmark | |
- name: Save to Tinybird | |
run: | | |
curl \ | |
-i \ | |
-F "ndjson=@./benchmark/tinybird.ndjson" \ | |
-X POST \ | |
-H 'Authorization: Bearer ${{ secrets.TINYBIRD_TOKEN }}' \ | |
'https://api.us-east.tinybird.co/v0/datasources?format=ndjson&name=turbo_benchmarks&mode=append' | |
time-to-first-task: | |
name: Time to First Task | |
timeout-minutes: 60 | |
runs-on: ${{ matrix.os.runner }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- name: ubuntu | |
runner: ubuntu-latest | |
- name: macos | |
runner: macos-latest | |
- name: windows | |
runner: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup-node | |
- uses: ./.github/actions/setup-go | |
with: | |
github-token: "${{ secrets.GITHUB_TOKEN }}" | |
- uses: ./.github/actions/setup-turborepo-environment | |
with: | |
target: ubuntu-latest | |
github-token: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Build | |
run: cd cli && make turbo-prod | |
- name: Clone Fixture | |
run: cd benchmark && node -r esbuild-register src/setup-ttft.ts | |
- name: Run benchmarks | |
run: pnpm -F benchmark ttft | |
- name: Save to Tinybird | |
run: | | |
myjson=$(cat ./benchmark/ttft.json | jq -c) | |
echo $myjson | |
curl --retry 3 -i -X POST -d "$myjson" -H "Authorization: Bearer ${{ secrets.TINYBIRD_TOKEN }}" https://api.us-east.tinybird.co/v0/events?name=turborepo_perf_ttft |