Skip to content

Commit f2ac7dc

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

File tree

1 file changed

+60
-8
lines changed

1 file changed

+60
-8
lines changed

.github/workflows/build.yml

Lines changed: 60 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,6 +218,10 @@ 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
@@ -219,6 +238,21 @@ jobs:
219238
target: aarch64
220239
# Use manylinux_2_28-cross because the manylinux2014-cross has GCC 4.8.5, which causes the build to fail
221240
manylinux: 2_28
241+
before-script-linux: |
242+
# If we're running on rhel centos, install needed packages.
243+
if command -v yum &> /dev/null; then
244+
yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
245+
246+
# If we're running on i686 we need to symlink libatomic
247+
# in order to build openssl with -latomic flag.
248+
if [[ ! -d "/usr/lib64" ]]; then
249+
ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
250+
fi
251+
else
252+
# If we're running on debian-based system.
253+
apt update -y && apt-get install -y libssl-dev openssl pkg-config
254+
fi
255+
docker-options: "--platform linux/arm64"
222256
rustup-components: rust-std rustfmt # Keep them in one line due to https://github.com/PyO3/maturin-action/issues/153
223257
args: --release --features protoc,substrait
224258
- name: Archive wheels
@@ -233,6 +267,10 @@ jobs:
233267
runs-on: ubuntu-latest
234268
steps:
235269
- uses: actions/checkout@v4
270+
- uses: awalsh128/cache-apt-pkgs-action@latest
271+
with:
272+
packages: libssl3 openssl
273+
version: 1.0
236274
- run: rm LICENSE.txt
237275
- name: Download LICENSE.txt
238276
uses: actions/download-artifact@v4
@@ -245,6 +283,20 @@ jobs:
245283
with:
246284
rust-toolchain: stable
247285
manylinux: auto
286+
before-script-linux: |
287+
# If we're running on rhel centos, install needed packages.
288+
if command -v yum &> /dev/null; then
289+
yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
290+
291+
# If we're running on i686 we need to symlink libatomic
292+
# in order to build openssl with -latomic flag.
293+
if [[ ! -d "/usr/lib64" ]]; then
294+
ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
295+
fi
296+
else
297+
# If we're running on debian-based system.
298+
apt update -y && apt-get install -y libssl-dev openssl pkg-config
299+
fi
248300
rustup-components: rust-std rustfmt
249301
args: --release --sdist --out dist --features protoc,substrait
250302
- name: Assert sdist build does not generate wheels

0 commit comments

Comments
 (0)