Commit 31bb0c3a by eric pellegrini

Fixed merge conflicts

parents 960ec49c 7ee5dff6
Pipeline #3889 passed with stages
in 26 minutes 26 seconds
/.project
/.pydevproject
/build/
*.pyc
.DS_Store
.env
.eggs
.gitignore
.project
.pydevproject
.settings
MANIFEST
*.pyc
build/
dist/
.DS_Store
Tests/FunctionalTests/Jobs
/.gitignore
/MANIFEST
stages:
- build
- test
- docker_login
- ci
- deploy
# trusty pipeline
build:trusty:
stage: build
- clean
docker_login:
stage: docker_login
script:
- ./BuildServer/Debian/run_build.sh
allow_failure: false
only:
- triggers
- tags
- /^feature-.*$/
- /^release-.*$/
- /^hotfix-.*$/
- /^bugfix-.*$/
- develop
artifacts:
paths:
- build
expire_in: 1 day
- docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
tags:
- ubuntu14.04
test:trusty:
stage: test
- docker
- sci
- ubuntu
############################
# ubuntu trusty pipeline
############################
ci:ubuntu_trusty:
stage: ci
script:
- ./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
only:
- triggers
- tags
- /^feature-.*$/
- /^release-.*$/
- /^hotfix-.*$/
- /^bugfix-.*$/
- develop
dependencies:
- build:trusty
tags:
- ubuntu14.04
- docker
- sci
- ubuntu
deploy:trusty:
deploy:ubuntu_trusty:
stage: deploy
script:
- ./BuildServer/Debian/run_deploy.sh amd64 trusty
- 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
- master
- develop
- /^release-.*$/
- /^hotfix-.*$/
- web
when: on_success
artifacts:
paths:
- ./BuildServer/Debian/Build/*.deb
- ./*.deb
tags:
- ubuntu14.04
- docker
- sci
- ubuntu
# osx pipeline
############################
# 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
build:osx:
stage: build
deploy:ubuntu_xenial:
stage: deploy
script:
- ./BuildServer/Darwin/Scripts/run_build.sh
- 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
- /^feature-.*$/
- master
- develop
- /^release-.*$/
- /^hotfix-.*$/
- /^bugfix-.*$/
- develop
- web
when: on_success
artifacts:
paths:
- build
expire_in: 1 day
- ./*.deb
tags:
- mac
- docker
- sci
- ubuntu
test:osx:
stage: test
############################
# ubuntu bionic pipeline
############################
ci:ubuntu_bionic:
stage: ci
script:
- ./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
only:
- triggers
- tags
- /^feature-.*$/
- /^release-.*$/
- /^hotfix-.*$/
- /^bugfix-.*$/
- develop
dependencies:
- build:osx
tags:
- mac
- docker
- sci
- ubuntu
deploy:osx:
deploy:ubuntu_bionic:
stage: deploy
script:
- ./BuildServer/Darwin/Scripts/run_deploy.sh
- 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
- master
- develop
- /^release-.*$/
- /^hotfix-.*$/
- web
when: on_success
artifacts:
paths:
- BuildServer/Darwin/Build/*.dmg
- ${CI_PROJECT_DIR}/*.deb
tags:
- mac
- docker
- sci
- ubuntu
# # windows 7 pipeline
############################
# 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
build:windows:
stage: build
deploy:osx:
stage: deploy
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"
- 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:
- triggers
- tags
- /^feature-.*$/
- master
- develop
- /^release-.*$/
- /^hotfix-.*$/
- /^bugfix-.*$/
- develop
- web
when: on_success
artifacts:
paths:
- .\BuildServer\Windows\Build
expire_in: 1 day
- ${CI_PROJECT_DIR}/BuildServer/*.dmg
tags:
- windows
- sci
- osx-10.13
test:windows:
stage: test
############################
# 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_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
dependencies:
- build:windows
artifacts:
paths:
- "%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"
- 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:
- triggers
- tags
- master
- develop
- /^release-.*$/
- /^hotfix-.*$/
- web
when: on_success
artifacts:
paths:
- BuildServer/Windows/Build/MDANSE*.exe
- "%CI_PROJECT_DIR%\\BuildServer\\*.exe"
tags:
- 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
after_script:
- docker logout
tags:
- windows
- 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
*.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
BUILD_TARGET=darwin
# 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 /usr/local/bin/mdanse*
rm /usr/local/lib/python2.7/site-packages/MDANSE*.egg-info
rm -rf /usr/local/lib/python2.7/site-packages/MDANSE
# Build and install MDANSE to the homebrewed python
/usr/local/bin/python setup.py build >> BuildServer/Darwin/Scripts/build_log.txt 2>&1
/usr/local/bin/python setup.py install >> BuildServer/Darwin/Scripts/build_log.txt 2>&1
#!/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 >> build_log.txt 2>&1
rc=$?
if [[ $rc != 0 ]]; then
echo -e "$ROUGE""Cannot build app." "$NORMAL"
exit 1
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
../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
#!/bin/bash
ROUGE="\\033[1;31m"
# Performs the unit tests
cd Tests/UnitTests
nosetests --verbosity=3 -P .
# Exit now if unable to run tests
if [ $? -ne 0 ]; then
status = $?
echo -e "$ROUGE""One or several unit tests failed"
exit status
fi
cd ../..
cd Tests/FunctionalTests/Jobs
python BuildJobTests.py
nosetests --verbosity=3 --exe -P .
if [ $? -ne 0 ]; then
status=$?
echo -e "$ROUGE""One or several functional tests failed"
exit status
fi
cd ../../..
#!/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
#!/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
if [ $? -ne 0 ]; then
status = $?
echo -e "$ROUGE""One or several unit tests failed"
exit status
fi
cd ../..
# Performs the functional tests
cd Tests/FunctionalTests/Jobs
python BuildJobTests.py
nosetests --verbosity=3 --exe -P .
if [ $? -ne 0 ]; then
status=$?
echo -e "$ROUGE""One or several functional tests failed"
exit status
fi
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