Commit 8235f09d authored by eric pellegrini's avatar 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
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
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-vtk
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:xenial
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-vtk
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
#!/bin/bash
docker build --force-rm -t docker.ill.fr/scientific-software/mdanse:$1 -f $2/Dockerfile .
# Return the docker containers that are exited
exited_containers=`docker ps -q -f "status=exited"`
# If some have been found, remove them
if [ -n "$exited_containers" ]
then
docker rm -f ${exited_containers}
fi
# Return the docker images corresponding to MDANSE
images=`docker images -a --format "{{.Repository}}:{{.Tag}}" | grep _mdanse_`
# If some have been found, remove them
if [ -n "$images" ]
then
docker rmi -f ${images}
fi
# Return the docker images that are in dangling state
images=`docker images -q -f "dangling=true"`
# If some dangling images have been found, remove them
if [ -n "$images" ]
then
docker rmi -f ${images}
fi
docker run --rm -iv${PWD}:/artifacts/ deploy_mdanse_$1 << COMMANDS
chmod 755 /mdanse/BuildServer/*.deb
cp -a /mdanse/BuildServer/*.deb /artifacts/.
COMMANDS