Skip to content

Commit 7d36d21

Browse files
committed
install OpenSSL on linux runners
taking into account CentOS vs. Debian-based manylinux images. Solution taken from: sfackler/rust-openssl#2036 (comment)
1 parent b63acfe commit 7d36d21

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/pypi.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,20 @@ jobs:
4848
args: --release --out dist --find-interpreter
4949
sccache: 'true'
5050
manylinux: auto
51+
before-script-linux: |
52+
# If we're running on rhel centos, install needed packages.
53+
if command -v yum &> /dev/null; then
54+
yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
55+
56+
# If we're running on i686 we need to symlink libatomic
57+
# in order to build openssl with -latomic flag.
58+
if [[ ! -d "/usr/lib64" ]]; then
59+
ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
60+
fi
61+
else
62+
# If we're running on debian-based system.
63+
apt update -y && apt-get install -y libssl-dev openssl pkg-config
64+
fi
5165
- name: Upload wheels
5266
uses: actions/upload-artifact@v4
5367
with:

0 commit comments

Comments
 (0)