Commit a1ac88ac authored by LAMBERT Jean-charles's avatar LAMBERT Jean-charles

add Continous Integration

parent 7c4860bc
Pipeline #1438 failed
#
# Copyright Jean-Charles Lambert, 2018-2019
#
# - YAML file for Continous Integration / Continous Deployement
# - unsio and python-unsio packages (RPM or DEB) are automatically
# generated at new commit for different linux distribution
# - add manylinux building for python-module
#
# - Documentation :
# https://docs.gitlab.com/ee/ci/yaml/
stages:
- manylinux
before_script:
# clone
#- git clone https://gitlab.lam.fr/jclamber/unsio.git
#- cd unsio
#- git branch -r
#- git checkout origin/new_cmake
manylinux2010 :
stage : manylinux
image : portus.lam.fr/jclamber/unsio June-manylinux2010
script:
# build
CI/script/build-unsio.sh
CI/script/build-wheel.sh
CI/script/repair-wheel.sh
CI/script/test-unsio.sh
artifacts:
name: "manylinux2010"
paths:
- test-*.res
- wheel/*
#
# RPM Distros
#
opensuse42.3 :
stage : build
image: ppfb.lam.fr:5000/jcl-dev/opensuse42.3
only :
- tags
script:
# build
- ../CI/build-rpm.sh 0opensuse42.3
artifacts:
name: "opensuse42.3"
paths:
- unsio/build/*.rpm
- unsio/dist/*.rpm
- unsio/dist/*.gz
fedora28 :
stage : build
image: ppfb.lam.fr:5000/jcl-dev/fedora28
only :
- tags
script:
# build
- ../CI/build-rpm.sh 0fc28
artifacts:
name: "fedora28"
paths:
- unsio/build/*.rpm
- unsio/dist/*.rpm
- unsio/dist/*.gz
fedora27 :
stage : build
image: ppfb.lam.fr:5000/jcl-dev/fedora27
only :
- tags
script:
# build
- ../CI/build-rpm.sh 0fc27
artifacts:
name: "fedora27"
paths:
- unsio/build/*.rpm
- unsio/dist/*.rpm
- unsio/dist/*.gz
mageia6 :
stage : build
image: ppfb.lam.fr:5000/jcl-dev/mageia6
only :
- tags
script:
# build
- ../CI/build-rpm.sh 0mga6
artifacts:
name: "mageia6"
paths:
- unsio/build/*.rpm
- unsio/dist/*.rpm
- unsio/dist/*.gz
#
# DEB distos
#
ubuntu 18.04:
stage : build
image: ppfb.lam.fr:5000/jcl-dev/ubuntu18.04
only :
- tags
script:
# build
- ../CI/build-deb.sh 0ubuntu18.04
artifacts:
name: "ubuntu18.04"
paths:
- unsio/build/*.deb
- unsio/my_deb/*.deb
- unsio/my_deb/*.gz
ubuntu 16.04:
stage : build
image: ppfb.lam.fr:5000/jcl-dev/ubuntu16.04
only :
- tags
script:
# build
- ../CI/build-deb.sh 0ubuntu16.04
artifacts:
name: "ubuntu16.04"
paths:
- unsio/build/*.deb
- unsio/my_deb/*.deb
- unsio/my_deb/*.gz
FROM quay.io/pypa/manylinux2010_x86_64
RUN yum install -y gcc-c++ make pcre-devel ccache wget \
hdf5-devel cmake3 cfitsio-devel zlib-devel
# Install SWIG 4.0.1
RUN \
cd /opt &&\
curl -L 'https://sourceforge.net/projects/swig/files/swig/swig-4.0.1/swig-4.0.1.tar.gz' \
--output swig-4.0.1.tar.gz &&\
tar xzf swig-4.0.1.tar.gz &&\
cd /opt/swig-4.0.1 &&\
./configure --prefix=/opt/usr &&\
make -j4 && make install
# Install numpy minimum requirements for swig
# Install twin
RUN \
/opt/python/cp27-cp27m/bin/pip install numpy==1.8.2 twine &&\
/opt/python/cp27-cp27mu/bin/pip install numpy==1.8.2 twine &&\
/opt/python/cp34-cp34m/bin/pip install numpy==1.8.2 twine &&\
/opt/python/cp35-cp35m/bin/pip install numpy==1.9.0 twine &&\
/opt/python/cp36-cp36m/bin/pip install numpy==1.11.3 twine &&\
/opt/python/cp37-cp37m/bin/pip install numpy==1.14.5 twine
# trick to resize image
FROM quay.io/pypa/manylinux2010_x86_64
RUN yum install -y gcc-c++ make pcre-devel ccache wget \
hdf5-devel cmake3 cfitsio-devel zlib-devel
COPY --from=0 /opt/usr /opt/usr
COPY --from=0 /opt/python /opt/python
COPY --from=0 /opt/_internal /opt/_internal
ENV PATH /opt/usr/bin/:$PATH
#!/bin/bash
cmake3 . -DCMAKE_INSTALL_PREFIX=/usr
make -j 5
make install
# build wheel
#PATH=/opt/usr/bin/:/opt/python/cp27-cp27m/bin:${PATH} pip wheel ./unsio/ -w wheelhouse
# build wheel
for PYBIN in /opt/python/*/bin/; do
echo "Compiling using pip version ${PYBIN}...."
PATH=/opt/usr/bin/:${PYBIN}:${PATH} pip wheel --no-deps ./ -w wheelhouse
done
# repair wheel
#auditwheel repair wheelhouse/python_unsio-0.9.3rc3-cp27-cp27m-linux_x86_64.whl -w ./wheel-repaired
# test
#PATH=/opt/usr/bin/:/opt/python/cp27-cp27m/bin:${PATH} python -m unsio.test.ctestunsio
cd /
git clone https://gitlab.lam.fr/jclamber/unsio.git
cd /unsio
git checkout --track origin/saveheader
# Bundle external shared libraries into the wheels
for whl in wheelhouse/*unsio*.whl; do
echo "repairing $whl...."
auditwheel repair "$whl" -w ./wheel
done
# install & test wheel
for PYPATH in /opt/python/*; do
echo "Testing with ${PYPATH}...."
PATH=/opt/usr/bin/:${PYPATH}/bin:${PATH} pip install wheelhouse/*unsio*`basename ${PYPATH}`*.whl
PATH=/opt/usr/bin/:${PYPATH}/bin:${PATH} python -m unsio.test.ctestunsio --out test-`basename ${PYPATH}`.res
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment