File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77permissions :
88 contents : write
9+ pull-requests : read
910
1011env :
1112 CARGO_TERM_COLOR : always
1213 CARGO_TARGET_DIR : target
1314
1415jobs :
16+ detect_changes :
17+ name : Select CLI matrix
18+ runs-on : ubuntu-latest
19+ outputs :
20+ os : ${{ steps.select.outputs.os }}
21+ steps :
22+ - uses : dorny/paths-filter@v3
23+ id : changes
24+ with :
25+ filters : |
26+ vm_jit:
27+ - 'src/vm/jit/**'
28+ - 'src/vm/native/**'
29+ - 'src/vm/mod.rs'
30+ - 'src/builtins/runtime/jit.rs'
31+ - 'tests/jit/**'
32+ - 'tests/jit_tests.rs'
33+ - id : select
34+ env :
35+ VM_JIT_CHANGED : ${{ steps.changes.outputs.vm_jit }}
36+ shell : bash
37+ run : |
38+ if [[ "$VM_JIT_CHANGED" == "true" ]]; then
39+ echo 'os=["ubuntu-latest","macos-latest","windows-latest"]' >> "$GITHUB_OUTPUT"
40+ else
41+ echo 'os=["ubuntu-latest"]' >> "$GITHUB_OUTPUT"
42+ fi
43+
1544 rust :
1645 name : Rust lint and tests
1746 runs-on : ubuntu-latest
@@ -41,11 +70,12 @@ jobs:
4170
4271 pd-vm-cli :
4372 name : pd-vm CLI (${{ matrix.os }})
73+ needs : detect_changes
4474 runs-on : ${{ matrix.os }}
4575 strategy :
4676 fail-fast : false
4777 matrix :
48- os : [ubuntu-latest, macos-latest, windows-latest]
78+ os : ${{ fromJSON(needs.detect_changes.outputs.os) }}
4979 steps :
5080 - uses : actions/checkout@v4
5181 with :
You can’t perform that action at this time.
0 commit comments