-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for .deb/.rpm packages (#24)
Fix #6 Fix #7 This is based on packaging system used by apache/arrow: https://github.com/apache/arrow/tree/master/dev/tasks/linux-packages This also change all license headers because we need to clarify license information to create .deb packages. The original license headers said ASF is copyright holder but this project isn't hosted under apache/ organization. It means that ASF isn't copyright holder. I replaced all license headers with the standard license header described in Apache-2.0 License text. And I use me as the copyright holder because all major changes are made by me for now. I prepared CI jobs for arm64 packages but thery are disabled for now because it's slow. It uses QEMU to build arm64 binaries on x86_64 GitHub Actions runners. There are some configurations to release packages but they aren't tested yet. I'll test them and fix some problem in a follow-up pull request.
- Loading branch information
Showing
84 changed files
with
2,023 additions
and
811 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 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 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,163 @@ | ||
# Copyright 2022 Sutou Kouhei <kou@clear-code.com> | ||
# | ||
# Licensed 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. | ||
|
||
name: Package | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
concurrency: | ||
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
label: | ||
# - AlmaLinux 8 aarch64 | ||
- AlmaLinux 8 x86_64 | ||
# - AlmaLinux 9 aarch64 | ||
- AlmaLinux 9 x86_64 | ||
- Debian GNU/Linux bullseye amd64 | ||
# - Debian GNU/Linux bullseye arm64 | ||
- Debian GNU/Linux bookworm amd64 | ||
# - Debian GNU/Linux bookworm arm64 | ||
- Ubuntu Focal amd64 | ||
# - Ubuntu Focal arm64 | ||
- Ubuntu Jammy amd64 | ||
# - Ubuntu Jammy arm64 | ||
include: | ||
- label: AlmaLinux 8 x86_64 | ||
id: almalinux-8-x86_64 | ||
task-namespace: yum | ||
target: almalinux-8 | ||
test-docker-image: almalinux:8 | ||
# - label: AlmaLinux 8 aarch64 | ||
# id: almalinux-8-aarch64 | ||
# task-namespace: yum | ||
# target: almalinux-8-aarch64 | ||
# test-docker-image: arm64v8/almalinux:8 | ||
- label: AlmaLinux 9 x86_64 | ||
id: almalinux-9-x86_64 | ||
task-namespace: yum | ||
target: almalinux-9 | ||
test-docker-image: almalinux:9 | ||
# - label: AlmaLinux 9 aarch64 | ||
# id: almalinux-9-aarch64 | ||
# task-namespace: yum | ||
# target: almalinux-9-aarch64 | ||
# test-docker-image: arm64v8/almalinux:9 | ||
- label: Debian GNU/Linux bullseye amd64 | ||
id: debian-bullseye-amd64 | ||
task-namespace: apt | ||
target: debian-bullseye | ||
test-docker-image: debian:bullseye | ||
# - label: Debian GNU/Linux bullseye arm64 | ||
# id: debian-bullseye-arm64 | ||
# task-namespace: apt | ||
# target: debian-bullseye-arm64 | ||
# test-docker-image: arm64v8/debian:bullseye | ||
- label: Debian GNU/Linux bookworm amd64 | ||
id: debian-bookworm-amd64 | ||
task-namespace: apt | ||
target: debian-bookworm | ||
test-docker-image: debian:bookworm | ||
# - label: Debian GNU/Linux bookworm arm64 | ||
# id: debian-bookworm-arm64 | ||
# task-namespace: apt | ||
# target: debian-bookworm-arm64 | ||
# test-docker-image: arm64v8/debian:bookworm | ||
- label: Ubuntu Focal amd64 | ||
id: debian-focal-amd64 | ||
task-namespace: apt | ||
target: ubuntu-focal | ||
test-docker-image: ubuntu:focal | ||
# - label: Ubuntu Focal arm64 | ||
# id: debian-focal-arm64 | ||
# task-namespace: apt | ||
# target: ubuntu-focal-arm64 | ||
# test-docker-image: arm64v8/ubuntu:focal | ||
- label: Ubuntu Jammy amd64 | ||
id: debian-jammy-amd64 | ||
task-namespace: apt | ||
target: ubuntu-jammy | ||
test-docker-image: ubuntu:jammy | ||
# - label: Ubuntu Jammy arm64 | ||
# id: debian-jammy-arm64 | ||
# task-namespace: apt | ||
# target: ubuntu-jammy-arm64 | ||
# test-docker-image: arm64v8/ubuntu:jammy | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Checkout Arrow | ||
uses: actions/checkout@v3 | ||
- name: Install dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt -V install \ | ||
devscripts \ | ||
qemu-user-static \ | ||
ruby | ||
- name: Update version | ||
if: | | ||
!startsWith(github.ref, 'refs/tags/') && | ||
!startsWith(github.ref, 'refs/heads/maintenance/') | ||
run: | | ||
cd package | ||
rake version:update RELEASE_DATE=$(date +%Y-%m-%d) | ||
- name: Cache ccache | ||
uses: actions/cache@v2 | ||
with: | ||
path: package/${{ matrix.task-namespace }}/build/${{ matrix.target }}/ccache | ||
key: package-${{ matrix.id }}-ccache-${{ hashFiles('datafusion-glib/**/*.{c,h}', 'src/**/*.rs') }} | ||
restore-keys: package-${{ matrix.id }}-ccache- | ||
- name: Build with docker | ||
run: | | ||
cd package | ||
rake ${{ matrix.task-namespace }}:build BUILD_DIR=build | ||
env: | ||
APT_TARGETS: ${{ matrix.target }} | ||
YUM_TARGETS: ${{ matrix.target }} | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: package-${{ matrix.id }} | ||
path: package/${{ matrix.task-namespace }}/repositories/ | ||
- name: Create assets | ||
if: | | ||
startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
mkdir -p ${{ matrix.id }} | ||
cp -a package/${{ matrix.task-namespace }}/repositories/**/*.* ${{ matrix.id }}/ | ||
tar czf ${{ matrix.id }}.tar.gz ${{ matrix.id }} | ||
- name: Upload to release | ||
uses: softprops/action-gh-release@v1 | ||
if: | | ||
startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
${{ matrix.id }}.tar.gz | ||
- name: Test | ||
run: | | ||
docker run \ | ||
--rm \ | ||
--volume ${PWD}:/host:ro \ | ||
${{ matrix.test-docker-image }} \ | ||
/host/package/${{ matrix.task-namespace }}/test.sh |
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 |
---|---|---|
@@ -1,19 +1,25 @@ | ||
# 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 | ||
# Copyright 2022 Sutou Kouhei <kou@clear-code.com> | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# Licensed 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 | ||
# | ||
# 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. | ||
# 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. | ||
|
||
/Cargo.lock | ||
/target | ||
/package/*.tar.gz | ||
/package/apt/build.sh | ||
/package/apt/env.sh | ||
/package/apt/repositories/ | ||
/package/apt/tmp/ | ||
/package/yum/build.sh | ||
/package/yum/env.sh | ||
/package/yum/repositories/ | ||
/package/yum/tmp/ |
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,17 @@ | ||
# Copyright 2022 Sutou Kouhei <kou@clear-code.com> | ||
# | ||
# Licensed 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. | ||
|
||
[submodule "vendor/apache-arrow"] | ||
path = vendor/apache-arrow | ||
url = https://github.com/apache/arrow.git |
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 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
Oops, something went wrong.