|
24 | 24 | - '!dependabot/**' |
25 | 25 | paths: |
26 | 26 | - '.dockerignore' |
| 27 | + - '.github/workflows/check_labels.yml' |
27 | 28 | - '.github/workflows/cpp_extra.yml' |
| 29 | + - '.github/workflows/report_ci.yml' |
28 | 30 | - 'ci/conda_env_*' |
29 | 31 | - 'ci/docker/**' |
30 | 32 | - 'ci/scripts/ccache_setup.sh' |
|
43 | 45 | pull_request: |
44 | 46 | paths: |
45 | 47 | - '.dockerignore' |
| 48 | + - '.github/workflows/check_labels.yml' |
46 | 49 | - '.github/workflows/cpp_extra.yml' |
| 50 | + - '.github/workflows/report_ci.yml' |
47 | 51 | - 'ci/conda_env_*' |
48 | 52 | - 'ci/docker/**' |
49 | 53 | - 'ci/scripts/ccache_setup.sh' |
@@ -75,53 +79,19 @@ permissions: |
75 | 79 |
|
76 | 80 | jobs: |
77 | 81 | check-labels: |
78 | | - name: Check labels |
79 | | - runs-on: ubuntu-latest |
80 | | - timeout-minutes: 5 |
81 | | - outputs: |
82 | | - ci-extra: ${{ steps.check.outputs.ci-extra }} |
83 | | - steps: |
84 | | - - name: Checkout Arrow |
85 | | - if: github.event_name == 'pull_request' |
86 | | - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
87 | | - - name: Check |
88 | | - id: check |
89 | | - env: |
90 | | - GH_TOKEN: ${{ github.token }} |
91 | | - run: | |
92 | | - case "${GITHUB_EVENT_NAME}" in |
93 | | - push|schedule) |
94 | | - ci_extra=true |
95 | | - ;; |
96 | | - pull_request) |
97 | | - n_ci_extra_labels=$( |
98 | | - gh pr view ${{ github.event.number }} \ |
99 | | - --jq '.labels[].name | select(. == "CI: Extra")' \ |
100 | | - --json labels \ |
101 | | - --repo ${GITHUB_REPOSITORY} | wc -l) |
102 | | - if [ "${n_ci_extra_labels}" -eq 1 ]; then |
103 | | - ci_extra=true |
104 | | - else |
105 | | - git fetch origin ${GITHUB_BASE_REF} |
106 | | - if git diff --stat origin/${GITHUB_BASE_REF}.. | \ |
107 | | - grep \ |
108 | | - --fixed-strings ".github/workflows/cpp_extra.yml" \ |
109 | | - --quiet; then |
110 | | - ci_extra=true |
111 | | - else |
112 | | - ci_extra=false |
113 | | - fi |
114 | | - fi |
115 | | - ;; |
116 | | - esac |
117 | | -
|
118 | | - echo "ci-extra=${ci_extra}" >> "${GITHUB_OUTPUT}" |
| 82 | + uses: ./.github/workflows/check_labels.yml |
| 83 | + secrets: inherit |
| 84 | + with: |
| 85 | + parent-workflow: cpp_extra |
119 | 86 |
|
120 | 87 | docker: |
121 | 88 | needs: check-labels |
122 | 89 | name: ${{ matrix.title }} |
123 | 90 | runs-on: ${{ matrix.runs-on }} |
124 | | - if: needs.check-labels.outputs.ci-extra == 'true' |
| 91 | + if: >- |
| 92 | + needs.check-labels.outputs.force == 'true' || |
| 93 | + contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra') || |
| 94 | + contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra: C++') |
125 | 95 | timeout-minutes: 75 |
126 | 96 | strategy: |
127 | 97 | fail-fast: false |
@@ -198,7 +168,10 @@ jobs: |
198 | 168 | needs: check-labels |
199 | 169 | name: JNI macOS |
200 | 170 | runs-on: macos-14 |
201 | | - if: needs.check-labels.outputs.ci-extra == 'true' |
| 171 | + if: >- |
| 172 | + needs.check-labels.outputs.force == 'true' || |
| 173 | + contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra') || |
| 174 | + contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra: C++') |
202 | 175 | timeout-minutes: 45 |
203 | 176 | env: |
204 | 177 | MACOSX_DEPLOYMENT_TARGET: "14.0" |
@@ -280,58 +253,8 @@ jobs: |
280 | 253 | ../minimal_build.build/arrow-example |
281 | 254 |
|
282 | 255 | report-extra-cpp: |
283 | | - runs-on: ubuntu-latest |
284 | 256 | needs: |
285 | 257 | - docker |
286 | 258 | - jni-macos |
287 | | - # We don't have the job id as part of the context neither the job name. |
288 | | - # The GitHub API exposes numeric id or job name but not the github.job (report-extra-cpp). |
289 | | - # We match github.job to the name so we can pass it via context in order to be ignored on the report. |
290 | | - # The job is still running. |
291 | | - name: ${{ github.job }} |
292 | | - if: github.event_name == 'schedule' && always() |
293 | | - steps: |
294 | | - - name: Checkout Arrow |
295 | | - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
296 | | - with: |
297 | | - fetch-depth: 0 |
298 | | - - name: Setup Python |
299 | | - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 |
300 | | - with: |
301 | | - python-version: 3 |
302 | | - - name: Setup Archery |
303 | | - run: python3 -m pip install -e dev/archery[crossbow] |
304 | | - - name: Prepare common options |
305 | | - run: | |
306 | | - if [ "${GITHUB_REPOSITORY}" = "apache/arrow" ]; then |
307 | | - echo "COMMON_OPTIONS=--send" >> "${GITHUB_ENV}" |
308 | | - else |
309 | | - echo "COMMON_OPTIONS=--dry-run" >> "${GITHUB_ENV}" |
310 | | - fi |
311 | | - - name: Send email |
312 | | - env: |
313 | | - GH_TOKEN: ${{ github.token }} |
314 | | - SMTP_PASSWORD: ${{ secrets.ARROW_SMTP_PASSWORD }} |
315 | | - run: | |
316 | | - archery ci report-email \ |
317 | | - --ignore ${{ github.job }} \ |
318 | | - --recipient-email '[email protected]' \ |
319 | | - --repository ${{ github.repository }} \ |
320 | | - --sender-email '[email protected]' \ |
321 | | - --sender-name Arrow \ |
322 | | - --smtp-port 587 \ |
323 | | - --smtp-server 'commit-email.info' \ |
324 | | - --smtp-user arrow \ |
325 | | - ${COMMON_OPTIONS} \ |
326 | | - ${{ github.run_id }} |
327 | | - - name: Send chat message |
328 | | - if: always() |
329 | | - env: |
330 | | - GH_TOKEN: ${{ github.token }} |
331 | | - CHAT_WEBHOOK: ${{ secrets.ARROW_ZULIP_WEBHOOK }} |
332 | | - run: | |
333 | | - archery ci report-chat \ |
334 | | - --ignore ${{ github.job }} \ |
335 | | - --repository ${{ github.repository }} \ |
336 | | - ${COMMON_OPTIONS} \ |
337 | | - ${{ github.run_id }} |
| 259 | + uses: ./.github/workflows/report_ci.yml |
| 260 | + secrets: inherit |
0 commit comments