@@ -137,6 +137,8 @@ jobs:
137
137
- *shared
138
138
- 'packages/node/**'
139
139
- 'packages/profiling-node/**'
140
+ profiling_node_bindings:
141
+ - 'packages/profiling-node/bindings/**'
140
142
deno:
141
143
- *shared
142
144
- *browser
@@ -155,6 +157,7 @@ jobs:
155
157
changed_remix : ${{ steps.changed.outputs.remix }}
156
158
changed_node : ${{ steps.changed.outputs.node }}
157
159
changed_profiling_node : ${{ steps.changed.outputs.profiling_node }}
160
+ changed_profiling_node_bindings : ${{ steps.changed.outputs.profiling_node_bindings }}
158
161
changed_deno : ${{ steps.changed.outputs.deno }}
159
162
changed_browser : ${{ steps.changed.outputs.browser }}
160
163
changed_browser_integration : ${{ steps.changed.outputs.browser_integration }}
@@ -976,13 +979,20 @@ jobs:
976
979
- name : Build tarballs
977
980
run : yarn build:tarball --ignore @sentry/profiling-node
978
981
979
- # Rebuild profiling by compiling TS and pulling the precompiled binaries
982
+ # Rebuild profiling by compiling TS and pull the precompiled binary artifacts
980
983
- name : Build Profiling Node
984
+ if : |
985
+ (needs.job_get_metadata.outputs.changed_profiling_node_bindings == 'true') ||
986
+ (needs.job_get_metadata.outputs.is_release == 'true') ||
987
+ (github.event_name != 'pull_request')
981
988
run : yarn lerna run build:lib --scope @sentry/profiling-node
982
989
983
990
- name : Extract Profiling Node Prebuilt Binaries
984
991
# @TODO: v4 breaks convenient merging of same name artifacts
985
992
# https://github.com/actions/upload-artifact/issues/478
993
+ if : |
994
+ (needs.job_get_metadata.outputs.changed_profiling_node_bindings == 'true') ||
995
+ (github.event_name != 'pull_request')
986
996
uses : actions/download-artifact@v3
987
997
with :
988
998
name : profiling-node-binaries-${{ github.sha }}
@@ -1086,13 +1096,20 @@ jobs:
1086
1096
env :
1087
1097
DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
1088
1098
1089
- # Rebuild profiling by compiling TS and pulling the precompiled binaries
1099
+ # Rebuild profiling by compiling TS and pull the precompiled binary artifacts
1090
1100
- name : Build Profiling Node
1101
+ if : |
1102
+ (needs.job_get_metadata.outputs.changed_profiling_node_bindings == 'true') ||
1103
+ (needs.job_get_metadata.outputs.is_release == 'true') ||
1104
+ (github.event_name != 'pull_request')
1091
1105
run : yarn lerna run build:lib --scope @sentry/profiling-node
1092
1106
1093
1107
- name : Extract Profiling Node Prebuilt Binaries
1094
1108
# @TODO: v4 breaks convenient merging of same name artifacts
1095
1109
# https://github.com/actions/upload-artifact/issues/478
1110
+ if : |
1111
+ (needs.job_get_metadata.outputs.changed_profiling_node_bindings == 'true') ||
1112
+ (github.event_name != 'pull_request')
1096
1113
uses : actions/download-artifact@v3
1097
1114
with :
1098
1115
name : profiling-node-binaries-${{ github.sha }}
@@ -1226,9 +1243,9 @@ jobs:
1226
1243
name : Compile & Test Profiling Bindings (v${{ matrix.node }}) ${{ matrix.target_platform || matrix.os }}, ${{ matrix.node || matrix.container }}, ${{ matrix.arch || matrix.container }}, ${{ contains(matrix.container, 'alpine') && 'musl' || 'glibc' }}
1227
1244
needs : [job_get_metadata, job_install_deps, job_build]
1228
1245
# Compiling bindings can be very slow (especially on windows), so only run precompile
1229
- # if profiling or profiling node package had changed or if we are on a release branch.
1246
+ # Skip precompile unless we are on a release branch as precompile slows down CI times .
1230
1247
if : |
1231
- (needs.job_get_metadata.outputs.changed_profiling_node == 'true') ||
1248
+ (needs.job_get_metadata.outputs.changed_profiling_node_bindings == 'true') ||
1232
1249
(needs.job_get_metadata.outputs.is_release == 'true') ||
1233
1250
(github.event_name != 'pull_request')
1234
1251
runs-on : ${{ matrix.os }}
0 commit comments