Skip to content

Apache DataFusion SQL Query Engine

ARROW-7685: [Developer] Add support for GitHub Actions to Crossbow

Sutou Kouheid5bc915a412f
diff --git a/dev/tasks/crossbow.py b/dev/tasks/crossbow.py
index f9bcbf1b38..b6744b0a17 100755
--- a/dev/tasks/crossbow.py
+++ b/dev/tasks/crossbow.py
@@ -113,6 +113,7 @@ def unflatten_tree(files):
# - circle requires the configuration to be present on all branch, even ones
# that are configured to be skipped
# - azure skips branches without azure-pipelines.yml by default
+# - github skips branches without .github/workflows/ by default
_default_travis_yml = """
branches:
@@ -736,7 +737,7 @@ class Task(Serializable):
def __init__(self, platform, ci, template, artifacts=None, params=None):
assert platform in {'win', 'osx', 'linux'}
- assert ci in {'circle', 'travis', 'appveyor', 'azure'}
+ assert ci in {'circle', 'travis', 'appveyor', 'azure', 'github'}
self.ci = ci
self.platform = platform
self.template = template
@@ -766,7 +767,8 @@ class Task(Serializable):
'circle': '.circleci/config.yml',
'travis': '.travis.yml',
'appveyor': 'appveyor.yml',
- 'azure': 'azure-pipelines.yml'
+ 'azure': 'azure-pipelines.yml',
+ 'github': '.github/workflows/crossbow.yml',
}
return config_files[self.ci]
diff --git a/dev/tasks/linux-packages/azure.linux.arm64.yml b/dev/tasks/linux-packages/azure.linux.arm64.yml
deleted file mode 100644
index 69773fe9b4..0000000000
--- a/dev/tasks/linux-packages/azure.linux.arm64.yml
+++ /dev/null
@@ -1,84 +0,0 @@
-# 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.
-
-jobs:
-- job: linux
- pool:
- vmImage: ubuntu-latest
- timeoutInMinutes: 360
- steps:
- # for building the linux packages
- - task: UseRubyVersion@0
- inputs:
- addToPath: true
-
- - script: |
- 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
- displayName: Clone arrow
-
- # 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.
- - script: |
- 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
- displayName: Prepare qemu-user-static
-
- - script: |
- set -e
- pushd arrow/dev/tasks/linux-packages
- rake version:update
- {{ build_command }}
- popd
- env:
- ARROW_VERSION: {{ arrow.version }}
- displayName: Build
-
- # 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.
- - task: CondaEnvironment@1
- inputs:
- packageSpecs: 'click github3.py jinja2 jira pygit2 ruamel.yaml setuptools_scm toolz'
- installOptions: '-c conda-forge'
- updateConda: false
- - script: |
- 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: $(CROSSBOW_GITHUB_TOKEN)
- displayName: Upload packages as a GitHub release
diff --git a/dev/tasks/linux-packages/azure.linux.yml b/dev/tasks/linux-packages/azure.linux.yml
deleted file mode 100644
index 5789c97110..0000000000
--- a/dev/tasks/linux-packages/azure.linux.yml
+++ /dev/null
@@ -1,68 +0,0 @@
-# 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.
-
-jobs:
-- job: linux
- pool:
- vmImage: ubuntu-latest
- timeoutInMinutes: 360
- steps:
- # for building the linux packages
- - task: UseRubyVersion@0
- inputs:
- addToPath: true
-
- - script: |
- 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
- displayName: Clone arrow
-
- - script: |
- set -e
- pushd arrow/dev/tasks/linux-packages
- rake version:update
- {{ build_command }}
- popd
- env:
- ARROW_VERSION: {{ arrow.version }}
- displayName: Build
-
- # 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.
- - task: CondaEnvironment@1
- inputs:
- packageSpecs: 'click github3.py jinja2 jira pygit2 ruamel.yaml setuptools_scm toolz'
- installOptions: '-c conda-forge'
- updateConda: false
- - script: |
- 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: $(CROSSBOW_GITHUB_TOKEN)
- displayName: Upload packages as a GitHub release
diff --git a/dev/tasks/linux-packages/github.linux.arm64.yml b/dev/tasks/linux-packages/github.linux.arm64.yml
new file mode 100644
index 0000000000..f6eadbd6c5
--- /dev/null
+++ b/dev/tasks/linux-packages/github.linux.arm64.yml
@@ -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 }}' }}
diff --git a/dev/tasks/linux-packages/github.linux.yml b/dev/tasks/linux-packages/github.linux.yml
new file mode 100644
index 0000000000..319a4dc1b4
--- /dev/null
+++ b/dev/tasks/linux-packages/github.linux.yml
@@ -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 }}' }}
diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml
index 6e64293f0c..2bc7b5a79b 100644
--- a/dev/tasks/tasks.yml
+++ b/dev/tasks/tasks.yml
@@ -654,9 +654,9 @@ tasks:
############################## Linux PKGS ####################################
debian-stretch:
- ci: azure
+ ci: github
platform: linux
- template: linux-packages/azure.linux.yml
+ template: linux-packages/github.linux.yml
params:
build_command: rake apt:build APT_TARGETS=debian-stretch
upload_extensions:
@@ -724,9 +724,9 @@ tasks:
- plasma-store-server_{no_rc_version}-1_[a-z0-9]+.deb
debian-stretch-arm64:
- ci: azure
+ ci: github
platform: linux
- template: linux-packages/azure.linux.arm64.yml
+ template: linux-packages/github.linux.arm64.yml
params:
build_command: rake apt:build APT_TARGETS=debian-stretch-arm64
upload_extensions:
@@ -777,9 +777,9 @@ tasks:
- libparquet100_{no_rc_version}-1_[a-z0-9]+.deb
debian-buster:
- ci: azure
+ ci: github
platform: linux
- template: linux-packages/azure.linux.yml
+ template: linux-packages/github.linux.yml
params:
build_command: rake apt:build APT_TARGETS=debian-buster
upload_extensions:
@@ -847,9 +847,9 @@ tasks:
- plasma-store-server_{no_rc_version}-1_[a-z0-9]+.deb
debian-buster-arm64:
- ci: azure
+ ci: github
platform: linux
- template: linux-packages/azure.linux.arm64.yml
+ template: linux-packages/github.linux.arm64.yml
params:
build_command: rake apt:build APT_TARGETS=debian-buster-arm64
upload_extensions:
@@ -900,9 +900,9 @@ tasks:
- libparquet100_{no_rc_version}-1_[a-z0-9]+.deb
ubuntu-xenial:
- ci: azure
+ ci: github
platform: linux
- template: linux-packages/azure.linux.yml
+ template: linux-packages/github.linux.yml
params:
build_command: rake apt:build APT_TARGETS=ubuntu-xenial
upload_extensions:
@@ -956,9 +956,9 @@ tasks:
- plasma-store-server_{no_rc_version}-1_[a-z0-9]+.deb
ubuntu-xenial-arm64:
- ci: azure
+ ci: github
platform: linux
- template: linux-packages/azure.linux.arm64.yml
+ template: linux-packages/github.linux.arm64.yml
params:
build_command: rake apt:build APT_TARGETS=ubuntu-xenial-arm64
upload_extensions:
@@ -1006,9 +1006,9 @@ tasks:
- plasma-store-server_{no_rc_version}-1_[a-z0-9]+.deb
ubuntu-bionic:
- ci: azure
+ ci: github
platform: linux
- template: linux-packages/azure.linux.yml
+ template: linux-packages/github.linux.yml
params:
build_command: rake apt:build APT_TARGETS=ubuntu-bionic
upload_extensions:
@@ -1065,9 +1065,9 @@ tasks:
- plasma-store-server_{no_rc_version}-1_[a-z0-9]+.deb
ubuntu-bionic-arm64:
- ci: azure
+ ci: github
platform: linux
- template: linux-packages/azure.linux.arm64.yml
+ template: linux-packages/github.linux.arm64.yml
params:
build_command: rake apt:build APT_TARGETS=ubuntu-bionic-arm64
upload_extensions:
@@ -1124,9 +1124,9 @@ tasks:
- plasma-store-server_{no_rc_version}-1_[a-z0-9]+.deb
ubuntu-disco:
- ci: azure
+ ci: github
platform: linux
- template: linux-packages/azure.linux.yml
+ template: linux-packages/github.linux.yml
params:
build_command: rake apt:build APT_TARGETS=ubuntu-disco
upload_extensions:
@@ -1183,9 +1183,9 @@ tasks:
- plasma-store-server_{no_rc_version}-1_[a-z0-9]+.deb
ubuntu-disco-arm64:
- ci: azure
+ ci: github
platform: linux
- template: linux-packages/azure.linux.arm64.yml
+ template: linux-packages/github.linux.arm64.yml
params:
build_command: rake apt:build APT_TARGETS=ubuntu-disco-arm64
upload_extensions:
@@ -1242,9 +1242,9 @@ tasks:
- plasma-store-server_{no_rc_version}-1_[a-z0-9]+.deb
ubuntu-eoan:
- ci: azure
+ ci: github
platform: linux
- template: linux-packages/azure.linux.yml
+ template: linux-packages/github.linux.yml
params:
build_command: rake apt:build APT_TARGETS=ubuntu-eoan
upload_extensions:
@@ -1301,9 +1301,9 @@ tasks:
- plasma-store-server_{no_rc_version}-1_[a-z0-9]+.deb
ubuntu-eoan-arm64:
- ci: azure
+ ci: github
platform: linux
- template: linux-packages/azure.linux.arm64.yml
+ template: linux-packages/github.linux.arm64.yml
params:
build_command: rake apt:build APT_TARGETS=ubuntu-eoan-arm64
upload_extensions:
@@ -1360,9 +1360,9 @@ tasks:
- plasma-store-server_{no_rc_version}-1_[a-z0-9]+.deb
centos-6:
- ci: azure
+ ci: github
platform: linux
- template: linux-packages/azure.linux.yml
+ template: linux-packages/github.linux.yml
params:
build_command: rake yum:build YUM_TARGETS=centos-6
upload_extensions:
@@ -1382,9 +1382,9 @@ tasks:
- plasma-libs-{no_rc_version}-1.el6.[a-z0-9_]+.rpm
centos-7:
- ci: azure
+ ci: github
platform: linux
- template: linux-packages/azure.linux.yml
+ template: linux-packages/github.linux.yml
params:
build_command: rake yum:build YUM_TARGETS=centos-7
upload_extensions:
@@ -1416,9 +1416,9 @@ tasks:
- plasma-store-server-{no_rc_version}-1.el7.[a-z0-9_]+.rpm
centos-7-aarch64:
- ci: azure
+ ci: github
platform: linux
- template: linux-packages/azure.linux.arm64.yml
+ template: linux-packages/github.linux.arm64.yml
params:
build_command: rake yum:build YUM_TARGETS=centos-7-aarch64
upload_extensions:
@@ -1448,9 +1448,9 @@ tasks:
- plasma-store-server-{no_rc_version}-1.el7.[a-z0-9_]+.rpm
centos-8:
- ci: azure
+ ci: github
platform: linux
- template: linux-packages/azure.linux.yml
+ template: linux-packages/github.linux.yml
params:
build_command: rake yum:build YUM_TARGETS=centos-8
upload_extensions:
@@ -1505,9 +1505,9 @@ tasks:
- plasma-store-server-{no_rc_version}-1.el8.[a-z0-9_]+.rpm
centos-8-aarch64:
- ci: azure
+ ci: github
platform: linux
- template: linux-packages/azure.linux.arm64.yml
+ template: linux-packages/github.linux.arm64.yml
params:
build_command: rake yum:build YUM_TARGETS=centos-8-aarch64
upload_extensions: