Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 46c4c661 authored by hhakim's avatar hhakim
Browse files

Update macOS jobs (no need of the password anymore) and a note in macos setup script.

parent db173e4f
Branches
Tags
No related merge requests found
......@@ -83,26 +83,26 @@ pkg_macos:
- 'cmake -DOpenMP_gomp_LIBRARY=/opt/local/lib/libomp/libgomp.dylib -DBUILD_WRAPPER_PYTHON=ON -DBUILD_DOCUMENTATION=ON -DCPACK_PACKAGE_VERSION=$SHA_START -DCMAKE_INSTALL_PREFIX=/opt/local/faust-$SHA_START -DBUILD_TESTING=OFF -DREMOTE_DATA_URL="$DURL" -DREMOTE_DATA_FILE="$DFILE" -DEXPERIMENTAL_PKG=ON -DBUILD_MULTITHREAD=ON -DNOPY2=ON -DCMAKE_CXX_COMPILER=/opt/local/bin/clang++-mp-8.0 ..'
- make LANG=en_GB.UTF-8
# to compile matlab wrappers use matlab libiomp5 but backup the clang lib first
- echo $MACOS_PASS | sudo -S mv /opt/local/lib/libomp/libomp.dylib /opt/local/lib/libomp/libomp.dylib.bak
- echo $MACOS_PASS | sudo -S cp /opt/local/lib/libomp/libiomp5.dylib /opt/local/lib/libomp/libomp.dylib
- sudo mv /opt/local/lib/libomp/libomp.dylib /opt/local/lib/libomp/libomp.dylib.bak
- sudo cp /opt/local/lib/libomp/libiomp5.dylib /opt/local/lib/libomp/libomp.dylib
- cmake -DBUILD_WRAPPER_MATLAB=ON ..
- make LANG=en_GB.UTF-8
# restore clang libomp
- echo $MACOS_PASS | sudo -S cp /opt/local/lib/libomp/libomp.dylib /opt/local/lib/libomp/libiomp5.dylib
- echo $MACOS_PASS | sudo -S mv /opt/local/lib/libomp/libomp.dylib.bak /opt/local/lib/libomp/libomp.dylib
- 'echo $MACOS_PASS | sudo -S make install LANG=en_GB.UTF-8'
#- 'echo $MACOS_PASS | sudo -S hdiutil create -volname Faust-$SHA_START-MatlabR2016a-Py2.7 -srcfolder /opt/local/faust-$SHA_START -ov -format UDRW faust-$SHA_START'
- echo $MACOS_PASS | sudo -S pkgbuild --identifier fr.inria.faust --version $SHA_START --root /opt/local/faust-$SHA_START --install-location /opt/local/faust-$SHA_START --scripts . ./faust-$SHA_START.pkg
- sudo cp /opt/local/lib/libomp/libomp.dylib /opt/local/lib/libomp/libiomp5.dylib
- sudo mv /opt/local/lib/libomp/libomp.dylib.bak /opt/local/lib/libomp/libomp.dylib
- sudo make install LANG=en_GB.UTF-8
#- 'sudo hdiutil create -volname Faust-$SHA_START-MatlabR2016a-Py2.7 -srcfolder /opt/local/faust-$SHA_START -ov -format UDRW faust-$SHA_START'
- sudo pkgbuild --identifier fr.inria.faust --version $SHA_START --root /opt/local/faust-$SHA_START --install-location /opt/local/faust-$SHA_START --scripts . ./faust-$SHA_START.pkg
- for FILE in $(find /usr/local/lib ! -iname "libmatio*" -maxdepth 1 -mindepth 1); do filter_list+="--filter $(basename $FILE) "; done;
- echo $MACOS_PASS | sudo -S pkgbuild --identifier fr.inria.faust.matio --version 1.5.12 --root /usr/local/lib $filter_list --install-location /usr/local/lib ./matio-bin-1.5.12.pkg
- echo $MACOS_PASS | sudo -S pkgbuild --identifier fr.inria.faust.openmp --version 367070 --root /opt/local/lib/libomp --install-location /opt/local/lib/libomp ./libomp-367070.pkg
- sudo pkgbuild --identifier fr.inria.faust.matio --version 1.5.12 --root /usr/local/lib $filter_list --install-location /usr/local/lib ./matio-bin-1.5.12.pkg
- sudo pkgbuild --identifier fr.inria.faust.openmp --version 367070 --root /opt/local/lib/libomp --install-location /opt/local/lib/libomp ./libomp-367070.pkg
- productbuild --synthesize --package ./matio-bin-1.5.12.pkg --package libomp-367070.pkg --package faust-$SHA_START.pkg ./distribution.plist
- sed -e 's/\(.*pkg-ref id=.fr.inria.faust".*\)/\1<title>FAµST '$SHA_START'<\/title><license file="licenses.html"\/><readme file="installer_readme.html"\/>/' distribution.plist > tmp.plist; mv tmp.plist distribution.plist
- productbuild --distribution ./distribution.plist --package-path matio-bin-1.5.12.pkg --package-path libomp-367070.pkg --package-path faust-$SHA_START.pkg --resources doc ./faust-matio-omp-$SHA_START.pkg
- mv -f faust-matio-omp-$SHA_START.pkg faust-$SHA_START.pkg
# - if [[ -d $MACOS_PKG_STORE_PATH ]]; then echo $MACOS_PASS | sudo -S mv faust-$SHA_START.dmg faust-$SHA_START.pkg $MACOS_PKG_STORE_PATH; fi
#- if [[ -d $MACOS_PKG_STORE_PATH ]]; then echo $MACOS_PASS | sudo -S cp faust-$SHA_START.dmg faust-$SHA_START.pkg $MACOS_PKG_STORE_PATH; fi
- if [[ -d $MACOS_PKG_STORE_PATH ]]; then echo $MACOS_PASS | sudo -S cp faust-$SHA_START.pkg $MACOS_PKG_STORE_PATH; fi
# - if [[ -d $MACOS_PKG_STORE_PATH ]]; then sudo mv faust-$SHA_START.dmg faust-$SHA_START.pkg $MACOS_PKG_STORE_PATH; fi
#- if [[ -d $MACOS_PKG_STORE_PATH ]]; then sudo cp faust-$SHA_START.dmg faust-$SHA_START.pkg $MACOS_PKG_STORE_PATH; fi
- if [[ -d $MACOS_PKG_STORE_PATH ]]; then sudo cp faust-$SHA_START.pkg $MACOS_PKG_STORE_PATH; fi
artifacts:
paths:
- build/faust-${CI_COMMIT_SHA:0:8}.pkg
......@@ -205,25 +205,25 @@ pkg_macos_release:
- 'cmake -DOpenMP_gomp_LIBRARY=/opt/local/lib/libomp/libgomp.dylib -DBUILD_WRAPPER_PYTHON=ON -DBUILD_DOCUMENTATION=ON -DCMAKE_INSTALL_PREFIX=/opt/local/faust -DCPACK_PACKAGE_VERSION=$CI_COMMIT_TAG -DCMAKE_BUILD_TYPE=Release -DEXCLUDE_FAUST_LIB_INSTALL=ON -DBUILD_TESTING=OFF -DREMOTE_DATA_URL="$DURL" -DREMOTE_DATA_FILE="$DFILE" -DBUILD_MULTITHREAD=ON -DNOPY2=ON -DCMAKE_CXX_COMPILER=/opt/local/bin/clang++-mp-8.0 ..'
- make LANG=en_GB.UTF-8
# to compile matlab wrappers use matlab libiomp5 but backup the clang lib first
- echo $MACOS_PASS | sudo -S mv /opt/local/lib/libomp/libomp.dylib /opt/local/lib/libomp/libomp.dylib.bak
- echo $MACOS_PASS | sudo -S cp /opt/local/lib/libomp/libiomp5.dylib /opt/local/lib/libomp/libomp.dylib
- sudo mv /opt/local/lib/libomp/libomp.dylib /opt/local/lib/libomp/libomp.dylib.bak
- sudo cp /opt/local/lib/libomp/libiomp5.dylib /opt/local/lib/libomp/libomp.dylib
- cmake -DBUILD_WRAPPER_MATLAB=ON ..
- make LANG=en_GB.UTF-8
# restore clang libomp
- echo $MACOS_PASS | sudo -S cp /opt/local/lib/libomp/libomp.dylib /opt/local/lib/libomp/libiomp5.dylib
- echo $MACOS_PASS | sudo -S mv /opt/local/lib/libomp/libomp.dylib.bak /opt/local/lib/libomp/libomp.dylib
- 'echo $MACOS_PASS | sudo -S make install LANG=en_GB.UTF-8'
- 'echo $MACOS_PASS | sudo -S hdiutil create -volname Faust-$CI_COMMIT_TAG-MatlabR2016a-Py2.7 -srcfolder /opt/local/faust -ov -format UDRW faust-$CI_COMMIT_TAG'
- echo $MACOS_PASS | sudo -S pkgbuild --identifier fr.inria.faust --version $CI_COMMIT_TAG --root /opt/local/faust --install-location /opt/local/faust --scripts . ./faust-$CI_COMMIT_TAG.pkg
- sudo cp /opt/local/lib/libomp/libomp.dylib /opt/local/lib/libomp/libiomp5.dylib
- sudo mv /opt/local/lib/libomp/libomp.dylib.bak /opt/local/lib/libomp/libomp.dylib
- 'sudo make install LANG=en_GB.UTF-8'
- 'sudo hdiutil create -volname Faust-$CI_COMMIT_TAG-MatlabR2016a-Py2.7 -srcfolder /opt/local/faust -ov -format UDRW faust-$CI_COMMIT_TAG'
- sudo pkgbuild --identifier fr.inria.faust --version $CI_COMMIT_TAG --root /opt/local/faust --install-location /opt/local/faust --scripts . ./faust-$CI_COMMIT_TAG.pkg
- for FILE in $(find /usr/local/lib ! -iname "libmatio*" -maxdepth 1 -mindepth 1); do filter_list+="--filter $(basename $FILE) "; done;
- echo $MACOS_PASS | sudo -S pkgbuild --identifier fr.inria.faust.matio --version 1.5.12 --root /usr/local/lib $filter_list --install-location /usr/local/lib ./matio-bin-1.5.12.pkg
- echo $MACOS_PASS | sudo -S pkgbuild --identifier fr.inria.faust.openmp --version 367070 --root /opt/local/lib/libomp --install-location /opt/local/lib/libomp ./libomp-367070.pkg
- sudo pkgbuild --identifier fr.inria.faust.matio --version 1.5.12 --root /usr/local/lib $filter_list --install-location /usr/local/lib ./matio-bin-1.5.12.pkg
- sudo pkgbuild --identifier fr.inria.faust.openmp --version 367070 --root /opt/local/lib/libomp --install-location /opt/local/lib/libomp ./libomp-367070.pkg
- productbuild --synthesize --package ./matio-bin-1.5.12.pkg --package libomp-367070.pkg --package faust-$CI_COMMIT_TAG.pkg ./distribution.plist
- sed -e 's/\(.*pkg-ref id=.fr.inria.faust".*\)/\1<title>FAµST '$CI_COMMIT_TAG'<\/title><license file="licenses.html"\/><readme file="installer_readme.html"\/>/' distribution.plist > tmp.plist; mv tmp.plist distribution.plist
- productbuild --distribution ./distribution.plist --package-path matio-bin-1.5.12.pkg --package-path libomp-367070.pkg --package-path faust-$CI_COMMIT_TAG.pkg --resources doc ./faust-matio-omp-$CI_COMMIT_TAG.pkg
- mv -f ./faust-matio-omp-$CI_COMMIT_TAG.pkg ./faust-$CI_COMMIT_TAG.pkg
#- if [[ -d $MACOS_PKG_STORE_PATH ]]; then echo $MACOS_PASS | sudo -S cp faust-$CI_COMMIT_TAG.dmg faust-$CI_COMMIT_TAG.pkg $MACOS_PKG_STORE_PATH; fi
- if [[ -d $MACOS_PKG_STORE_PATH ]]; then echo $MACOS_PASS | sudo -S cp faust-$CI_COMMIT_TAG.pkg $MACOS_PKG_STORE_PATH; fi
#- if [[ -d $MACOS_PKG_STORE_PATH ]]; then sudo cp faust-$CI_COMMIT_TAG.dmg faust-$CI_COMMIT_TAG.pkg $MACOS_PKG_STORE_PATH; fi
- if [[ -d $MACOS_PKG_STORE_PATH ]]; then sudo cp faust-$CI_COMMIT_TAG.pkg $MACOS_PKG_STORE_PATH; fi
artifacts:
paths:
- build/faust-${CI_COMMIT_TAG}.pkg
......@@ -516,7 +516,7 @@ test_macos_pkg_release:
- job: pkg_macos_release
artifacts: true
script:
- echo $MACOS_PASS | sudo -S installer -pkg build/faust-$CI_COMMIT_TAG.pkg -target /
- sudo installer -pkg build/faust-$CI_COMMIT_TAG.pkg -target /
- matlab -nojvm -nodisplay -r "disp(matfaust.version());disp(full(matfaust.rand(5,5))); exit;"
- python -c "import pyfaust; print(pyfaust.version()); print(pyfaust.rand(5,5).toarray());"
- python -c "import pyfaust.tests; pyfaust.tests.run_tests('cpu', 'real')"
......
......@@ -53,7 +53,7 @@ unzip libtorch-macos-1.4.0.zip
mv libtorch /opt/local/
echo "Please manually install matlab by copying directly the directory from /Volumes/Untitled/ attached to faust2-macos-2019 (advice: use scp)"
echo "First, a DATA storage volume must be created and attached to the VM instance (use command: diskutil mount)."
echo "Finally add matlab to the PATH."
echo "Finally add matlab to the PATH (in .bash_profile)."
echo "It is also useful to symlink the matlab binary in /usr/bin/ for the root user env. to be OK for installing/testing the pkg (postinstall script needs to find matlab)."
echo "Other need about matlab OpenMP: you need to copy the library as for example: ciosx:~ ci$ cp /Volumes/Untitled/MATLAB_R2018b.app/sys/os/maci64/libiomp5.dylib /opt/local/lib/libomp/"
echo "ABOUT SUDO: add this line in /etc/sudoers: ci ALL=(ALL:ALL) NOPASSWD: ALL (this way the runner won't need to type the password for running commands as root)"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment