Commit 17010329 authored by Remi Perenon's avatar Remi Perenon

Merge branch 'build-add_build_branches_and_clean_macos_dmg' into 'develop'

Build add build branches and clean macos dmg

See merge request !35
parents 79af7515 a04d2ad1
Pipeline #4344 passed with stages
in 32 minutes and 12 seconds
...@@ -40,6 +40,7 @@ deploy:ubuntu_trusty: ...@@ -40,6 +40,7 @@ deploy:ubuntu_trusty:
- develop - develop
- /^release-.*$/ - /^release-.*$/
- /^hotfix-.*$/ - /^hotfix-.*$/
- /^build-.*$/
- tags - tags
- web - web
when: on_success when: on_success
...@@ -78,6 +79,7 @@ deploy:ubuntu_xenial: ...@@ -78,6 +79,7 @@ deploy:ubuntu_xenial:
- develop - develop
- /^release-.*$/ - /^release-.*$/
- /^hotfix-.*$/ - /^hotfix-.*$/
- /^build-.*$/
- tags - tags
- web - web
when: on_success when: on_success
...@@ -116,6 +118,7 @@ deploy:ubuntu_bionic: ...@@ -116,6 +118,7 @@ deploy:ubuntu_bionic:
- develop - develop
- /^release-.*$/ - /^release-.*$/
- /^hotfix-.*$/ - /^hotfix-.*$/
- /^build-.*$/
- tags - tags
- web - web
when: on_success when: on_success
...@@ -161,6 +164,7 @@ deploy:osx: ...@@ -161,6 +164,7 @@ deploy:osx:
- develop - develop
- /^release-.*$/ - /^release-.*$/
- /^hotfix-.*$/ - /^hotfix-.*$/
- /^build-.*$/
- tags - tags
- web - web
when: on_success when: on_success
...@@ -207,6 +211,7 @@ deploy:windows: ...@@ -207,6 +211,7 @@ deploy:windows:
- develop - develop
- /^release-.*$/ - /^release-.*$/
- /^hotfix-.*$/ - /^hotfix-.*$/
- /^build-.*$/
- tags - tags
- web - web
when: on_success when: on_success
......
...@@ -6,3 +6,7 @@ export PYTHONEXE=/usr/bin/python ...@@ -6,3 +6,7 @@ export PYTHONEXE=/usr/bin/python
export SED_I_COMMAND=(sed -i) export SED_I_COMMAND=(sed -i)
# Define colors
export RED="\\033[1;31m"
export BLUE="\\033[1;34m"
export NORMAL="\\033[0m"
...@@ -9,7 +9,6 @@ export DISTUTILS_DEBUG=0 ...@@ -9,7 +9,6 @@ export DISTUTILS_DEBUG=0
############################# #############################
# PREPARATION # PREPARATION
############################# #############################
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DEBIAN_ROOT_DIR=${CI_TEMP_DIR}/dist DEBIAN_ROOT_DIR=${CI_TEMP_DIR}/dist
...@@ -75,4 +74,3 @@ if [ $status -ne 0 ]; then ...@@ -75,4 +74,3 @@ if [ $status -ne 0 ]; then
echo -e "${RED}" "Cannot build app.""${NORMAL}" echo -e "${RED}" "Cannot build app.""${NORMAL}"
exit $status exit $status
fi fi
...@@ -12,4 +12,3 @@ do ...@@ -12,4 +12,3 @@ do
install_name_tool -change /usr/local/lib/libwx_$l-3.0.dylib @executable_path/../Frameworks/libwx_$l-3.0.dylib $f install_name_tool -change /usr/local/lib/libwx_$l-3.0.dylib @executable_path/../Frameworks/libwx_$l-3.0.dylib $f
done done
done done
...@@ -7,3 +7,7 @@ export PYTHONEXE=/usr/bin/python ...@@ -7,3 +7,7 @@ export PYTHONEXE=/usr/bin/python
# The sed -i"" is compulsory other crashes on macos # The sed -i"" is compulsory other crashes on macos
export SED_I_COMMAND=(sed -i "") export SED_I_COMMAND=(sed -i "")
# Define colors
export RED="\\033[1;31m"
export BLUE="\\033[1;34m"
export NORMAL="\\033[0m"
...@@ -44,7 +44,6 @@ echo "${VERSION_NAME}" > ${MDANSE_APP_DIR}/Contents/Resources/version ...@@ -44,7 +44,6 @@ echo "${VERSION_NAME}" > ${MDANSE_APP_DIR}/Contents/Resources/version
############################# #############################
# Copying Python # Copying Python
############################# #############################
### 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 ...) ### 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 ### 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 ### 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
...@@ -62,31 +61,6 @@ install_name_tool -id @loader_path/libpython2.7.dylib ${MDANSE_APP_DIR}/Contents ...@@ -62,31 +61,6 @@ install_name_tool -id @loader_path/libpython2.7.dylib ${MDANSE_APP_DIR}/Contents
ln -s ../Resources/bin/python ${MDANSE_APP_DIR}/Contents/MacOS/python ln -s ../Resources/bin/python ${MDANSE_APP_DIR}/Contents/MacOS/python
# Do some manual cleanup, e.g.
# matplotlib/tests ==> 45.2 Mb
#rm -rf ${MDANSE_APP_DIR}/Contents/Resources/lib/python2.7/matplotlib/tests
#rm -rf ${MDANSE_APP_DIR}/Contents/Resources/mpl-data/sample_data
#rm -rf ${MDANSE_APP_DIR}/Contents/Resources/lib/python2.7/scipy
#rm -rf ${MDANSE_APP_DIR}/Contents/Resources/lib/python2.7/zmq
#mkdir ${MDANSE_APP_DIR}/Contents/Frameworks/Python.framework
#mkdir ${MDANSE_APP_DIR}/Contents/Frameworks/Python.framework/Versions
#mkdir ${MDANSE_APP_DIR}/Contents/Frameworks/Python.framework/Versions/2.7
#mkdir ${MDANSE_APP_DIR}/Contents/Frameworks/Python.framework/Versions/2.7/lib
#cp -r /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ ${MDANSE_APP_DIR}/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7
#rm -rf ${MDANSE_APP_DIR}/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/*
#rm ${MDANSE_APP_DIR}/Contents/MacOS/python
#cp /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python ${MDANSE_APP_DIR}/Contents/MacOS/python
#cp /System/Library/Frameworks/Python.framework/Versions/2.7/Python ${MDANSE_APP_DIR}/Contents/Frameworks/Python.framework/Versions/2.7/libpython2.7.dylib
#install_name_tool -change /System/Library/Frameworks/Python.framework/Versions/2.7/Python @executable_path/../Frameworks/Python.framework/Versions/2.7/libpython2.7.dylib ${MDANSE_APP_DIR}/Contents/MacOS/python
#chmod 777 ${MDANSE_APP_DIR}/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 ${MDANSE_APP_DIR}/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 ${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/site.py ${MDANSE_APP_DIR}/Contents/Resources/. cp ${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/site.py ${MDANSE_APP_DIR}/Contents/Resources/.
cp ${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/site.py ${MDANSE_APP_DIR}/Contents/Resources/lib/python2.7/. cp ${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/site.py ${MDANSE_APP_DIR}/Contents/Resources/lib/python2.7/.
...@@ -96,6 +70,19 @@ ${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/change_dylib_path.sh ...@@ -96,6 +70,19 @@ ${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/change_dylib_path.sh
# Comment the 'add_system_python_extras' call that add some System path to the sys.path # Comment the 'add_system_python_extras' call that add some System path to the sys.path
"${SED_I_COMMAND[@]}" "s/^add_system_python_extras()$/#add_system_python_extras()/" ${MDANSE_APP_DIR}/Contents/Resources/__boot__.py "${SED_I_COMMAND[@]}" "s/^add_system_python_extras()$/#add_system_python_extras()/" ${MDANSE_APP_DIR}/Contents/Resources/__boot__.py
#############################
# Cleanup
#############################
# Removing matplotlib/tests ==> 45.2 Mb
rm -rf ${MDANSE_APP_DIR}/Contents/Resources/lib/python2.7/matplotlib/tests
# Sample data for matplotlib is useless
rm -rf ${MDANSE_APP_DIR}/Contents/Resources/lib/python2.7/matplotlib/mpl-data/sample_data
rm -rf ${MDANSE_APP_DIR}/Contents/Resources/mpl-data/sample_data
# Scipy package is useless
rm -rf ${MDANSE_APP_DIR}/Contents/Resources/lib/python2.7/scipy
# ZMQ package is useless
rm -rf ${MDANSE_APP_DIR}/Contents/Resources/lib/python2.7/zmq
############################# #############################
# Create DMG # Create DMG
############################# #############################
...@@ -104,4 +91,3 @@ sleep 5 ...@@ -104,4 +91,3 @@ sleep 5
${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/Resources/dmg/create-dmg --background "${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/Resources/dmg/dmg_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}" ${CI_TEMP_DIR}/dist ${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/Resources/dmg/create-dmg --background "${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/Resources/dmg/dmg_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}" ${CI_TEMP_DIR}/dist
mv ${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/${MDANSE_DMG} ${CI_PROJECT_DIR} mv ${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/${MDANSE_DMG} ${CI_PROJECT_DIR}
...@@ -52,7 +52,6 @@ ${PYTHONEXE} setup.py install --prefix=${CI_TEMP_INSTALL_DIR} ...@@ -52,7 +52,6 @@ ${PYTHONEXE} setup.py install --prefix=${CI_TEMP_INSTALL_DIR}
status=$? status=$?
if [ $status -ne 0 ]; then if [ $status -ne 0 ]; then
echo -e "${RED}" "Failed to build MDANSE""${NORMAL}" echo -e "${RED}" "Failed to build/install MDANSE""${NORMAL}"
exit $status exit $status
fi fi
...@@ -32,10 +32,6 @@ if [ -z ${CI_COMMIT_REF_NAME} ]; then ...@@ -32,10 +32,6 @@ if [ -z ${CI_COMMIT_REF_NAME} ]; then
export CI_COMMIT_REF_NAME export CI_COMMIT_REF_NAME
fi fi
export RED="\\033[1;31m"
export BLUE="\\033[1;34m"
export NORMAL="\\033[0m"
echo -e "${BLUE}""Commit id = ${CI_COMMIT_ID}""${NORMAL}" echo -e "${BLUE}""Commit id = ${CI_COMMIT_ID}""${NORMAL}"
echo -e "${BLUE}""Branch name = ${CI_COMMIT_REF_NAME}""${NORMAL}" echo -e "${BLUE}""Branch name = ${CI_COMMIT_REF_NAME}""${NORMAL}"
...@@ -64,5 +60,3 @@ else ...@@ -64,5 +60,3 @@ else
fi fi
fi fi
export VERSION_NAME export VERSION_NAME
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
############################# #############################
# PREPARATION # PREPARATION
############################# #############################
export PYTHONPATH=${CI_TEMP_INSTALL_DIR}/lib/python2.7/site-packages:${PYTHONPATH} export PYTHONPATH=${CI_TEMP_INSTALL_DIR}/lib/python2.7/site-packages:${PYTHONPATH}
############################# #############################
...@@ -43,4 +42,3 @@ if [ $status -ne 0 ]; then ...@@ -43,4 +42,3 @@ if [ $status -ne 0 ]; then
echo -e "${RED}" "One or several functional tests failed" echo -e "${RED}" "One or several functional tests failed"
exit $status exit $status
fi fi
@echo off @echo off
rem VERSION_NAME
rem MDANSE_SOURCE_DIR
rem BUILD_TARGET
rem MDANSE_DEPENDENCIES_DIR
rem MDANSE_TEMPORARY_INSTALLATION_DIR
rem Set the location of the MDANSE CI scripts rem Set the location of the MDANSE CI scripts
set BUILD_SCRIPT_DIR=%MDANSE_SOURCE_DIR%\\BuildServer\\Windows set BUILD_SCRIPT_DIR=%MDANSE_SOURCE_DIR%\\BuildServer\\Windows
......
...@@ -24,4 +24,4 @@ set cmd="git rev-parse --short HEAD" ...@@ -24,4 +24,4 @@ set cmd="git rev-parse --short HEAD"
for /F %%i in (' %cmd% ') do set MDANSE_GIT_CURRENT_COMMIT=%%i for /F %%i in (' %cmd% ') do set MDANSE_GIT_CURRENT_COMMIT=%%i
rem Get commit branch from Gitlab rem Get commit branch from Gitlab
set MDANSE_GIT_BRANCH_NAME=%CI_COMMIT_REF_NAME% set MDANSE_GIT_BRANCH_NAME=%CI_COMMIT_REF_NAME%
\ No newline at end of file
@echo off @echo off
rem VERSION_NAME
rem MDANSE_SOURCE_DIR
rem BUILD_TARGET
rem MDANSE_DEPENDENCIES_DIR
rem MDANSE_TEMPORARY_INSTALLATION_DIR
cd %MDANSE_SOURCE_DIR% cd %MDANSE_SOURCE_DIR%
......
...@@ -26,4 +26,4 @@ if "%MDANSE_GIT_BRANCH_NAME%" == "master" ( ...@@ -26,4 +26,4 @@ if "%MDANSE_GIT_BRANCH_NAME%" == "master" (
set VERSION_NAME=%MDANSE_VERSION%-beta-%MDANSE_GIT_CURRENT_COMMIT% set VERSION_NAME=%MDANSE_VERSION%-beta-%MDANSE_GIT_CURRENT_COMMIT%
sed -i "s/.*__beta__.*/__beta__ = \"beta\"/" MDANSE/__pkginfo__.py sed -i "s/.*__beta__.*/__beta__ = \"beta\"/" MDANSE/__pkginfo__.py
) )
) )
\ No newline at end of file
@echo off @echo off
rem VERSION_NAME
rem MDANSE_SOURCE_DIR
rem BUILD_TARGET
rem MDANSE_DEPENDENCIES_DIR
rem MDANSE_TEMPORARY_INSTALLATION_DIR
:: %1 --> the build target :: %1 --> the build target
......
...@@ -14,6 +14,7 @@ version 1.2.0 ...@@ -14,6 +14,7 @@ version 1.2.0
* FIXED issue #20 Opening the theoretical help on MacOS is now OK * FIXED issue #20 Opening the theoretical help on MacOS is now OK
* FIXED issue #18 The items of the checkable combobox are now checkable on Windows * FIXED issue #18 The items of the checkable combobox are now checkable on Windows
* FIXED issue #16 The file filter combo box is now available from the input file dialog on MacOS * FIXED issue #16 The file filter combo box is now available from the input file dialog on MacOS
* CHANGED (internal) issue #33 The macOS dmg is now ligher than before
* CHANGED (internal) MDANSE is now built with system python (2.7.10) * CHANGED (internal) MDANSE is now built with system python (2.7.10)
version 1.1.3 version 1.1.3
......
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