| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, |
| # software distributed under the License is distributed on an |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| # KIND, either express or implied. See the License for the |
| # specific language governing permissions and limitations |
| # under the License. |
| |
| # NOTE: must set "Crossbow" as name to have the badge links working in the |
| # github comment reports! |
| name: Crossbow |
| |
| on: |
| push: |
| branches: |
| - "*-github-*" |
| |
| jobs: |
| package: |
| name: Package |
| runs-on: ubuntu-18.04 |
| steps: |
| - name: Set up Ruby |
| uses: actions/setup-ruby@v1 |
| - name: Checkout Arrow |
| run: | |
| git clone --no-checkout {{ arrow.remote }} arrow |
| git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }} |
| git -C arrow checkout FETCH_HEAD |
| git -C arrow submodule update --init --recursive |
| - name: Free Up Disk Space |
| shell: bash |
| run: arrow/ci/scripts/util_cleanup.sh |
| - name: Cache ccache |
| uses: actions/cache@v2 |
| with: |
| path: arrow/dev/tasks/linux-packages/apache-arrow/{{ task_namespace }}/build/{{ target }}/ccache |
| key: linux-{{ task_namespace }}-ccache-{{ target }}-{{ "${{ hashFiles('arrow/cpp/**') }}" }} |
| restore-keys: linux-{{ task_namespace }}-ccache-{{ target }}- |
| - name: Build |
| run: | |
| set -e |
| pushd arrow/dev/tasks/linux-packages |
| rake version:update |
| rake docker:pull || : |
| rake --trace {{ task_namespace }}:build BUILD_DIR=build |
| sudo rm -rf */*/build |
| popd |
| env: |
| APT_TARGETS: {{ target }} |
| ARROW_VERSION: {{ arrow.version }} |
| REPO: {{ '${{ secrets.REPO }}' }} |
| YUM_TARGETS: {{ target }} |
| - name: Docker Push |
| continue-on-error: true |
| shell: bash |
| run: | |
| pushd arrow/dev/tasks/linux-packages |
| docker login -u "{{ '${{ secrets.DOCKERHUB_USER }}' }}" \ |
| -p "{{ '${{ secrets.DOCKERHUB_TOKEN }}' }}" |
| rake docker:push |
| popd |
| env: |
| APT_TARGETS: {{ target }} |
| REPO: {{ '${{ secrets.REPO }}' }} |
| YUM_TARGETS: {{ target }} |
| - name: Set up test |
| run: | |
| set -e |
| sudo apt update |
| sudo apt install -y \ |
| apt-utils \ |
| createrepo \ |
| devscripts \ |
| gpg \ |
| rpm |
| (echo "Key-Type: RSA"; \ |
| echo "Key-Length: 4096"; \ |
| echo "Name-Real: Test"; \ |
| echo "Name-Email: test@example.com"; \ |
| echo "%no-protection") | \ |
| gpg --full-generate-key --batch |
| GPG_KEY_ID=$(gpg --list-keys --with-colon test@example.com | grep fpr | cut -d: -f10) |
| echo "GPG_KEY_ID=${GPG_KEY_ID}" >> ${GITHUB_ENV} |
| gpg --export --armor test@example.com > arrow/dev/tasks/linux-packages/KEYS |
| - name: Test |
| run: | |
| set -e |
| pushd arrow/dev/tasks/linux-packages |
| rake --trace {{ task_namespace }}:test |
| rm -rf {{ task_namespace }}/repositories |
| popd |
| env: |
| APT_TARGETS: {{ target }} |
| ARROW_VERSION: {{ arrow.version }} |
| YUM_TARGETS: {{ target }} |
| # Using GitHub release tries to find a common ancestor between the |
| # currently pushed tag and the latest tag of the GitHub repository |
| # (don't know why). |
| # The tag upload took 43 minutes because of this scan, so use an |
| # alternative upload script. |
| - name: Set up Python |
| uses: actions/setup-python@v2 |
| with: |
| python-version: 3.8 |
| - name: Set up Crossbow |
| run: | |
| pip install --requirement arrow/dev/tasks/requirements-crossbow.txt |
| - name: Upload artifacts |
| run: | |
| python arrow/dev/tasks/crossbow.py \ |
| --queue-path . \ |
| --queue-remote {{ queue_remote_url }} \ |
| upload-artifacts \ |
| {%- for extension in upload_extensions %} |
| --pattern "arrow/dev/tasks/linux-packages/**/*{{ extension }}" \ |
| {%- endfor %} |
| --sha {{ task.branch }} \ |
| --tag {{ task.tag }} |
| env: |
| CROSSBOW_GITHUB_TOKEN: {{ '${{ secrets.CROSSBOW_GITHUB_TOKEN }}' }} |