From 317a06fb70895a32500f7e8b4817dbe1c094d44f Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 16 Apr 2024 12:00:39 +0100 Subject: [PATCH] Account for both CentOS and Debian containers --- .github/workflows/pypi.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index df7cbe1..aa6a77b 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -48,7 +48,20 @@ jobs: args: --release --out dist --find-interpreter sccache: 'true' manylinux: auto - before-script-linux: yum install -y perl-IPC-Cmd + before-script-linux: | + # If we're running on rhel centos, install needed packages. + if command -v yum &> /dev/null; then + yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic + + # If we're running on i686 we need to symlink libatomic + # in order to build openssl with -latomic flag. + if [[ ! -d "/usr/lib64" ]]; then + ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so + fi + else + # If we're running on debian-based system. + apt update -y && apt-get install -y libssl-dev openssl pkg-config + fi - name: Upload wheels uses: actions/upload-artifact@v4 with: