Skip to content

Commit

Permalink
ci(workflow): upload Turbopack bytesize to datadog pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj committed May 31, 2023
1 parent 503ae88 commit 06d3cd4
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/build_and_deploy.yml
Expand Up @@ -305,6 +305,7 @@ jobs:
TURBO_TEAM: 'vercel'
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_REMOTE_ONLY: 'true'
DATADOG_API_KEY: ${{ secrets.DATA_DOG_API_KEY }}
steps:
# https://github.com/actions/virtual-environments/issues/1187
- name: tune linux network
Expand Down Expand Up @@ -374,6 +375,22 @@ jobs:
if: ${{ !matrix.settings.docker }}
shell: bash

# Trying to upload metrics for the Turbopack to datadog's CI pipeline execution
- name: 'Upload turbopack build metrics'
shell: bash
continue-on-error: true
run: |
npm install -g @datadog/datadog-ci
for filename in packages/next-swc/native/next-swc.*.node; do
# Strip out filename to extract target triple
export FILENAME=$(basename ${filename})
export FILENAME=${FILENAME#*.}
export FILENAME=${FILENAME%.node}
export BYTESIZE=$(wc -c < $filename | xargs)
echo "Reporting $FILENAME:$BYTESIZE for Turbopack bytesize"
datadog-ci metric --no-fail --level pipeline --metrics "turbopack.bytesize.$FILENAME:$BYTESIZE"
done
- name: Upload artifact
if: ${{ needs.build.outputs.isRelease == 'true' }}
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 06d3cd4

Please sign in to comment.