1717
1818name : Python Release Build
1919on :
20- pull_request :
21- branches : ["main"]
20+ workflow_dispatch : {}
2221 push :
23- tags : ["*-rc*"]
24- branches : ["branch-*"]
22+ branches : ["main*"]
2523
2624jobs :
2725 build :
@@ -43,10 +41,10 @@ jobs:
4341 run : uv sync --dev --no-install-package datafusion
4442
4543 # 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/
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/
5048
5149 generate-license :
5250 runs-on : ubuntu-latest
@@ -174,6 +172,10 @@ jobs:
174172 runs-on : ubuntu-latest
175173 steps :
176174 - uses : actions/checkout@v4
175+ - uses : awalsh128/cache-apt-pkgs-action@latest
176+ with :
177+ packages : libssl3 openssl
178+ version : 1.0
177179 - run : rm LICENSE.txt
178180 - name : Download LICENSE.txt
179181 uses : actions/download-artifact@v4
@@ -186,9 +188,23 @@ jobs:
186188 env :
187189 RUST_BACKTRACE : 1
188190 with :
189- rust-toolchain : nightly
191+ rust-toolchain : stable
190192 target : x86_64
191193 manylinux : auto
194+ before-script-linux : |
195+ # If we're running on rhel centos, install needed packages.
196+ if command -v yum &> /dev/null; then
197+ yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
198+
199+ # If we're running on i686 we need to symlink libatomic
200+ # in order to build openssl with -latomic flag.
201+ if [[ ! -d "/usr/lib64" ]]; then
202+ ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
203+ fi
204+ else
205+ # If we're running on debian-based system.
206+ apt update -y && apt-get install -y libssl-dev openssl pkg-config
207+ fi
192208 rustup-components : rust-std rustfmt # Keep them in one line due to https://github.com/PyO3/maturin-action/issues/153
193209 args : --release --manylinux 2014 --features protoc,substrait
194210 - name : Archive wheels
@@ -203,22 +219,45 @@ jobs:
203219 runs-on : ubuntu-latest
204220 steps :
205221 - uses : actions/checkout@v4
222+ - uses : awalsh128/cache-apt-pkgs-action@latest
223+ with :
224+ packages : libssl3 openssl
225+ version : 1.0
206226 - run : rm LICENSE.txt
207227 - name : Download LICENSE.txt
208228 uses : actions/download-artifact@v4
209229 with :
210230 name : python-wheel-license
211231 path : .
212232 - run : cat LICENSE.txt
233+ - name : Setup QEMU
234+ uses : docker/setup-qemu-action@v1
213235 - name : Build wheels
214236 uses : PyO3/maturin-action@v1
215237 env :
216- RUST_BACKTRACE : 1
238+ RUST_BACKTRACE : full
217239 with :
218- rust-toolchain : nightly
240+ rust-toolchain : stable
219241 target : aarch64
220242 # Use manylinux_2_28-cross because the manylinux2014-cross has GCC 4.8.5, which causes the build to fail
221243 manylinux : 2_28
244+ container : " ghcr.io/rust-cross/manylinux_2_28-cross:aarch64"
245+ docker-options : " --platform linux/arm64 -e CFLAGS=\" -I/usr/include\" -e LDFLAGS=\" -L/usr/lib\" -e CFLAGS_aarch64_unknown_linux_gnu=\" -I/usr/include\" "
246+ before-script-linux : |
247+ # If we're running on rhel centos, install needed packages.
248+ if command -v yum &> /dev/null; then
249+ yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
250+
251+ # If we're running on i686 we need to symlink libatomic
252+ # in order to build openssl with -latomic flag.
253+ if [[ ! -d "/usr/lib64" ]]; then
254+ ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
255+ fi
256+ else
257+ # If we're running on debian-based system.
258+ apt update -y && apt-get install -y libssl-dev openssl pkg-config librust-openssl-sys-dev
259+ fi
260+ ls -lA /usr/include/openssl/
222261 rustup-components : rust-std rustfmt # Keep them in one line due to https://github.com/PyO3/maturin-action/issues/153
223262 args : --release --features protoc,substrait
224263 - name : Archive wheels
@@ -227,35 +266,53 @@ jobs:
227266 name : dist-manylinux-aarch64
228267 path : target/wheels/*
229268
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
269+ # build-sdist:
270+ # needs: [generate-license]
271+ # name: Source distribution
272+ # runs-on: ubuntu-latest
273+ # steps:
274+ # - uses: actions/checkout@v4
275+ # - uses: awalsh128/cache-apt-pkgs-action@latest
276+ # with:
277+ # packages: libssl3 openssl
278+ # version: 1.0
279+ # - run: rm LICENSE.txt
280+ # - name: Download LICENSE.txt
281+ # uses: actions/download-artifact@v4
282+ # with:
283+ # name: python-wheel-license
284+ # path: .
285+ # - run: cat LICENSE.txt
286+ # - name: Build sdist
287+ # uses: PyO3/maturin-action@v1
288+ # with:
289+ # rust-toolchain: stable
290+ # manylinux: auto
291+ # before-script-linux: |
292+ # # If we're running on rhel centos, install needed packages.
293+ # if command -v yum &> /dev/null; then
294+ # yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
295+ #
296+ # # If we're running on i686 we need to symlink libatomic
297+ # # in order to build openssl with -latomic flag.
298+ # if [[ ! -d "/usr/lib64" ]]; then
299+ # ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
300+ # fi
301+ # else
302+ # # If we're running on debian-based system.
303+ # apt update -y && apt-get install -y libssl-dev openssl pkg-config
304+ # fi
305+ # rustup-components: rust-std rustfmt
306+ # args: --release --sdist --out dist --features protoc,substrait
307+ # - name: Assert sdist build does not generate wheels
308+ # run: |
309+ # if [ "$(ls -A target/wheels)" ]; then
310+ # echo "Error: Sdist build generated wheels"
311+ # exit 1
312+ # else
313+ # echo "Directory is clean"
314+ # fi
315+ # shell: bash
259316
260317 merge-build-artifacts :
261318 runs-on : ubuntu-latest
@@ -264,7 +321,7 @@ jobs:
264321 - build-macos-x86_64
265322 - build-manylinux-x86_64
266323 - build-manylinux-aarch64
267- - build-sdist
324+ # - build-sdist
268325 steps :
269326 - name : Merge Build Artifacts
270327 uses : actions/upload-artifact/merge@v4
0 commit comments