Skip to content

Commit ac1687a

Browse files
author
Red_M
committed
gitlab ci
1 parent 276da93 commit ac1687a

File tree

7 files changed

+95
-4
lines changed

7 files changed

+95
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ build
88
ssh2/libssh2.so*
99
redlibssh2/libssh2.so*
1010
src/
11+
ci/docker/manylinux*/libssh2

.gitlab-ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
build_manylinux_wheel_release:
3+
image: docker:dind
4+
services:
5+
- docker:dind
6+
variables:
7+
DOCKER_HOST: tcp://docker:2375
8+
DOCKER_TLS_CERTDIR: ""
9+
script:
10+
- apk add --no-cache bash git
11+
- git submodule update --init --recursive
12+
- chmod +x ./ci/gitlab/build-manylinux.sh
13+
- cp -r ./libssh2 ./ci/docker/manylinux_2014/libssh2
14+
- ./ci/gitlab/build-manylinux.sh
15+
artifacts:
16+
paths:
17+
- wheelhouse
18+
only:
19+
- master
20+
- /^0\.[0-9]+\.[0-9]+$/
21+
22+
test_build:
23+
image: debian:stable
24+
script:
25+
- date
26+
only:
27+
- master
28+
29+
#~ tests_py3.5:
30+
#~ image: debian:9
31+
#~ script:
32+
#~ - ./tests/scripts/install_root.sh GITLAB 3 5
33+
#~ - ./tests/scripts/install.sh GITLAB 3 5
34+
#~ - ./tests/scripts/test.sh GITLAB 3 5
35+
#~ artifacts:
36+
#~ paths:
37+
#~ - htmlcov
38+
#~ only:
39+
#~ - master

README.rst

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,14 @@ Super fast SSH2 protocol library. ``redlibssh2`` provides Python bindings for `l
2323
Installation
2424
______________
2525

26-
Binary wheel packages are provided for Linux, OSX and Windows, all Python versions. Wheel packages have **no dependencies**.
26+
Binary wheel packages are provided for Linux on all Python versions. Wheel packages have **no dependencies**.
2727

2828
``pip`` may need to be updated to be able to install binary wheel packages - ``pip install -U pip``.
2929

3030
.. code-block:: shell
3131
3232
pip install redlibssh2
3333
34-
`Conda <https://conda.io/miniconda.html>`_ is another installation option - see `documentation <http://redlibssh2.readthedocs.org/en/latest/>`_ for more detailed instructions.
35-
3634
For from source installation instructions, including building against system provided libssh2, `see documentation <https://redlibssh2.readthedocs.io/en/latest/installation.html#installation-from-source>`_.
3735

3836
For creating native system packages for Centos/RedHat, Ubuntu, Debian and Fedora, see `instructions in the documentation <http://redlibssh2.readthedocs.io/en/latest/installation.html#system-binary-packages>`_.
@@ -273,6 +271,19 @@ Performance of above example, compared with Paramiko.
273271
user 0m0.351s
274272
sys 0m0.021s
275273

274+
Why did you drop manylinux1 wheels?
275+
___________________________________
276+
277+
Because frankly the manylinux1 docker containers won't run on my build hosts because I run up to date software and kernels.
278+
The manylinux1 docker images are also full of extremely old package versions that will not receive updates or security fixes. The way that ParallelSSH handled this was to bundle their own versions of libssh2, OpenSSL and zlib in the repository.
279+
I moved to manylinux2014 because 2010 had old packages. If someone asks for a manylinux2010 wheel, I'll provide one but for now 2014 is what will be built and provided.
280+
281+
Why did you drop Windows and OSX wheels?
282+
________________________________________
283+
I don't have build infrastructure for them and I don't use these platforms anywhere.
284+
If someone would like these wheels to be built you can open an issue and it'll be reviewed based on what can be provided to get such builds running.
285+
286+
276287

277288
.. _libssh2: https://www.libssh2.org
278289
.. _Cython: https://www.cython.org

ci/docker/manylinux/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ RUN mkdir -p build_libssh2 && cd build_libssh2 && \
3232

3333
RUN rm -rf ${OPENSSL}* build_libssh2 libssh2.tar.gz
3434

35-
VOLUME /var/cache
35+
VOLUME /var/cache

ci/docker/manylinux_2014/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM quay.io/pypa/manylinux2014_x86_64
2+
3+
ENV SYSTEM_LIBSSH2 1
4+
5+
COPY ./libssh2 /libssh2
6+
7+
RUN yum -y --disablerepo="epel" install zlib-devel openssl-devel cmake gcc
8+
9+
# Libssh2
10+
RUN mkdir -p build_libssh2 && cd build_libssh2 && \
11+
cmake /libssh2 -DBUILD_SHARED_LIBS=ON -DENABLE_ZLIB_COMPRESSION=ON \
12+
-DENABLE_CRYPT_NONE=ON -DENABLE_MAC_NONE=ON -DCMAKE_INSTALL_PREFIX=/usr && \
13+
cmake --build . --config Release --target install
14+
15+
RUN rm -rf build_libssh2

ci/gitlab/build-manylinux.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
3+
export DOCKER_TAG=red_m/redlibssh2
4+
rm -rf build dist ssh2/libssh2.*
5+
6+
docker build -t $DOCKER_TAG ci/docker/manylinux_2014
7+
docker run --rm -v `pwd`:/io $DOCKER_TAG /io/ci/gitlab/build-wheels.sh
8+
ls wheelhouse/

ci/gitlab/build-wheels.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash -xe
2+
3+
# Compile wheels
4+
for PYBIN in `ls -1d /opt/python/*/bin | grep -v cpython`; do
5+
"${PYBIN}/pip" wheel /io/ -w wheelhouse/
6+
done
7+
8+
# Bundle external shared libraries into the wheels
9+
for whl in wheelhouse/*.whl; do
10+
auditwheel repair "$whl" -w /io/wheelhouse/
11+
done
12+
13+
# Install packages and test
14+
for PYBIN in `ls -1d /opt/python/*/bin | grep -v cpython`; do
15+
"${PYBIN}/pip" install redlibssh2 --no-index -f /io/wheelhouse
16+
(cd "$HOME"; "${PYBIN}/python" -c 'from ssh2.session import Session; Session()')
17+
done

0 commit comments

Comments
 (0)