1717
1818name : Python Release Build
1919on :
20- pull_request :
21- branches : ["main"]
2220 push :
23- tags : ["*-rc*"]
24- branches : ["branch-*"]
21+ branches : ["main*"]
2522
2623jobs :
2724 build :
@@ -43,10 +40,10 @@ jobs:
4340 run : uv sync --dev --no-install-package datafusion
4441
4542 # 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/
43+ # - name: Run Ruff
44+ # run: |
45+ # uv run --no-project ruff check --output-format=github python/
46+ # uv run --no-project ruff format --check python/
5047
5148 generate-license :
5249 runs-on : ubuntu-latest
@@ -174,6 +171,10 @@ jobs:
174171 runs-on : ubuntu-latest
175172 steps :
176173 - uses : actions/checkout@v4
174+ - uses : awalsh128/cache-apt-pkgs-action@latest
175+ with :
176+ packages : libssl3 openssl
177+ version : 1.0
177178 - run : rm LICENSE.txt
178179 - name : Download LICENSE.txt
179180 uses : actions/download-artifact@v4
@@ -189,6 +190,20 @@ jobs:
189190 rust-toolchain : nightly
190191 target : x86_64
191192 manylinux : auto
193+ before-script-linux : |
194+ # If we're running on rhel centos, install needed packages.
195+ if command -v yum &> /dev/null; then
196+ yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
197+
198+ # If we're running on i686 we need to symlink libatomic
199+ # in order to build openssl with -latomic flag.
200+ if [[ ! -d "/usr/lib64" ]]; then
201+ ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
202+ fi
203+ else
204+ # If we're running on debian-based system.
205+ apt update -y && apt-get install -y libssl-dev openssl pkg-config
206+ fi
192207 rustup-components : rust-std rustfmt # Keep them in one line due to https://github.com/PyO3/maturin-action/issues/153
193208 args : --release --manylinux 2014 --features protoc,substrait
194209 - name : Archive wheels
@@ -203,22 +218,44 @@ jobs:
203218 runs-on : ubuntu-latest
204219 steps :
205220 - uses : actions/checkout@v4
221+ - uses : awalsh128/cache-apt-pkgs-action@latest
222+ with :
223+ packages : libssl3 openssl
224+ version : 1.0
206225 - run : rm LICENSE.txt
207226 - name : Download LICENSE.txt
208227 uses : actions/download-artifact@v4
209228 with :
210229 name : python-wheel-license
211230 path : .
212231 - run : cat LICENSE.txt
232+ - name : Setup QEMU
233+ uses : docker/setup-qemu-action@v1
213234 - name : Build wheels
214235 uses : PyO3/maturin-action@v1
215236 env :
216- RUST_BACKTRACE : 1
237+ RUST_BACKTRACE : full
217238 with :
218239 rust-toolchain : nightly
219240 target : aarch64
220241 # Use manylinux_2_28-cross because the manylinux2014-cross has GCC 4.8.5, which causes the build to fail
221242 manylinux : 2_28
243+ container : " ghcr.io/rust-cross/manylinux_2_28-cross:aarch64"
244+ docker-options : " --platform linux/arm64 -e CFLAGS=\" -I/usr/include\" -e LDFLAGS=\" -L/usr/lib\" -e CFLAGS_aarch64_unknown_linux_gnu=\" -I/usr/include\" "
245+ before-script-linux : |
246+ # If we're running on rhel centos, install needed packages.
247+ if command -v yum &> /dev/null; then
248+ yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
249+
250+ # If we're running on i686 we need to symlink libatomic
251+ # in order to build openssl with -latomic flag.
252+ if [[ ! -d "/usr/lib64" ]]; then
253+ ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
254+ fi
255+ else
256+ # If we're running on debian-based system.
257+ apt update -y && apt-get install -y libssl-dev openssl pkg-config librust-openssl-sys-dev
258+ fi
222259 rustup-components : rust-std rustfmt # Keep them in one line due to https://github.com/PyO3/maturin-action/issues/153
223260 args : --release --features protoc,substrait
224261 - name : Archive wheels
@@ -227,35 +264,53 @@ jobs:
227264 name : dist-manylinux-aarch64
228265 path : target/wheels/*
229266
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
267+ # build-sdist:
268+ # needs: [generate-license]
269+ # name: Source distribution
270+ # runs-on: ubuntu-latest
271+ # steps:
272+ # - uses: actions/checkout@v4
273+ # - uses: awalsh128/cache-apt-pkgs-action@latest
274+ # with:
275+ # packages: libssl3 openssl
276+ # version: 1.0
277+ # - run: rm LICENSE.txt
278+ # - name: Download LICENSE.txt
279+ # uses: actions/download-artifact@v4
280+ # with:
281+ # name: python-wheel-license
282+ # path: .
283+ # - run: cat LICENSE.txt
284+ # - name: Build sdist
285+ # uses: PyO3/maturin-action@v1
286+ # with:
287+ # rust-toolchain: stable
288+ # manylinux: auto
289+ # before-script-linux: |
290+ # # If we're running on rhel centos, install needed packages.
291+ # if command -v yum &> /dev/null; then
292+ # yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
293+ #
294+ # # If we're running on i686 we need to symlink libatomic
295+ # # in order to build openssl with -latomic flag.
296+ # if [[ ! -d "/usr/lib64" ]]; then
297+ # ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
298+ # fi
299+ # else
300+ # # If we're running on debian-based system.
301+ # apt update -y && apt-get install -y libssl-dev openssl pkg-config
302+ # fi
303+ # rustup-components: rust-std rustfmt
304+ # args: --release --sdist --out dist --features protoc,substrait
305+ # - name: Assert sdist build does not generate wheels
306+ # run: |
307+ # if [ "$(ls -A target/wheels)" ]; then
308+ # echo "Error: Sdist build generated wheels"
309+ # exit 1
310+ # else
311+ # echo "Directory is clean"
312+ # fi
313+ # shell: bash
259314
260315 merge-build-artifacts :
261316 runs-on : ubuntu-latest
@@ -264,7 +319,7 @@ jobs:
264319 - build-macos-x86_64
265320 - build-manylinux-x86_64
266321 - build-manylinux-aarch64
267- - build-sdist
322+ # - build-sdist
268323 steps :
269324 - name : Merge Build Artifacts
270325 uses : actions/upload-artifact/merge@v4
0 commit comments