@@ -89,19 +89,27 @@ jobs:
8989 - uses : actions/checkout@v3
9090 with :
9191 submodules : ' true'
92- - name : Install system dependencies
93- run : |
94- sudo apt-get update
95- sudo apt-get install -y perl libperl5.38
96- - name : Set environment for vendored OpenSSL
97- run : echo "OPENSSL_STATIC=1" >> $GITHUB_ENV
9892 - name : Build x86_64 wheels
9993 uses : PyO3/maturin-action@v1
10094 if : ${{ matrix.target == 'x86_64' }}
10195 with :
10296 target : ${{ matrix.target }}
10397 manylinux : auto
10498 args : --release --out dist -m rust/maprando/Cargo.toml -i python${{ matrix.python }}
99+ before-script-linux : |
100+ # If we're running on rhel centos, install needed packages.
101+ if command -v yum &> /dev/null; then
102+ yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
103+
104+ # If we're running on i686 we need to symlink libatomic
105+ # in order to build openssl with -latomic flag.
106+ if [[ ! -d "/usr/lib64" ]]; then
107+ ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
108+ fi
109+ else
110+ # If we're running on debian-based system.
111+ apt update -y && apt-get install -y libssl-dev openssl pkg-config
112+ fi
105113 - name : Build aarch64 wheels
106114 uses : PyO3/maturin-action@v1
107115 # One of our deps, "ring", needs a newer sysroot than what "manylinux: auto" provides.
@@ -110,6 +118,20 @@ jobs:
110118 target : ${{ matrix.target }}
111119 manylinux : 2_28
112120 args : --release --out dist -m rust/maprando/Cargo.toml -i python${{ matrix.python }}
121+ before-script-linux : |
122+ # If we're running on rhel centos, install needed packages.
123+ if command -v yum &> /dev/null; then
124+ yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
125+
126+ # If we're running on i686 we need to symlink libatomic
127+ # in order to build openssl with -latomic flag.
128+ if [[ ! -d "/usr/lib64" ]]; then
129+ ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
130+ fi
131+ else
132+ # If we're running on debian-based system.
133+ apt update -y && apt-get install -y libssl-dev openssl pkg-config
134+ fi
113135 - name : Set env
114136 run : echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
115137 - name : Create Release
0 commit comments