@@ -62,17 +62,23 @@ jobs:
62
62
matrix : ${{ fromJson(needs.matrix_prep.outputs.MATRIX) }}
63
63
runs-on : ${{ matrix.runs_on }}
64
64
steps :
65
+ # Skipping the entire step would apparently require a separate job, not doing that here.
66
+ # Instead we keep checking for the `matrix.pr_ci` flag.
67
+ # See https://stackoverflow.com/questions/77186893/how-can-i-skip-the-whole-job-for-a-matrix-match-in-github-action
65
68
- uses : actions/checkout@v4
69
+ if : ${{ github.event_name != 'pull_request' || matrix.pr_ci != false }}
66
70
with :
67
71
ref : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || '' }}
68
72
69
73
-
uses :
prefix-dev/[email protected]
74
+ if : ${{ github.event_name != 'pull_request' || matrix.pr_ci != false }}
70
75
with :
71
76
pixi-version : v0.41.4
72
77
environments : cpp
73
78
74
79
- name : Set up Rust
75
80
uses : ./.github/actions/setup-rust
81
+ if : ${{ github.event_name != 'pull_request' || matrix.pr_ci != false }}
76
82
with :
77
83
cache_key : ${{ matrix.cache_key }}
78
84
# Cache will be produced by `reusable_checks/rs-lints`
@@ -82,26 +88,30 @@ jobs:
82
88
83
89
# Workaround for ASAN issues on Github images https://github.com/actions/runner-images/issues/9491
84
90
- name : Fix kernel mmap rnd bits
85
- if : runner.os == 'Linux'
91
+ if : (${{ github.event_name != 'pull_request' || matrix.pr_ci != false }}) && runner.os == 'Linux'
86
92
# Asan in llvm 14 provided in ubuntu 22.04 is incompatible with
87
93
# high-entropy ASLR in much newer kernels that GitHub runners are
88
94
# using leading to random crashes: https://reviews.llvm.org/D148280
89
95
run : sudo sysctl vm.mmap_rnd_bits=28
90
96
91
97
- name : pixi run -e cpp cpp-clean
98
+ if : ${{ github.event_name != 'pull_request' || matrix.pr_ci != false }}
92
99
run : pixi run -e cpp cpp-clean
93
100
94
101
- name : pixi run -e cpp cpp-build-all
102
+ if : ${{ github.event_name != 'pull_request' || matrix.pr_ci != false }}
95
103
run : ${{ matrix.extra_env_vars }} RERUN_WERROR=ON pixi run -e cpp cpp-build-all
96
104
97
105
- name : pixi run -e cpp cpp-test
106
+ if : ${{ github.event_name != 'pull_request' || matrix.pr_ci != false }}
98
107
run : ${{ matrix.extra_env_vars }} RERUN_WERROR=ON pixi run -e cpp cpp-test
99
108
100
109
- name : pixi run -e cpp cpp-build-all-shared-libs
101
110
if : ${{ inputs.CHANNEL == 'nightly' }}
102
111
run : ${{ matrix.extra_env_vars }} RERUN_WERROR=ON pixi run -e cpp cpp-build-all-shared-libs
103
112
104
113
- name : additional_commands
114
+ if : ${{ github.event_name != 'pull_request' || matrix.pr_ci != false }}
105
115
run : ${{ matrix.additional_commands }}
106
116
107
117
cpp-formatting :
0 commit comments