17
17
18
18
name : Python Release Build
19
19
on :
20
- pull_request :
21
- branches : ["main"]
20
+ workflow_dispatch : {}
22
21
push :
23
- tags : ["*-rc*"]
24
- branches : ["branch-*"]
22
+ branches : ["main*"]
25
23
26
24
jobs :
27
25
build :
@@ -43,28 +41,27 @@ jobs:
43
41
run : uv sync --dev --no-install-package datafusion
44
42
45
43
# Update output format to enable automatic inline annotations.
46
- - name : Run Ruff
47
- run : |
48
- uv run --no-project ruff check --output-format=github python/
49
- uv run --no-project ruff format --check python/
50
-
51
- generate-license :
52
- runs-on : ubuntu-latest
53
- steps :
54
- - uses : actions/checkout@v4
55
- - uses : astral-sh/setup-uv@v5
56
- with :
57
- enable-cache : true
44
+ # - name: Run Ruff
45
+ # run: |
46
+ # uv run --no-project ruff check --output-format=github python/
47
+ # uv run --no-project ruff format --check python/
58
48
59
- - name : Generate license file
60
- run : uv run --no-project python ./dev/create_license.py
61
- - uses : actions/upload-artifact@v4
62
- with :
63
- name : python-wheel-license
64
- path : LICENSE.txt
49
+ # generate-license:
50
+ # runs-on: ubuntu-latest
51
+ # steps:
52
+ # - uses: actions/checkout@v4
53
+ # - uses: astral-sh/setup-uv@v5
54
+ # with:
55
+ # enable-cache: true
56
+ #
57
+ # - name: Generate license file
58
+ # run: uv run --no-project python ./dev/create_license.py
59
+ # - uses: actions/upload-artifact@v4
60
+ # with:
61
+ # name: python-wheel-license
62
+ # path: LICENSE.txt
65
63
66
64
build-python-mac-win :
67
- needs : [generate-license]
68
65
name : Mac/Win
69
66
runs-on : ${{ matrix.os }}
70
67
strategy :
81
78
82
79
- uses : dtolnay/rust-toolchain@stable
83
80
84
- - run : rm LICENSE.txt
85
- - name : Download LICENSE.txt
86
- uses : actions/download-artifact@v4
87
- with :
88
- name : python-wheel-license
89
- path : .
90
-
91
81
- name : Install Protoc
92
82
uses : arduino/setup-protoc@v3
93
83
with :
@@ -121,7 +111,6 @@ jobs:
121
111
path : target/wheels/*
122
112
123
113
build-macos-x86_64 :
124
- needs : [generate-license]
125
114
name : Mac x86_64
126
115
runs-on : macos-13
127
116
strategy :
@@ -137,13 +126,6 @@ jobs:
137
126
138
127
- uses : dtolnay/rust-toolchain@stable
139
128
140
- - run : rm LICENSE.txt
141
- - name : Download LICENSE.txt
142
- uses : actions/download-artifact@v4
143
- with :
144
- name : python-wheel-license
145
- path : .
146
-
147
129
- name : Install Protoc
148
130
uses : arduino/setup-protoc@v3
149
131
with :
@@ -169,17 +151,14 @@ jobs:
169
151
path : target/wheels/*
170
152
171
153
build-manylinux-x86_64 :
172
- needs : [generate-license]
173
154
name : Manylinux x86_64
174
155
runs-on : ubuntu-latest
175
156
steps :
176
157
- uses : actions/checkout@v4
177
- - run : rm LICENSE.txt
178
- - name : Download LICENSE.txt
179
- uses : actions/download-artifact@v4
158
+ - uses : awalsh128/cache-apt-pkgs-action@latest
180
159
with :
181
- name : python-wheel-license
182
- path : .
160
+ packages : libssl3 openssl
161
+ version : 1.0
183
162
- run : cat LICENSE.txt
184
163
- name : Build wheels
185
164
uses : PyO3/maturin-action@v1
@@ -189,6 +168,20 @@ jobs:
189
168
rust-toolchain : nightly
190
169
target : x86_64
191
170
manylinux : auto
171
+ before-script-linux : |
172
+ # If we're running on rhel centos, install needed packages.
173
+ if command -v yum &> /dev/null; then
174
+ yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
175
+
176
+ # If we're running on i686 we need to symlink libatomic
177
+ # in order to build openssl with -latomic flag.
178
+ if [[ ! -d "/usr/lib64" ]]; then
179
+ ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
180
+ fi
181
+ else
182
+ # If we're running on debian-based system.
183
+ apt update -y && apt-get install -y libssl-dev openssl pkg-config
184
+ fi
192
185
rustup-components : rust-std rustfmt # Keep them in one line due to https://github.com/PyO3/maturin-action/issues/153
193
186
args : --release --manylinux 2014 --features protoc,substrait
194
187
- name : Archive wheels
@@ -197,74 +190,97 @@ jobs:
197
190
name : dist-manylinux-x86_64
198
191
path : target/wheels/*
199
192
200
- build-manylinux-aarch64 :
201
- needs : [generate-license]
202
- name : Manylinux arm64
203
- runs-on : ubuntu-latest
204
- steps :
205
- - uses : actions/checkout@v4
206
- - run : rm LICENSE.txt
207
- - name : Download LICENSE.txt
208
- uses : actions/download-artifact@v4
209
- with :
210
- name : python-wheel-license
211
- path : .
212
- - run : cat LICENSE.txt
213
- - name : Build wheels
214
- uses : PyO3/maturin-action@v1
215
- env :
216
- RUST_BACKTRACE : 1
217
- with :
218
- rust-toolchain : nightly
219
- target : aarch64
220
- # Use manylinux_2_28-cross because the manylinux2014-cross has GCC 4.8.5, which causes the build to fail
221
- manylinux : 2_28
222
- rustup-components : rust-std rustfmt # Keep them in one line due to https://github.com/PyO3/maturin-action/issues/153
223
- args : --release --features protoc,substrait
224
- - name : Archive wheels
225
- uses : actions/upload-artifact@v4
226
- with :
227
- name : dist-manylinux-aarch64
228
- path : target/wheels/*
193
+ # build-manylinux-aarch64:
194
+ # name: Manylinux arm64
195
+ # runs-on: ubuntu-latest-arm
196
+ # steps:
197
+ # - uses: actions/checkout@v4
198
+ # - uses: awalsh128/cache-apt-pkgs-action@latest
199
+ # with:
200
+ # packages: libssl3 openssl
201
+ # version: 1.0
202
+ # - run: cat LICENSE.txt
203
+ # - name: Build wheels
204
+ # uses: PyO3/maturin-action@v1
205
+ # env:
206
+ # RUST_BACKTRACE: full
207
+ # with:
208
+ # rust-toolchain: nightly
209
+ # target: aarch64
210
+ # # Use manylinux_2_28-cross because the manylinux2014-cross has GCC 4.8.5, which causes the build to fail
211
+ # manylinux: 2_28
212
+ # before-script-linux: |
213
+ # # If we're running on rhel centos, install needed packages.
214
+ # if command -v yum &> /dev/null; then
215
+ # yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
216
+ #
217
+ # # If we're running on i686 we need to symlink libatomic
218
+ # # in order to build openssl with -latomic flag.
219
+ # if [[ ! -d "/usr/lib64" ]]; then
220
+ # ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
221
+ # fi
222
+ # else
223
+ # # If we're running on debian-based system.
224
+ # apt update -y && apt-get install -y libssl-dev openssl pkg-config librust-openssl-sys-dev
225
+ # fi
226
+ # ls -lA /usr/include/openssl/
227
+ # rustup-components: rust-std rustfmt # Keep them in one line due to https://github.com/PyO3/maturin-action/issues/153
228
+ # args: --release --features protoc,substrait
229
+ # - name: Archive wheels
230
+ # uses: actions/upload-artifact@v4
231
+ # with:
232
+ # name: dist-manylinux-aarch64
233
+ # path: target/wheels/*
229
234
230
- build-sdist :
231
- needs : [generate-license]
232
- name : Source distribution
233
- runs-on : ubuntu-latest
234
- steps :
235
- - uses : actions/checkout@v4
236
- - run : rm LICENSE.txt
237
- - name : Download LICENSE.txt
238
- uses : actions/download-artifact@v4
239
- with :
240
- name : python-wheel-license
241
- path : .
242
- - run : cat LICENSE.txt
243
- - name : Build sdist
244
- uses : PyO3/maturin-action@v1
245
- with :
246
- rust-toolchain : stable
247
- manylinux : auto
248
- rustup-components : rust-std rustfmt
249
- args : --release --sdist --out dist --features protoc,substrait
250
- - name : Assert sdist build does not generate wheels
251
- run : |
252
- if [ "$(ls -A target/wheels)" ]; then
253
- echo "Error: Sdist build generated wheels"
254
- exit 1
255
- else
256
- echo "Directory is clean"
257
- fi
258
- shell : bash
235
+ # build-sdist:
236
+ # name: Source distribution
237
+ # runs-on: ubuntu-latest
238
+ # steps:
239
+ # - uses: actions/checkout@v4
240
+ # - uses: awalsh128/cache-apt-pkgs-action@latest
241
+ # with:
242
+ # packages: libssl3 openssl
243
+ # version: 1.0
244
+ # - run: cat LICENSE.txt
245
+ # - name: Build sdist
246
+ # uses: PyO3/maturin-action@v1
247
+ # with:
248
+ # rust-toolchain: stable
249
+ # manylinux: auto
250
+ # before-script-linux: |
251
+ # # If we're running on rhel centos, install needed packages.
252
+ # if command -v yum &> /dev/null; then
253
+ # yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
254
+ #
255
+ # # If we're running on i686 we need to symlink libatomic
256
+ # # in order to build openssl with -latomic flag.
257
+ # if [[ ! -d "/usr/lib64" ]]; then
258
+ # ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
259
+ # fi
260
+ # else
261
+ # # If we're running on debian-based system.
262
+ # apt update -y && apt-get install -y libssl-dev openssl pkg-config
263
+ # fi
264
+ # rustup-components: rust-std rustfmt
265
+ # args: --release --sdist --out dist --features protoc,substrait
266
+ # - name: Assert sdist build does not generate wheels
267
+ # run: |
268
+ # if [ "$(ls -A target/wheels)" ]; then
269
+ # echo "Error: Sdist build generated wheels"
270
+ # exit 1
271
+ # else
272
+ # echo "Directory is clean"
273
+ # fi
274
+ # shell: bash
259
275
260
276
merge-build-artifacts :
261
277
runs-on : ubuntu-latest
262
278
needs :
263
279
- build-python-mac-win
264
280
- build-macos-x86_64
265
281
- build-manylinux-x86_64
266
- - build-manylinux-aarch64
267
- - build-sdist
282
+ # - build-manylinux-aarch64
283
+ # - build-sdist
268
284
steps :
269
285
- name : Merge Build Artifacts
270
286
uses : actions/upload-artifact/merge@v4
0 commit comments