Commit 8235f09d by eric pellegrini

Merge branch 'feature-remove-old-numeric' into 'develop'

Feature remove old numeric See merge request !11
parents 36a776e0 cc172fca
Pipeline #3828 passed with stages
in 18 minutes 21 seconds
/.project
/.pydevproject
/build/
*.pyc
.DS_Store
.env
.eggs
dist/
.DS_Store
Tests/FunctionalTests/Jobs
/.gitignore
/MANIFEST
.gitignore
.project
.pydevproject
.settings
MANIFEST
*.pyc
build/
dist/
stages:
- ci
- deploy
# trusty pipeline
ci:trusty:
- clean
############################
# ubuntu trusty pipeline
############################
ci:ubuntu_trusty:
stage: ci
script:
- ./BuildServer/Debian/run_build.sh
- ./BuildServer/Debian/run_tests.sh
- docker build --force-rm --build-arg MDANSE_GIT_COMMIT=${CI_COMMIT_SHA} -t ci_mdanse_trusty -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-trusty/Dockerfile_build .
allow_failure: false
tags:
- docker
- sci
- ubuntu
deploy:ubuntu_trusty:
stage: deploy
script:
- docker build --force-rm -t deploy_mdanse_trusty -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-trusty/Dockerfile_deploy .
- chmod 755 ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh
- ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh trusty
dependencies:
- ci:ubuntu_trusty
allow_failure: false
only:
- triggers
- tags
- /^feature-.*$/
- /^release-.*$/
- /^hotfix-.*$/
- /^bugfix-.*$/
- master
- develop
- /^release-*$/
- /^hotfix-*$/
- web
when: on_success
artifacts:
paths:
- build
expire_in: 1 day
- ./*.deb
tags:
- ubuntu14.04
- docker
- sci
- ubuntu
deploy:trusty:
############################
# ubuntu xenial pipeline
############################
ci:ubuntu_xenial:
stage: ci
script:
- docker build --force-rm --build-arg MDANSE_GIT_COMMIT=${CI_COMMIT_SHA} -t ci_mdanse_xenial -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-xenial/Dockerfile_build .
allow_failure: false
tags:
- docker
- sci
- ubuntu
deploy:ubuntu_xenial:
stage: deploy
script:
- ./BuildServer/Debian/run_deploy.sh amd64 trusty
- docker build --force-rm -t deploy_mdanse_xenial -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-xenial/Dockerfile_deploy .
- chmod 755 ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh
- ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh xenial
dependencies:
- ci:ubuntu_xenial
allow_failure: false
only:
- triggers
- tags
- master
- develop
dependencies:
- ci:trusty
- /^release-*$/
- /^hotfix-*$/
- web
when: on_success
artifacts:
paths:
- ./BuildServer/Debian/Build/*.deb
- ./*.deb
tags:
- ubuntu14.04
- docker
- sci
- ubuntu
# osx pipeline
ci:osx:
############################
# ubuntu bionic pipeline
############################
ci:ubuntu_bionic:
stage: ci
script:
- ./BuildServer/Darwin/Scripts/run_build.sh
- ./BuildServer/Darwin/Scripts/run_tests.sh
- docker build --force-rm --build-arg MDANSE_GIT_COMMIT=${CI_COMMIT_SHA} -t ci_mdanse_bionic -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-bionic/Dockerfile_build .
allow_failure: false
tags:
- docker
- sci
- ubuntu
deploy:ubuntu_bionic:
stage: deploy
script:
- docker build --force-rm -t deploy_mdanse_bionic -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-bionic/Dockerfile_deploy .
- chmod 755 ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh
- ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh bionic
dependencies:
- ci:ubuntu_bionic
allow_failure: false
only:
- triggers
- tags
- /^feature-.*$/
- /^release-.*$/
- /^hotfix-.*$/
- /^bugfix-.*$/
- master
- develop
- /^release-*$/
- /^hotfix-*$/
- web
when: on_success
artifacts:
paths:
- build
expire_in: 1 day
- ${CI_PROJECT_DIR}/*.deb
tags:
- macmini2
- docker
- sci
- ubuntu
############################
# osx high sierra pipeline
############################
ci:osx:
stage: ci
script:
- source ${CI_PROJECT_DIR}/BuildServer/Unix/definitions_macos.sh
- source ${CI_PROJECT_DIR}/BuildServer/Unix/version.sh
- ${CI_PROJECT_DIR}/BuildServer/Unix/build.sh
- ${CI_PROJECT_DIR}/BuildServer/Unix/tests.sh
allow_failure: false
artifacts:
paths:
- ${CI_PROJECT_DIR}/BuildServer/Unix/Build_macOS
expire_in: 1 hrs
tags:
- sci
- osx-10.13
deploy:osx:
stage: deploy
script:
- ./BuildServer/Darwin/Scripts/run_deploy.sh
only:
- triggers
- tags
- develop
- source ${CI_PROJECT_DIR}/BuildServer/Unix/definitions_macos.sh
- source ${CI_PROJECT_DIR}/BuildServer/Unix/version.sh
- ${CI_PROJECT_DIR}/BuildServer/Unix/deploy_macos.sh
dependencies:
- ci:osx
allow_failure: false
only:
- master
- develop
- /^release-*$/
- /^hotfix-*$/
- web
when: on_success
artifacts:
paths:
- BuildServer/Darwin/Build/*.dmg
- ${CI_PROJECT_DIR}/BuildServer/*.dmg
tags:
- macmini2
# windows 7 pipeline
- sci
- osx-10.13
############################
# windows 10 pipeline
# "call" is mandatory, see https://gitlab.com/gitlab-org/gitlab-runner/issues/1051
############################
ci:windows:
stage: ci
script:
- c:\cygwin64\bin\bash -c "dos2unix.exe ./BuildServer/Windows/run_build.sh"
- c:\cygwin64\bin\bash -c "chmod a+x ./BuildServer/Windows/run_build.sh"
- c:\cygwin64\bin\bash -c "./BuildServer/Windows/run_build.sh"
- c:\cygwin64\bin\bash -c "dos2unix.exe ./BuildServer/Windows/run_tests.sh"
- c:\cygwin64\bin\bash -c "chmod a+x ./BuildServer/Windows/run_tests.sh"
- c:\cygwin64\bin\bash -c "./BuildServer/Windows/run_tests.sh"
- call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\definitions.bat"
- call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\version.bat"
- call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\build.bat"
- call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\tests.bat"
allow_failure: false
only:
- triggers
- tags
- /^feature-.*$/
- /^release-.*$/
- /^hotfix-.*$/
- /^bugfix-.*$/
- develop
artifacts:
paths:
- .\BuildServer\Windows\Build
expire_in: 1 day
- "%CI_PROJECT_DIR%\\BuildServer\\Windows\\Build"
expire_in: 1 hrs
tags:
- windows
- sci
- windows-10
deploy:windows:
stage: deploy
script:
- c:\cygwin64\bin\bash -c "dos2unix.exe ./BuildServer/Windows/run_deploy.sh"
- c:\cygwin64\bin\bash -c "chmod a+x ./BuildServer/Windows/run_deploy.sh"
- c:\cygwin64\bin\bash -c "./BuildServer/Windows/run_deploy.sh"
only:
- triggers
- tags
- develop
- call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\definitions.bat"
- call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\version.bat"
- call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\deploy.bat"
dependencies:
- ci:windows
allow_failure: false
only:
- master
- develop
- /^release-*$/
- /^hotfix-*$/
- web
when: on_success
artifacts:
paths:
- BuildServer/Windows/Build/MDANSE*.exe
- "%CI_PROJECT_DIR%\\BuildServer\\*.exe"
tags:
- windows
- sci
- windows-10
clean:docker:
stage: clean
when: always
script:
- chmod 755 ${CI_PROJECT_DIR}/BuildServer/Docker/clean.sh
- ${CI_PROJECT_DIR}/BuildServer/Docker/clean.sh
tags:
- docker
- sci
- ubuntu
clean:osx:
stage: clean
when: always
script:
- source ${CI_PROJECT_DIR}/BuildServer/Unix/definitions_macos.sh
- ${CI_PROJECT_DIR}/BuildServer/Unix/clean.sh
tags:
- sci
- osx-10.13
clean:windows:
stage: clean
when: always
script:
- call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\definitions.bat"
- call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\clean.bat"
tags:
- sci
- windows-10
\ No newline at end of file
*.deb
*.dmg
*.exe
Unix/Build*
Windows/Build*
#!/bin/bash
# This script is to package the MDANSE package for Mac OS X
#############################
# CONFIGURATION
#############################
## Add some colors
ROUGE="\\033[1;31m"
BLEU="\\033[1;34m"
##Select the build target
# take the latest version of nmoldyn available on the forge
echo -e "$BLEU""Getting last MDANSE revision" "$NORMAL"
# Update the __pkginfo__ file with the current commit. The sed -i "" is compulsory other crashes on macos
COMMIT_ID=$(git rev-parse --short HEAD)
sed -i "" "s/.*__commit__.*/__commit__ = \"${COMMIT_ID}\"/" MDANSE/__pkginfo__.py
# Get revision number from git (without trailing newline)
echo -e "$BLEU""Commit id = ${COMMIT_ID}" "$NORMAL"
# Now build last version and install it in our homebrewed python
echo -e "$BLEU""Building MDANSE" "$NORMAL"
# Clean up temporary build directories
rm -rf build
rm -rf dist
# Remove previous install of MDANSE
rm /Library/Frameworks/Python.framework/Versions/2.7/bin/mdanse*
rm /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MDANSE*.egg-info
rm -rf /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MDANSE
# Build and install MDANSE to the homebrewed python
/Library/Frameworks/Python.framework/Versions/2.7/bin/python setup.py build >> BuildServer/Darwin/Scripts/build_log.txt 2>&1
status=$?
if [ $status -ne 0 ]; then
echo -e "$ROUGE" "Failed to build MDANSE" "$NORMAL"
exit $status
fi
/Library/Frameworks/Python.framework/Versions/2.7/bin/python setup.py install >> BuildServer/Darwin/Scripts/build_log.txt 2>&1
status=$?
if [ $status -ne 0 ]; then
echo -e "$ROUGE" "Failed to install MDANSE" "$NORMAL"
exit $status
fi
exit 0
\ No newline at end of file
#!/bin/bash
# This script is to package the MDANSE package for Mac OS X
#############################
# CONFIGURATION
#############################
## Add some colors
ROUGE="\\033[1;31m"
BLEU="\\033[1;34m"
COMMIT_ID=$(git rev-parse --short HEAD)
VERSION_NAME=`sed -n 's/__version__.*=.*\"\(.*\)\"/\1/p' MDANSE/__pkginfo__.py`
if [[ ${CI_BUILD_REF_NAME} =~ develop ]]
then
if [ -n "${WEEKLY_BUILD}" ]
then
VERSION_NAME=${VERSION_NAME}-"weekly-"`date +%Y-%m-%d`
fi
VERSION_NAME=${VERSION_NAME}-${COMMIT_ID}
fi
export VERSION_NAME
##Select the build target
BUILD_TARGET=darwin
echo -e "$BLEU""Packaging MDANSE" "$NORMAL"
rm -rf BuildServer/Darwin/Build
mkdir BuildServer/Darwin/Build
# debug option for py2app, if needed
export DISTUTILS_DEBUG=0
cd BuildServer/Darwin/Scripts
/usr/local/bin/python build.py py2app
status=$?
if [[ $status != 0 ]]; then
echo -e "$ROUGE""Cannot build app." "$NORMAL"
exit $status
fi
cd ../Build
# Do some manual cleanup, e.g.
# matplotlib/tests ==> 45.2 Mb
rm -rf dist/MDANSE.app/Contents/Resources/lib/python2.7/matplotlib/tests
rm -rf dist/MDANSE.app/Contents/Resources/mpl-data/sample_data
MDANSE_DMG=MDANSE-${VERSION_NAME}-${BUILD_TARGET}.dmg
#Add MDANSE version file (should read the version from the bundle with pyobjc, but will figure that out later)
echo "${VERSION_NAME}" > dist/MDANSE.app/Contents/Resources/version
rm -f ./${MDANSE_DMG}
rm -f ./rw.${MDANSE_DMG}
hdiutil unmount /Volumes/MDANSE -force -quiet
sleep 5
# When launching the bundle, the executable target (i.e. MDANSE) modify the python that is shipped with the bundle (si.e. package path, dylib dependencies ...)
# see http://joaoventura.net/blog/2016/embeddable-python-osx/ for technical details
# In our case we also want the user to be able to start directly python without launching the bundle executable (e.g. to run scripts in command line) which is the reason
# why we have to modify the python executable appropriately with the following commands
cp -r /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ ./dist/MDANSE.app/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7
rm -rf ./dist/MDANSE.app/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/*
cp /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python ./dist/MDANSE.app/Contents/MacOS/python
cp /Library/Frameworks/Python.framework/Versions/2.7/Python ./dist/MDANSE.app/Contents/Frameworks/Python.framework/Versions/2.7/libpython2.7.dylib
install_name_tool -change /Library/Frameworks/Python.framework/Versions/2.7/Python @executable_path/../Frameworks/Python.framework/Versions/2.7/libpython2.7.dylib ./dist/MDANSE.app/Contents/MacOS/python
chmod 777 ./dist/MDANSE.app/Contents/Frameworks/Python.framework/Versions/2.7/libpython2.7.dylib
install_name_tool -id @executable_path/../Frameworks/Python.framework/Versions/2.7/libpython2.7.dylib ./dist/MDANSE.app/Contents/Frameworks/Python.framework/Versions/2.7/libpython2.7.dylib
# In order that the modified python in the bundle import the zipped sitepackages located in Contents/Resources we provide a modified site.py that will
# update the sys.path accordingly
cp ../Scripts/site.py ./dist/MDANSE.app/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7/.
chmod 777 ../Scripts/change_dylib_path.sh
../Scripts/change_dylib_path.sh
../Tools/create-dmg/create-dmg --background "../Resources/background.jpg" --volname "MDANSE" --window-pos 200 120 --window-size 800 400 --icon MDANSE.app 200 190 --hide-extension MDANSE.app --app-drop-link 600 185 "${MDANSE_DMG}" ./dist
exit 0
#!/bin/bash
ROUGE="\\033[1;31m"
cd $CI_PROJECT_DIR
export PYTHONPATH=${CI_PROJECT_DIR}/build/lib.macosx-10.6-intel-2.7
# Performs the unit tests
cd Tests/UnitTests
/Library/Frameworks/Python.framework/Versions/2.7/bin/nosetests --verbosity=3 -P .
# Exit now if unable to run tests
status=$?
if [ $status -ne 0 ]; then
echo -e "$ROUGE""One or several unit tests failed"
exit $status
fi
cd ../..
# Performs the functional tests
cd Tests/FunctionalTests/Jobs
rm -rf Test_*
/Library/Frameworks/Python.framework/Versions/2.7/bin/python BuildJobTests.py
/Library/Frameworks/Python.framework/Versions/2.7/bin/nosetests --verbosity=3 --exe Test_*.py
status=$?
if [ $status -ne 0 ]; then
echo -e "$ROUGE""One or several functional tests failed"
exit $status
fi
exit 0
\ No newline at end of file
#!/bin/bash
export ARCH=$1
export DISTRO=$2
#############################
# CONFIGURATION
#############################
## Add some colors
BLEU="\\033[1;34m"
cd
cd $CI_PROJECT_DIR
# Update the __pkginfo__ file with the current commit
COMMIT_ID=$(git rev-parse --short HEAD)
sed -i "s/.*__commit__.*/__commit__ = \"${COMMIT_ID}\"/" MDANSE/__pkginfo__.py
# Get revision number from git (without trailing newline)
echo -e "$BLEU""Commit id = ${COMMIT_ID}<--" "$NORMAL"
# Now build last version
echo "$BLEU""Building MDANSE" "$NORMAL"
python setup.py build
status=$?
if [ $status -ne 0 ]; then
echo "Failed to build MDANSE"
exit $status
fi
exit 0
\ No newline at end of file
#!/bin/bash
ROUGE="\\033[1;31m"
cd $CI_PROJECT_DIR
export PYTHONPATH=${CI_PROJECT_DIR}/build/lib.linux-x86_64-2.7
# Performs the unit tests
cd Tests/UnitTests
nosetests --verbosity=3 -P .
# Exit now if unable to run tests
status=$?
if [ $? -ne 0 ]; then
echo -e "$ROUGE""One or several unit tests failed"
exit $status
fi
cd ../..
# Performs the functional tests
cd Tests/FunctionalTests/Jobs
rm -rf Test_*
python BuildJobTests.py
nosetests --verbosity=3 --exe Test_*.py
status=$?
if [ $status -ne 0 ]; then
echo -e "$ROUGE""One or several functional tests failed"
exit $status
fi
exit 0
\ No newline at end of file
FROM docker.ill.fr/scientific-software/mdanse:ubuntu-bionic
SHELL ["/bin/bash", "-c"]
ARG MDANSE_GIT_COMMIT
RUN GIT_SSL_NO_VERIFY=true git clone https://code.ill.fr/scientific-software/mdanse.git
WORKDIR mdanse
RUN git checkout ${MDANSE_GIT_COMMIT}
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/build.sh
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/tests.sh
FROM ci_mdanse_bionic
SHELL ["/bin/bash", "-c"]
VOLUME builds
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/deploy_debian.sh
FROM docker.ill.fr/scientific-software/mdanse:ubuntu-trusty
SHELL ["/bin/bash", "-c"]
ARG MDANSE_GIT_COMMIT
RUN GIT_SSL_NO_VERIFY=true git clone https://code.ill.fr/scientific-software/mdanse.git
WORKDIR mdanse
RUN git checkout ${MDANSE_GIT_COMMIT}
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/build.sh
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/tests.sh
FROM ci_mdanse_trusty
SHELL ["/bin/bash", "-c"]
VOLUME builds
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/deploy_debian.sh
FROM docker.ill.fr/scientific-software/mdanse:ubuntu-xenial
SHELL ["/bin/bash", "-c"]
ARG MDANSE_GIT_COMMIT
RUN GIT_SSL_NO_VERIFY=true git clone https://code.ill.fr/scientific-software/mdanse.git
WORKDIR mdanse
RUN git checkout ${MDANSE_GIT_COMMIT}
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/build.sh
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/tests.sh
FROM ci_mdanse_xenial
SHELL ["/bin/bash", "-c"]
VOLUME builds
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/deploy_debian.sh
FROM ubuntu:bionic
RUN export DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y tzdata
RUN apt-get upgrade -y
RUN apt-get install -y --no-install-recommends fakeroot
RUN apt-get install -y --no-install-recommends git
RUN apt-get install -y --no-install-recommends graphviz
RUN apt-get install -y --no-install-recommends dos2unix
RUN apt-get install -y --no-install-recommends texlive-full
RUN apt-get install -y --no-install-recommends texlive-latex-extra
RUN apt-get install -y --no-install-recommends libnetcdf-dev
RUN apt-get install -y --no-install-recommends g++
RUN apt-get install -y --no-install-recommends cython
RUN apt-get install -y --no-install-recommends python-dev
RUN apt-get install -y --no-install-recommends python-wxmpl
RUN apt-get install -y --no-install-recommends python-vtk6
RUN apt-get install -y --no-install-recommends python-nose
RUN apt-get install -y --no-install-recommends python-sphinx
RUN apt-get install -y --no-install-recommends pyro
FROM ubuntu:trusty
RUN apt-get update
RUN apt-get install -y tzdata
RUN apt-get upgrade -y
RUN apt-get install -y --no-install-recommends fakeroot
RUN apt-get install -y --no-install-recommends git