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 Jun 1, 2023
1 parent 38d9d2e commit aae92b9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,22 @@ jobs:
run: ${{ matrix.settings.build }}
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' }}
Expand Down

0 comments on commit aae92b9

Please sign in to comment.