Skip to content

Commit 4db5542

Browse files
committed
go
1 parent 07c52ae commit 4db5542

File tree

2 files changed

+42
-23
lines changed

2 files changed

+42
-23
lines changed

.github/workflows/maturin_builds.yml

Lines changed: 41 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -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 '", ' | \
@@ -51,5 +33,42 @@ jobs:
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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ name = "hp"
99
crate-type = ["cdylib"]
1010

1111
[dependencies]
12-
openssl = { version = "*", features = ["vendored"] }
12+
openssl = "*"
1313
pyo3 = { version = "0.23.4", features = ["extension-module"] }
1414
rust-htslib = "0.49.0"
1515
rayon = "1.10.0"

0 commit comments

Comments
 (0)