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
@@ -189,6 +191,20 @@ jobs:
189191 rust-toolchain : nightly
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,44 @@ 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 :
218240 rust-toolchain : nightly
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
222260 rustup-components : rust-std rustfmt # Keep them in one line due to https://github.com/PyO3/maturin-action/issues/153
223261 args : --release --features protoc,substrait
224262 - name : Archive wheels
@@ -227,35 +265,53 @@ jobs:
227265 name : dist-manylinux-aarch64
228266 path : target/wheels/*
229267
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
268+ # build-sdist:
269+ # needs: [generate-license]
270+ # name: Source distribution
271+ # runs-on: ubuntu-latest
272+ # steps:
273+ # - uses: actions/checkout@v4
274+ # - uses: awalsh128/cache-apt-pkgs-action@latest
275+ # with:
276+ # packages: libssl3 openssl
277+ # version: 1.0
278+ # - run: rm LICENSE.txt
279+ # - name: Download LICENSE.txt
280+ # uses: actions/download-artifact@v4
281+ # with:
282+ # name: python-wheel-license
283+ # path: .
284+ # - run: cat LICENSE.txt
285+ # - name: Build sdist
286+ # uses: PyO3/maturin-action@v1
287+ # with:
288+ # rust-toolchain: stable
289+ # manylinux: auto
290+ # before-script-linux: |
291+ # # If we're running on rhel centos, install needed packages.
292+ # if command -v yum &> /dev/null; then
293+ # yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
294+ #
295+ # # If we're running on i686 we need to symlink libatomic
296+ # # in order to build openssl with -latomic flag.
297+ # if [[ ! -d "/usr/lib64" ]]; then
298+ # ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
299+ # fi
300+ # else
301+ # # If we're running on debian-based system.
302+ # apt update -y && apt-get install -y libssl-dev openssl pkg-config
303+ # fi
304+ # rustup-components: rust-std rustfmt
305+ # args: --release --sdist --out dist --features protoc,substrait
306+ # - name: Assert sdist build does not generate wheels
307+ # run: |
308+ # if [ "$(ls -A target/wheels)" ]; then
309+ # echo "Error: Sdist build generated wheels"
310+ # exit 1
311+ # else
312+ # echo "Directory is clean"
313+ # fi
314+ # shell: bash
259315
260316 merge-build-artifacts :
261317 runs-on : ubuntu-latest
@@ -264,7 +320,7 @@ jobs:
264320 - build-macos-x86_64
265321 - build-manylinux-x86_64
266322 - build-manylinux-aarch64
267- - build-sdist
323+ # - build-sdist
268324 steps :
269325 - name : Merge Build Artifacts
270326 uses : actions/upload-artifact/merge@v4
0 commit comments