@@ -19,29 +19,11 @@ jobs:
1919 override : true
2020
2121 - name : Set up Python
22- uses : actions/setup-python@v4
22+ uses : actions/setup-python@v5
2323 with :
24- python-version : ' 3.x '
24+ python-version : ' 3.10 '
2525 cache : ' pip'
26-
27- - name : Set up Perl
28- uses : perl-actions/install-with-cpanm@v1
29- with :
30- install : |
31- IPC::Cmd
32- Text::Template
33- IPC::Run3
34- Test::More
35- YAML
36-
37- - name : Install system dependencies
38- run : |
39- sudo apt-get update && sudo apt-get install -y \
40- libclang-dev \
41- liblzma-dev \
42- libperl-dev \
43- perl-modules
44-
26+
4527 # awk '/dependencies = \[/,/\]/' pyproject.toml | \
4628 # grep -v "dependencies" | \
4729 # grep -v "\[" | grep -v "\]" | tr -d '", ' | \
5133 uses : PyO3/maturin-action@v1
5234 with :
5335 target : ${{ matrix.target }}
36+ sccache : ' true'
37+ args : --release --out dist --find-interpreter
5438 manylinux : auto
55- args : --release --out dist
39+ # Following is a workaround taken from:
40+ # https://github.com/Intreecom/scyllapy/blob/develop/.github/workflows/release.yaml
41+ before-script-linux : |
42+ set -ex
43+
44+ # If we're running on rhel centos, install needed packages.
45+ if command -v yum &> /dev/null; then
46+ yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic clang-devel xz-devel
47+
48+ # If we're running on i686 we need to symlink libatomic
49+ # in order to build openssl with -latomic flag.
50+ if [[ ! -d "/usr/lib64" ]]; then
51+ ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
52+ fi
53+
54+ OPENSSL_LIB_DIR=/usr/lib
55+ else
56+ # If we're running on debian-based system.
57+ apt update -y && apt-get install -y libssl-dev openssl pkg-config libclang-dev liblzma-dev
58+
59+ OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu
60+ fi
61+
62+ export OPENSSL_DIR="/usr/lib/ssl"
63+ export OPENSSL_INCLUDE_DIR=/usr/include/openssl
64+ export OPENSSL_NO_VENDOR=1
65+
66+ ls $OPENSSL_LIB_DIR
67+ ls $OPENSSL_INCLUDE_DIR
68+
69+
70+ echo "OpenSSL Lib Dir: $OPENSSL_LIB_DIR"
71+ echo "OpenSSL Include Dir: $OPENSSL_INCLUDE_DIR"
72+
73+ pkg-config --list-all
74+ pkg-config --libs --cflags openssl
0 commit comments