Skip to content

Commit

Permalink
ci(workflow): loosen condtions for uploading turbopack bytesize
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj committed Jun 6, 2023
1 parent c2d7bbd commit 32da8fc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,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 @@ -245,18 +246,18 @@ jobs:
# Trying to upload metrics for the Turbopack to datadog's CI pipeline execution
- name: 'Upload turbopack build metrics'
shell: bash
if: ${{ needs.build.outputs.isRelease == 'true' }}
continue-on-error: true
run: |
npm install -g @datadog/datadog-ci
shopt -s nullglob
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"
datadog-ci metric --no-fail --level pipeline --metrics "turbopack.bytesize:$BYTESIZE"
done
- name: Upload artifact
Expand Down

0 comments on commit 32da8fc

Please sign in to comment.