Skip to content

Commit 93784ea

Browse files
committed
fix it even more...
1 parent a31aa65 commit 93784ea

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

.github/workflows/build.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,18 @@ jobs:
8484
echo "COMMIT_SHA=$COMMIT_SHA" >> $GITHUB_ENV
8585
echo "COMMIT_MESSAGE=$(git log -n 1 --pretty=format:%s $COMMIT_SHA)" >> $GITHUB_ENV
8686
87+
# Most changed packages are determined in job_build via Nx
88+
# However, for profiling-node we only want to run certain things when in this specific package
89+
# something changed, not in any of the dependencies (which include core, utils, ...)
90+
- name: Determine changed packages
91+
uses: dorny/[email protected]
92+
id: changed
93+
with:
94+
filters: |
95+
profiling_node:
96+
- 'packages/profiling-node/**'
97+
- 'dev-packages/e2e-tests/test-applications/node-profiling/**'
98+
8799
- name: Get PR labels
88100
id: pr-labels
89101
uses: mydea/pr-labels-action@fn/bump-node20
@@ -93,6 +105,7 @@ jobs:
93105
# Note: These next three have to be checked as strings ('true'/'false')!
94106
is_develop: ${{ github.ref == 'refs/heads/develop' }}
95107
is_release: ${{ startsWith(github.ref, 'refs/heads/release/') }}
108+
changed_profiling_node: ${{ steps.changed.outputs.profiling_node == 'true' }}
96109
# When merging into master, or from master
97110
is_gitflow_sync: ${{ github.head_ref == 'master' || github.ref == 'refs/heads/master' }}
98111
has_gitflow_label:
@@ -184,10 +197,10 @@ jobs:
184197
changed_node_integration: ${{ contains(steps.checkForAffected.outputs.affected, '@sentry-internal/node-integration-tests') }}
185198
changed_remix: ${{ contains(steps.checkForAffected.outputs.affected, '@sentry/remix') }}
186199
changed_node: ${{ contains(steps.checkForAffected.outputs.affected, '@sentry/node') }}
187-
changed_profiling_node: ${{ contains(steps.checkForAffected.outputs.affected, '@sentry/profiling-node') }}
188200
changed_deno: ${{ contains(steps.checkForAffected.outputs.affected, '@sentry/deno') }}
189201
changed_bun: ${{ contains(steps.checkForAffected.outputs.affected, '@sentry/bun') }}
190202
changed_browser_integration: ${{ contains(steps.checkForAffected.outputs.affected, '@sentry-internal/browser-integration-tests') }}
203+
# If you are looking for changed_profiling_node, this is defined in job_get_metadata
191204

192205
job_check_branches:
193206
name: Check PR branches
@@ -486,7 +499,7 @@ jobs:
486499
job_profiling_node_unit_tests:
487500
name: Node Profiling Unit Tests
488501
needs: [job_get_metadata, job_build]
489-
if: needs.job_build.outputs.changed_node == 'true' || needs.job_build.outputs.changed_profiling_node == 'true' || github.event_name != 'pull_request'
502+
if: needs.job_build.outputs.changed_node == 'true' || needs.job_get_metadata.outputs.changed_profiling_node == 'true' || github.event_name != 'pull_request'
490503
runs-on: ubuntu-latest
491504
timeout-minutes: 10
492505
steps:
@@ -809,7 +822,7 @@ jobs:
809822
# Rebuild profiling by compiling TS and pull the precompiled binary artifacts
810823
- name: Build Profiling Node
811824
if: |
812-
(needs.job_build.outputs.changed_profiling_node == 'true') ||
825+
(needs.job_get_metadata.outputs.changed_profiling_node == 'true') ||
813826
(needs.job_get_metadata.outputs.is_release == 'true') ||
814827
(github.event_name != 'pull_request')
815828
run: yarn lerna run build:lib --scope @sentry/profiling-node
@@ -818,7 +831,7 @@ jobs:
818831
# @TODO: v4 breaks convenient merging of same name artifacts
819832
# https://github.com/actions/upload-artifact/issues/478
820833
if: |
821-
(needs.job_build.outputs.changed_profiling_node == 'true') ||
834+
(needs.job_get_metadata.outputs.changed_profiling_node == 'true') ||
822835
(needs.job_get_metadata.outputs.is_release == 'true') ||
823836
(github.event_name != 'pull_request')
824837
uses: actions/download-artifact@v3
@@ -1105,7 +1118,7 @@ jobs:
11051118
always() && needs.job_e2e_prepare.result == 'success' &&
11061119
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
11071120
(
1108-
(needs.job_build.outputs.changed_profiling_node == 'true') ||
1121+
(needs.job_get_metadata.outputs.changed_profiling_node == 'true') ||
11091122
(needs.job_get_metadata.outputs.is_release == 'true') ||
11101123
(github.event_name != 'pull_request')
11111124
)
@@ -1259,7 +1272,7 @@ jobs:
12591272
# Compiling bindings can be very slow (especially on windows), so only run precompile
12601273
# Skip precompile unless we are on a release branch as precompile slows down CI times.
12611274
if: |
1262-
(needs.job_build.outputs.changed_profiling_node == 'true') ||
1275+
(needs.job_get_metadata.outputs.changed_profiling_node == 'true') ||
12631276
(needs.job_get_metadata.outputs.is_release == 'true') ||
12641277
(github.event_name != 'pull_request')
12651278
runs-on: ${{ matrix.os }}

0 commit comments

Comments
 (0)