-
Notifications
You must be signed in to change notification settings - Fork 7
208 lines (203 loc) · 7.02 KB
/
package.yaml
File metadata and controls
208 lines (203 loc) · 7.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# Copyright 2022-2024 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:
source:
name: Source
runs-on: ubuntu-latest
steps:
- name: Prepare
run: |
case ${GITHUB_REF} in
refs/tags/*)
version=${GITHUB_REF#refs/tags/}
;;
*)
version=${GITHUB_SHA}
;;
esac
echo "VERSION=${version}" >> ${GITHUB_ENV}
- uses: actions/checkout@v5
with:
submodules: true
path: datafusion-c-${{ env.VERSION }}
- name: Archive
run: |
rm -rf datafusion-c-${VERSION}/.git
tar cvzf datafusion-c-${VERSION}.tar.gz datafusion-c-${VERSION}
zip -r datafusion-c-${VERSION}.zip datafusion-c-${VERSION}
- uses: actions/upload-artifact@v5
with:
name: tar.gz
path: datafusion-c-${{ env.VERSION }}.tar.gz
- uses: actions/upload-artifact@v5
with:
name: zip
path: datafusion-c-${{ env.VERSION }}.zip
- name: Release
if: |
startsWith(github.ref, 'refs/tags/')
run: |
gh release create ${GITHUB_REF_NAME} \
--discussion-category Announcements \
--notes-file datafusion-c-${VERSION}/doc/source/news/${VERSION}.md \
--title "DataFucion C ${VERSION}" \
datafusion-c-${VERSION}.tar.gz
datafusion-c-${VERSION}.zip
env:
GH_TOKEN: ${{ github.token }}
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: ubuntu-focal-amd64
task-namespace: apt
target: ubuntu-focal
test-docker-image: ubuntu:focal
# - label: Ubuntu Focal arm64
# id: ubuntu-focal-arm64
# task-namespace: apt
# target: ubuntu-focal-arm64
# test-docker-image: arm64v8/ubuntu:focal
- label: Ubuntu Jammy amd64
id: ubuntu-jammy-amd64
task-namespace: apt
target: ubuntu-jammy
test-docker-image: ubuntu:jammy
# - label: Ubuntu Jammy arm64
# id: ubuntu-jammy-arm64
# task-namespace: apt
# target: ubuntu-jammy-arm64
# test-docker-image: arm64v8/ubuntu:jammy
steps:
- uses: actions/checkout@v5
with:
submodules: true
- 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/')
run: |
cd package
rake version:update RELEASE_DATE=$(date +%Y-%m-%d)
- name: Cache ccache
uses: actions/cache@v4
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@v5
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 }}
shopt -s globstar
cp -a package/${{ matrix.task-namespace }}/repositories/**/*.* ${{ matrix.id }}/
tar czf ${{ matrix.id }}.tar.gz ${{ matrix.id }}
- name: Upload to release
if: |
startsWith(github.ref, 'refs/tags/')
run:
gh release upload ${GITHUB_REF_NAME} \
${{ matrix.id }}.tar.gz
env:
GH_TOKEN: ${{ github.token }}
- name: Test
run: |
docker run \
--rm \
--volume ${PWD}:/host:ro \
${{ matrix.test-docker-image }} \
/host/package/${{ matrix.task-namespace }}/test.sh \
local