Skip to content

Commit 777f28a

Browse files
committed
[HSTACK] Enable build action run
1 parent 3be6774 commit 777f28a

File tree

1 file changed

+63
-8
lines changed

1 file changed

+63
-8
lines changed

.github/workflows/build.yml

Lines changed: 63 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,8 @@
1717

1818
name: Python Release Build
1919
on:
20-
pull_request:
21-
branches: ["main"]
2220
push:
23-
tags: ["*-rc*"]
24-
branches: ["branch-*"]
21+
branches: ["main*"]
2522

2623
jobs:
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,13 +218,19 @@ 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:
@@ -219,6 +240,22 @@ jobs:
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"
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
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
@@ -233,6 +270,10 @@ jobs:
233270
runs-on: ubuntu-latest
234271
steps:
235272
- uses: actions/checkout@v4
273+
- uses: awalsh128/cache-apt-pkgs-action@latest
274+
with:
275+
packages: libssl3 openssl
276+
version: 1.0
236277
- run: rm LICENSE.txt
237278
- name: Download LICENSE.txt
238279
uses: actions/download-artifact@v4
@@ -245,6 +286,20 @@ jobs:
245286
with:
246287
rust-toolchain: stable
247288
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
248303
rustup-components: rust-std rustfmt
249304
args: --release --sdist --out dist --features protoc,substrait
250305
- name: Assert sdist build does not generate wheels

0 commit comments

Comments
 (0)