4848 ${{ github.workspace }}/packages/utils/cjs
4949 ${{ github.workspace }}/packages/utils/esm
5050
51- BUILD_CACHE_KEY : ${{ github.event.inputs.commit || github.sha }}
52- BUILD_PROFILING_NODE_CACHE_TARBALL_KEY : profiling-node- tarball-${{ github.event.inputs.commit || github.sha }}
51+ BUILD_CACHE_KEY : build-cache- ${{ github.event.inputs.commit || github.sha }}
52+ BUILD_CACHE_TARBALL_KEY : tarball-${{ github.event.inputs.commit || github.sha }}
5353
5454 # GH will use the first restore-key it finds that matches
5555 # So it will start by looking for one from the same branch, else take the newest one it can find elsewhere
8383 echo "COMMIT_MESSAGE=$(git log -n 1 --pretty=format:%s $COMMIT_SHA)" >> $GITHUB_ENV
8484
8585 - name : Determine changed packages
86- 86+ 8787 id : changed
8888 with :
8989 filters : |
@@ -267,17 +267,12 @@ jobs:
267267 needs.job_get_metadata.outputs.force_skip_cache == 'false'
268268 with :
269269 path : .nxcache
270- key : nx-Linux-${{ github.ref }}-${{ env.HEAD_COMMIT }}
270+ key : nx-Linux-${{ github.ref }}-${{ env.HEAD_COMMIT || github.sha }}
271271 # On develop branch, we want to _store_ the cache (so it can be used by other branches), but never _restore_ from it
272272 restore-keys :
273273 ${{needs.job_get_metadata.outputs.is_develop == 'false' && env.NX_CACHE_RESTORE_KEYS || 'nx-never-restore'}}
274274
275275 - name : Build packages
276- # Under normal circumstances, using the git SHA as a cache key, there shouldn't ever be a cache hit on the built
277- # packages, and so `yarn build` should always run. This `if` check is therefore only there for testing CI issues
278- # where the built packages are beside the point. In that case, you can change `BUILD_CACHE_KEY` (at the top of
279- # this file) to a constant and skip rebuilding all of the packages each time CI runs.
280- if : steps.cache_built_packages.outputs.cache-hit == ''
281276 run : yarn build
282277 outputs :
283278 # this needs to be passed on, because the `needs` context only looks at direct ancestors (so steps which depend on
@@ -407,15 +402,15 @@ jobs:
407402 uses : ./.github/actions/restore-cache
408403 env :
409404 DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
410- - name : Pack tarballs
411- # Profiling tarball is built separately as we assemble the precompiled binaries
412- run : yarn build:tarball --ignore @sentry/profiling-node
413405
414- - name : Restore profiling tarball
415- uses : actions/cache/restore@v4
406+ - name : Extract Profiling Node Prebuilt Binaries
407+ uses : actions/download-artifact@v3
416408 with :
417- key : ${{ env.BUILD_PROFILING_NODE_CACHE_TARBALL_KEY }}
418- path : ${{ github.workspace }}/packages/*/*.tgz
409+ name : profiling-node-binaries-${{ github.sha }}
410+ path : ${{ github.workspace }}/packages/profiling-node/lib/
411+
412+ - name : Pack tarballs
413+ run : yarn build:tarball
419414
420415 - name : Archive artifacts
421416 uses : actions/upload-artifact@v4
@@ -625,7 +620,7 @@ jobs:
625620 name : Playwright (${{ matrix.bundle }}${{ matrix.shard && format(' {0}/{1}', matrix.shard, matrix.shards) || ''}}) Tests
626621 needs : [job_get_metadata, job_build]
627622 if : needs.job_get_metadata.outputs.changed_browser_integration == 'true' || github.event_name != 'pull_request'
628- runs-on : ubuntu-20.04-large-js
623+ runs-on : ubuntu-20.04
629624 timeout-minutes : 25
630625 strategy :
631626 fail-fast : false
@@ -788,7 +783,7 @@ jobs:
788783 name : Browser (${{ matrix.browser }}) Tests
789784 needs : [job_get_metadata, job_build]
790785 if : needs.job_get_metadata.outputs.changed_browser == 'true' || github.event_name != 'pull_request'
791- runs-on : ubuntu-20.04-large-js
786+ runs-on : ubuntu-20.04
792787 timeout-minutes : 20
793788 strategy :
794789 fail-fast : false
@@ -990,8 +985,6 @@ jobs:
990985 key : nx-Linux-${{ github.ref }}-${{ env.HEAD_COMMIT }}
991986 # On develop branch, we want to _store_ the cache (so it can be used by other branches), but never _restore_ from it
992987 restore-keys : ${{ env.NX_CACHE_RESTORE_KEYS }}
993- - name : Build tarballs
994- run : yarn build:tarball --ignore @sentry/profiling-node
995988
996989 # Rebuild profiling by compiling TS and pull the precompiled binary artifacts
997990 - name : Build Profiling Node
@@ -1006,21 +999,22 @@ jobs:
1006999 # https://github.com/actions/upload-artifact/issues/478
10071000 if : |
10081001 (needs.job_get_metadata.outputs.changed_profiling_node_bindings == 'true') ||
1002+ (needs.job_get_metadata.outputs.is_release == 'true') ||
10091003 (github.event_name != 'pull_request')
10101004 uses : actions/download-artifact@v3
10111005 with :
10121006 name : profiling-node-binaries-${{ github.sha }}
10131007 path : ${{ github.workspace }}/packages/profiling-node/lib/
10141008
10151009 - name : Build Profiling tarball
1016- run : yarn build:tarball --scope @sentry/profiling-node
1010+ run : yarn build:tarball
10171011 # End rebuild profiling
10181012
10191013 - name : Stores tarballs in cache
10201014 uses : actions/cache/save@v4
10211015 with :
10221016 path : ${{ github.workspace }}/packages/*/*.tgz
1023- key : ${{ env.BUILD_PROFILING_NODE_CACHE_TARBALL_KEY }}
1017+ key : ${{ env.BUILD_CACHE_TARBALL_KEY }}
10241018
10251019 job_e2e_tests :
10261020 name : E2E ${{ matrix.label || matrix.test-application }} Test
@@ -1116,7 +1110,7 @@ jobs:
11161110 uses : actions/cache/restore@v4
11171111 with :
11181112 path : ${{ github.workspace }}/packages/*/*.tgz
1119- key : ${{ env.BUILD_PROFILING_NODE_CACHE_TARBALL_KEY }}
1113+ key : ${{ env.BUILD_CACHE_TARBALL_KEY }}
11201114
11211115 - name : Get node version
11221116 id : versions
@@ -1207,13 +1201,13 @@ jobs:
12071201 with :
12081202 name : profiling-node-binaries-${{ github.sha }}
12091203 path : ${{ github.workspace }}/packages/profiling-node/lib/
1210- - name : Build Profiling tarball
1211- run : yarn build:tarball --scope @sentry/profiling-node
1204+
12121205 - name : Restore tarball cache
12131206 uses : actions/cache/restore@v4
12141207 with :
12151208 path : ${{ github.workspace }}/packages/*/*.tgz
1216- key : ${{ env.BUILD_PROFILING_NODE_CACHE_TARBALL_KEY }}
1209+ key : ${{ env.BUILD_CACHE_TARBALL_KEY }}
1210+ fail-on-cache-miss : true
12171211
12181212 - name : Get node version
12191213 id : versions
0 commit comments