|
26 | 26 | with-svelte-example: ${{ steps.filter.outputs.with-svelte-example }} |
27 | 27 | with-tailwind-example: ${{ steps.filter.outputs.with-tailwind-example }} |
28 | 28 | rest: ${{ steps.filter.outputs.rest }} |
| 29 | + rust: ${{ steps.filter.outputs.rust }} |
29 | 30 | native-lib: ${{ steps.filter.outputs.native-lib }} |
30 | 31 | steps: |
31 | 32 | - name: Checkout |
@@ -107,11 +108,25 @@ jobs: |
107 | 108 | echo "No changes outside examples/ and docs/ directories" |
108 | 109 | fi |
109 | 110 |
|
| 111 | + # Detect if Rust/core code changed (requires Rust tests + integration tests) |
| 112 | + # This excludes JS-only changes like packages/*, lockfile, etc. |
| 113 | + RUST_PATTERNS="^(crates/|cli/|Cargo\.|rust-toolchain|\.cargo/|turborepo-tests/)" |
| 114 | + RUST_CHANGES=$(echo "$CHANGED_FILES" | grep -E "$RUST_PATTERNS" || true) |
| 115 | +
|
| 116 | + if [ -n "$RUST_CHANGES" ]; then |
| 117 | + echo "rust=true" >> $GITHUB_OUTPUT |
| 118 | + echo "Rust/core changes detected:" |
| 119 | + echo "$RUST_CHANGES" |
| 120 | + else |
| 121 | + echo "rust=false" >> $GITHUB_OUTPUT |
| 122 | + echo "No Rust/core changes detected (JS-only change)" |
| 123 | + fi |
| 124 | +
|
110 | 125 | generate-integration-test-matrix: |
111 | 126 | name: Generate integration test matrix |
112 | 127 | needs: |
113 | 128 | - find-changes |
114 | | - if: ${{ needs.find-changes.outputs.rest == 'true' }} |
| 129 | + if: ${{ needs.find-changes.outputs.rust == 'true' }} |
115 | 130 | runs-on: ubuntu-latest |
116 | 131 | timeout-minutes: 30 |
117 | 132 | outputs: |
@@ -142,7 +157,7 @@ jobs: |
142 | 157 | - generate-integration-test-matrix |
143 | 158 | runs-on: ${{ matrix.os.runner }} |
144 | 159 | timeout-minutes: 30 |
145 | | - if: ${{ needs.find-changes.outputs.rest == 'true' && needs.generate-integration-test-matrix.result == 'success' }} |
| 160 | + if: ${{ needs.find-changes.outputs.rust == 'true' && needs.generate-integration-test-matrix.result == 'success' }} |
146 | 161 | env: |
147 | 162 | SCCACHE_BUCKET: turborepo-sccache |
148 | 163 | SCCACHE_REGION: us-east-2 |
@@ -221,7 +236,7 @@ jobs: |
221 | 236 | name: "@turbo/types codegen check" |
222 | 237 | needs: |
223 | 238 | - find-changes |
224 | | - if: ${{ needs.find-changes.outputs.rest == 'true' }} |
| 239 | + if: ${{ needs.find-changes.outputs.rust == 'true' }} |
225 | 240 | runs-on: ubuntu-latest |
226 | 241 | timeout-minutes: 30 |
227 | 242 | steps: |
@@ -265,7 +280,7 @@ jobs: |
265 | 280 | timeout-minutes: 30 |
266 | 281 | needs: |
267 | 282 | - find-changes |
268 | | - if: ${{ needs.find-changes.outputs.rest == 'true' }} |
| 283 | + if: ${{ needs.find-changes.outputs.rust == 'true' }} |
269 | 284 | name: Rust testing on ${{ matrix.os.name }} (partition ${{ matrix.partition }}/2) |
270 | 285 | env: |
271 | 286 | SCCACHE_BUCKET: turborepo-sccache |
@@ -334,7 +349,7 @@ jobs: |
334 | 349 | timeout-minutes: 45 |
335 | 350 | needs: |
336 | 351 | - find-changes |
337 | | - if: ${{ needs.find-changes.outputs.rest == 'true' }} |
| 352 | + if: ${{ needs.find-changes.outputs.rust == 'true' }} |
338 | 353 | name: Rust testing on ubuntu (partition ${{ matrix.partition }}/2) |
339 | 354 | env: |
340 | 355 | SCCACHE_BUCKET: turborepo-sccache |
@@ -408,7 +423,7 @@ jobs: |
408 | 423 | needs: |
409 | 424 | - find-changes |
410 | 425 | - rust_test_ubuntu |
411 | | - if: ${{ needs.find-changes.outputs.rest == 'true' }} |
| 426 | + if: ${{ needs.find-changes.outputs.rust == 'true' }} |
412 | 427 | env: |
413 | 428 | COVERAGE_API_URL: ${{ secrets.COVERAGE_API_URL }} |
414 | 429 | steps: |
|
0 commit comments