|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | + |
| 18 | +name: C++ Extra |
| 19 | + |
| 20 | +on: |
| 21 | + push: |
| 22 | + branches: |
| 23 | + - '**' |
| 24 | + - '!dependabot/**' |
| 25 | + tags: |
| 26 | + - '**' |
| 27 | + paths: |
| 28 | + - '.dockerignore' |
| 29 | + - '.github/workflows/cpp_extra.yml' |
| 30 | + - 'ci/conda_env_*' |
| 31 | + - 'ci/docker/**' |
| 32 | + - 'ci/scripts/cpp_*' |
| 33 | + - 'ci/scripts/install_azurite.sh' |
| 34 | + - 'ci/scripts/install_gcs_testbench.sh' |
| 35 | + - 'ci/scripts/install_minio.sh' |
| 36 | + - 'ci/scripts/msys2_*' |
| 37 | + - 'ci/scripts/util_*' |
| 38 | + - 'cpp/**' |
| 39 | + - 'docker-compose.yml' |
| 40 | + - 'format/Flight.proto' |
| 41 | + - 'testing' |
| 42 | + pull_request: |
| 43 | + paths: |
| 44 | + - '.dockerignore' |
| 45 | + - '.github/workflows/cpp_extra.yml' |
| 46 | + - 'ci/conda_env_*' |
| 47 | + - 'ci/docker/**' |
| 48 | + - 'ci/scripts/cpp_*' |
| 49 | + - 'ci/scripts/install_azurite.sh' |
| 50 | + - 'ci/scripts/install_gcs_testbench.sh' |
| 51 | + - 'ci/scripts/install_minio.sh' |
| 52 | + - 'ci/scripts/msys2_*' |
| 53 | + - 'ci/scripts/util_*' |
| 54 | + - 'cpp/**' |
| 55 | + - 'docker-compose.yml' |
| 56 | + - 'format/Flight.proto' |
| 57 | + - 'testing' |
| 58 | + schedule: |
| 59 | + - cron: | |
| 60 | + 0 0 * * * |
| 61 | +
|
| 62 | +concurrency: |
| 63 | + group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} |
| 64 | + cancel-in-progress: true |
| 65 | + |
| 66 | +permissions: |
| 67 | + contents: read |
| 68 | + pull-requests: write |
| 69 | + |
| 70 | +env: |
| 71 | + ARCHERY_DEBUG: 1 |
| 72 | + ARROW_ENABLE_TIMING_TESTS: OFF |
| 73 | + DOCKER_VOLUME_PREFIX: ".docker/" |
| 74 | + |
| 75 | +jobs: |
| 76 | + check-labels: |
| 77 | + name: Check labels |
| 78 | + runs-on: ubuntu-latest |
| 79 | + timeout-minutes: 5 |
| 80 | + outputs: |
| 81 | + ci-extra: ${{ steps.check.outputs.ci-extra }} |
| 82 | + steps: |
| 83 | + - name: Check |
| 84 | + id: check |
| 85 | + env: |
| 86 | + GH_TOKEN: ${{ github.token }} |
| 87 | + run: | |
| 88 | + case "${GITHUB_EVENT_NAME}" in |
| 89 | + push|workflow_dispatch) |
| 90 | + ci_extra=true |
| 91 | + ;; |
| 92 | + pull_request) |
| 93 | + n_ci_extra_labels=$( |
| 94 | + gh pr view ${{ github.event.number }} \ |
| 95 | + --jq '.labels[].name | select(. == "CI: Extra")' \ |
| 96 | + --json labels \ |
| 97 | + --repo ${GITHUB_REPOSITORY} | wc -l) |
| 98 | + if [ "${n_ci_extra_labels}" -eq 1 ]; then |
| 99 | + ci_extra=true |
| 100 | + else |
| 101 | + ci_extra=false |
| 102 | + fi |
| 103 | + ;; |
| 104 | + esac |
| 105 | +
|
| 106 | + echo "ci-extra=${ci_extra}" >> "${GITHUB_OUTPUT}" |
| 107 | +
|
| 108 | + docker: |
| 109 | + needs: check-labels |
| 110 | + name: ${{ matrix.title }} |
| 111 | + runs-on: ${{ matrix.runs-on }} |
| 112 | + if: needs.check-labels.outputs.ci-extra == 'true' |
| 113 | + timeout-minutes: 75 |
| 114 | + strategy: |
| 115 | + fail-fast: false |
| 116 | + matrix: |
| 117 | + include: |
| 118 | + - run-options: >- |
| 119 | + -e ARROW_USE_MESON=ON |
| 120 | + image: conda-cpp |
| 121 | + runs-on: ubuntu-latest |
| 122 | + title: AMD64 Ubuntu Meson |
| 123 | + steps: |
| 124 | + - name: Debug |
| 125 | + run: | |
| 126 | + echo '${{ toJSON(github) }}' |
| 127 | + - name: Checkout Arrow |
| 128 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 129 | + with: |
| 130 | + fetch-depth: 0 |
| 131 | + submodules: recursive |
| 132 | + - name: Cache Docker Volumes |
| 133 | + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 |
| 134 | + with: |
| 135 | + path: .docker |
| 136 | + key: ${{ matrix.image }}-${{ hashFiles('cpp/**') }} |
| 137 | + restore-keys: ${{ matrix.image }}- |
| 138 | + - name: Setup Python |
| 139 | + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 |
| 140 | + with: |
| 141 | + python-version: 3 |
| 142 | + - name: Setup Archery |
| 143 | + run: python3 -m pip install -e dev/archery[docker] |
| 144 | + - name: Execute Docker Build |
| 145 | + env: |
| 146 | + ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }} |
| 147 | + ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }} |
| 148 | + run: | |
| 149 | + # GH-40558: reduce ASLR to avoid ASAN/LSAN crashes |
| 150 | + sudo sysctl -w vm.mmap_rnd_bits=28 |
| 151 | + source ci/scripts/util_enable_core_dumps.sh |
| 152 | + archery docker run ${{ matrix.run-options || '' }} ${{ matrix.image }} |
| 153 | + - name: Docker Push |
| 154 | + if: >- |
| 155 | + success() && |
| 156 | + github.event_name == 'push' && |
| 157 | + github.repository == 'apache/arrow' && |
| 158 | + github.ref_name == 'main' |
| 159 | + env: |
| 160 | + ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }} |
| 161 | + ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }} |
| 162 | + continue-on-error: true |
| 163 | + run: archery docker push ${{ matrix.image }} |
0 commit comments