-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARROW-7685: [Developer] Add support for GitHub Actions to Crossbow
If we use GitHub Actions, we don't need to set additional secret variables to crossbow repository because we can use built-in GITHUB_TOKEN secret variable. We'll be able to use self-hosted runner with GitHub Actions. It means that we'll be able to build .deb/.rpm packages on ARM machine instead on QEMU. linux-packages tasks are migrated to GitHub Actions from Azure Pipelines as an example. Closes #6286 from kou/crossbow-github-actions and squashes the following commits: 3a75ac4 <Krisztián Szűcs> set workflow name 35dd859 <Krisztián Szűcs> use CROSSBOW_GITHUB_TOKEN secret 75c574a <Sutou Kouhei> Add support for GitHub Actions to Crossbow Lead-authored-by: Sutou Kouhei <kou@clear-code.com> Co-authored-by: Krisztián Szűcs <szucs.krisztian@gmail.com> Signed-off-by: Krisztián Szűcs <szucs.krisztian@gmail.com>
- Loading branch information
Showing
6 changed files
with
211 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# 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-latest | ||
steps: | ||
- name: Set up Ruby | ||
uses: actions/setup-ruby@master | ||
- 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 | ||
# We can remove this with binfmt-support 2.1.7 or later and | ||
# qemu-user-static 2.12 or later. It requires Debian buster or later, | ||
# or Ubuntu 18.10 or later. | ||
- name: Prepare qemu-user-static | ||
run: | | ||
sudo apt install -y qemu-user-static unar | ||
wget http://archive.ubuntu.com/ubuntu/pool/universe/q/qemu/qemu-user-static_3.1+dfsg-2ubuntu3.7_amd64.deb | ||
unar *.deb | ||
rm *.deb | ||
pushd qemu-user-static* | ||
unar data.* | ||
for dockerfile in ../arrow/dev/tasks/linux-packages/*/*/*/Dockerfile; do | ||
cp data/usr/bin/qemu-aarch64-static $(dirname ${dockerfile}) | ||
done | ||
popd | ||
- name: Build | ||
run: | | ||
set -e | ||
pushd arrow/dev/tasks/linux-packages | ||
rake version:update | ||
{{ build_command }} | ||
popd | ||
env: | ||
ARROW_VERSION: {{ arrow.version }} | ||
# 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@master | ||
- name: Set up Crossbow | ||
run: | | ||
pip install \ | ||
click \ | ||
github3.py \ | ||
jinja2 \ | ||
jira \ | ||
pygit2 \ | ||
ruamel.yaml \ | ||
setuptools_scm \ | ||
toolz | ||
- 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 "**/*{{ extension }}" \ | ||
{%- endfor %} | ||
--sha {{ task.branch }} \ | ||
--tag {{ task.tag }} | ||
env: | ||
CROSSBOW_GITHUB_TOKEN: {{ '${{ secrets.CROSSBOW_GITHUB_TOKEN }}' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# 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-latest | ||
steps: | ||
- name: Set up Ruby | ||
uses: actions/setup-ruby@master | ||
- 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: Build | ||
run: | | ||
set -e | ||
pushd arrow/dev/tasks/linux-packages | ||
rake version:update | ||
{{ build_command }} | ||
popd | ||
env: | ||
ARROW_VERSION: {{ arrow.version }} | ||
# 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@master | ||
- name: Set up Crossbow | ||
run: | | ||
pip install \ | ||
click \ | ||
github3.py \ | ||
jinja2 \ | ||
jira \ | ||
pygit2 \ | ||
ruamel.yaml \ | ||
setuptools_scm \ | ||
toolz | ||
- 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 "**/*{{ extension }}" \ | ||
{%- endfor %} | ||
--sha {{ task.branch }} \ | ||
--tag {{ task.tag }} | ||
env: | ||
CROSSBOW_GITHUB_TOKEN: {{ '${{ secrets.CROSSBOW_GITHUB_TOKEN }}' }} |
Oops, something went wrong.