From 964b3ca28e4b52be1d64e8082742ee831af5103a Mon Sep 17 00:00:00 2001 From: Geert Litjens Date: Fri, 24 Jun 2022 10:29:47 +0200 Subject: [PATCH] Fixed line endings --- .appveyor.yaml | 416 +++++++++++++++++++-------------------- buildtools/Dockerfile | 144 +++++++------- buildtools/build_ASAP.sh | 118 +++++------ 3 files changed, 339 insertions(+), 339 deletions(-) diff --git a/.appveyor.yaml b/.appveyor.yaml index 05399fa..7275ee4 100644 --- a/.appveyor.yaml +++ b/.appveyor.yaml @@ -1,208 +1,208 @@ -image: - - Ubuntu - - Visual Studio 2022 - - macos-bigsur - - -environment: - GIT_REDIRECT_STDERR: '2>&1' - APPVEYOR_YML_DISABLE_PS_LINUX: true - - matrix: - - python_version: 3.8 - python_version_macos: 3.8.12 - python_version_no_dot: 38 - ubuntu_version: 20.04 - - python_version: 3.9 - python_version_macos: 3.9.10 - python_version_no_dot: 39 - ubuntu_version: 20.04 - - python_version: 3.10 - python_version_macos: 3.10.2 - python_version_no_dot: 310 - ubuntu_version: 20.04 - -install: - - ps: $env:asap_major_version=findstr "set(CURRENT_MAJOR_VERSION" CMakeLists.txt | % {"$($_.split(' ')[1])"[0]} - - ps: $env:asap_minor_version=findstr "set(CURRENT_MINOR_VERSION" CMakeLists.txt | % {"$($_.split(' ')[1])"[0]} - - ps: $env:asap_patch_version=findstr "set(CURRENT_PATCH_VERSION" CMakeLists.txt | % {"$($_.split(' ')[1])"[0]} - - cmd: echo ASAP version %asap_major_version%.%asap_minor_version%.%asap_patch_version%-%APPVEYOR_BUILD_NUMBER% - - sh: export ASAP_MAJOR_VERSION="$(grep set\(CURRENT_MAJOR_VERSION CMakeLists.txt | cut -d " " -f2 | cut -d ")" -f1)" - - sh: export ASAP_MINOR_VERSION="$(grep set\(CURRENT_MINOR_VERSION CMakeLists.txt | cut -d " " -f2 | cut -d ")" -f1)" - - sh: export ASAP_PATCH_VERSION="$(grep set\(CURRENT_PATCH_VERSION CMakeLists.txt | cut -d " " -f2 | cut -d ")" -f1)" - - sh: echo ASAP version $ASAP_MAJOR_VERSION.$ASAP_MINOR_VERSION.$ASAP_PATCH_VERSION-$APPVEYOR_BUILD_NUMBER - - ps: Update-AppveyorBuild -Version "$env:asap_major_version.$env:asap_minor_version.$env:asap_patch_version-$env:APPVEYOR_BUILD_NUMBER" - -for: -- - matrix: - only: - - image: Visual Studio 2022 - - before_build: - - cmd: set python_location=C:/Python%python_version_no_dot%-x64 - - cmd: set python_library=python%python_version_no_dot%.lib - - cmd: set python_pip=C:\Python%python_version_no_dot%-x64\Scripts\pip - - cmd: set artefact_name=ASAP-2.0-py%python_version_no_dot%-win64.exe - - ps: >- - If (!(Test-Path -Path 'C:\projects\pugixml')) { - git clone https://github.com/zeux/pugixml c:\projects\pugixml - } - - ps: >- - If (!(Test-Path -Path 'c:\projects\openslide')) { - Start-FileDownload 'https://github.com/computationalpathologygroup/ASAP/releases/download/1.9/custom_openslide.zip' - 7z x custom_openslide.zip -oc:\projects\openslide - } - - ps: >- - If (!(Test-Path -Path 'c:\projects\other_dependencies')) { - Start-FileDownload 'https://github.com/computationalpathologygroup/ASAP/releases/download/1.9/other_dependencies.zip' - 7z x other_dependencies.zip -oc:\projects\other_dependencies - } - - ps: >- - If (!(Test-Path -Path 'c:\projects\swig')) { - Start-FileDownload 'https://downloads.sourceforge.net/project/swig/swigwin/swigwin-4.0.1/swigwin-4.0.1.zip?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fswig%2Ffiles%2Fswigwin%2Fswigwin-4.0.1%2Fswigwin-4.0.1.zip%2Fdownload%3Fuse_mirror%3Dnetix&ts=1588101486' - 7z x swigwin-4.0.1.zip -oc:\projects\swig - } - - ps: >- - If (!(Test-Path -Path $env:python_location\Lib\site-packages\numpy)) { - Invoke-Expression "$env:python_pip install numpy" - } - - ps: >- - If (!(Test-Path -Path 'C:\tools\opencv')) { - choco install opencv - } - - build_script: - - cmd: cmake -B ./ASAP_build -DJPEG_INCLUDE_DIR=C:\projects\openslide\artefacts\include -DJPEG_LIBRARY_DEBUG=c:/projects/openslide/artefacts/lib/libjpeg.dll.a -DJPEG_LIBRARY_RELEASE=c:/projects/openslide/artefacts/lib/libjpeg.dll.a -DOpenJPEG_DIR=c:/projects/openslide/artefacts/lib/openjpeg-2.3 -DOPENSLIDE_INCLUDE_DIR=c:/projects/openslide/include/openslide -DOPENSLIDE_LIBRARY=c:/projects/openslide/lib/libopenslide.lib -DDCMTKJPEG_INCLUDE_DIR=C:/Code/thirdparty/dcmtk-3.6.5-win64-dynamic/install/include -DDCMTKJPEG_LIBRARY=C:/Code/thirdparty/dcmtk-3.6.5-win64-dynamic/install/lib/ijg8.lib -DTIFF_INCLUDE_DIR=c:/projects/openslide/artefacts/include -DTIFF_LIBRARY_DEBUG=c:/projects/openslide/artefacts/lib/libtiff.dll.a -DTIFF_LIBRARY_RELEASE=c:/projects/openslide/artefacts/lib/libtiff.dll.a -DZLIB_INCLUDE_DIR=c:/projects/openslide/artefacts/include -DZLIB_LIBRARY_DEBUG=c:/projects/openslide/artefacts/lib/libz.dll.a -DZLIB_LIBRARY_RELEASE=c:/projects/openslide/artefacts/lib/libz.dll.a -DPugiXML_INCLUDE_DIR=c:/projects/pugixml/src -DBUILD_MULTIRESOLUTIONIMAGEINTERFACE_VSI_SUPPORT=ON -DPACKAGE_ON_INSTALL=TRUE -DBUILD_ASAP=TRUE -DBUILD_IMAGEPROCESSING=TRUE -DBUILD_EXECUTABLES=TRUE -DQt5_DIR=C:/Qt/5.15.2/msvc2019_64/lib/cmake/Qt5 -DOpenCV_DIR=c:/tools/opencv/build -DBUILD_WORKLIST_INTERFACE=TRUE -DWRAP_MULTIRESOLUTIONIMAGEINTERFACE_PYTHON=ON -DWRAP_WHOLESLIDEFILTERS_PYTHON=ON -DPYTHON_DEBUG_LIBRARY=%python_location%/libs/%python_library% -DPYTHON_LIBRARY=%python_location%/libs//%python_library% -DPYTHON_LIBRARY_DEBUG=%python_location%/libs//%python_library% -DPYTHON_INCLUDE_DIR=%python_location%/include -DPYTHON_EXECUTABLE=%python_location%/python.exe -DPYTHON_NUMPY_INCLUDE_DIR=%python_location%/Lib/site-packages/numpy/core/include -DDCMTKJPEG_INCLUDE_DIR=C:/projects/other_dependencies/dcmtk-libjpeg/include -DDCMTKJPEG_LIBRARY=C:/projects/other_dependencies/dcmtk-libjpeg/lib/ijg8.lib -DSWIG_EXECUTABLE=c:/projects/swig/swigwin-4.0.1/swig.exe - - cmd: cd ./ASAP_build - - cmd: cmake --build . --config Release - - cmd: cpack - - ps: mv ASAP-2.0-win64.exe $env:artefact_name - - cache: - - C:\tools\opencv -> appveyor.yml - - C:\projects\openslide -> appveyor.yml - - C:\projects\swig -> appveyor.yml - - C:\projects\other_dependencies -> appveyor.yml - - C:\projects\pugixml -> appveyor.yml - - 'C:\Python%python_version_no_dot%-x64\Lib\site-packages\numpy -> appveyor.yml' - - artifacts: - - path: ./ASAP_build/*.exe - name: ASAP_Installer - - deploy: - - provider: GitHub - release: ASAP $(asap_major_version).$(asap_minor_version) (Nightly) - auth_token: - secure: 9dwaJVWgqJszg3feksfrVuddjVklp8UWrPskUUZnSuG62R014vDOuW0p+ytGBJbS - artifact: ASAP_Installer - draft: false - force_update: true - on: - branch: develop - APPVEYOR_REPO_TAG: false - - - provider: GitHub - release: ASAP $(asap_major_version).$(asap_minor_version) - auth_token: - secure: 9dwaJVWgqJszg3feksfrVuddjVklp8UWrPskUUZnSuG62R014vDOuW0p+ytGBJbS - artifact: ASAP_Installer - draft: false - force_update: true - on: - branch: master # release from master branch only - APPVEYOR_REPO_TAG: true # deploy on tag push only - -- - matrix: - only: - - image: Ubuntu - - services: - - docker - - build_script: - - sh: cd buildtools - - sh: docker build --tag asap_build:${ubuntu_version} --build-arg UBUNTU_VERSION=${ubuntu_version} . - - sh: docker run -v ${PWD}:/artifacts asap_build:${ubuntu_version} /root/build/build_ASAP.sh $python_version $python_version_no_dot true - - artifacts: - - path: ./buildtools/*.deb - name: ASAP_DEB_Package - - deploy: - - provider: GitHub - release: ASAP $ASAP_MAJOR_VERSION.$ASAP_MINOR_VERSION (Nightly) - auth_token: - secure: 9dwaJVWgqJszg3feksfrVuddjVklp8UWrPskUUZnSuG62R014vDOuW0p+ytGBJbS - artifact: ASAP_DEB_Package - draft: false - force_update: true - on: - branch: develop - APPVEYOR_REPO_TAG: false # deploy on tag push only - - - provider: GitHub - release: ASAP $ASAP_MAJOR_VERSION.$ASAP_MINOR_VERSION - auth_token: - secure: 9dwaJVWgqJszg3feksfrVuddjVklp8UWrPskUUZnSuG62R014vDOuW0p+ytGBJbS - artifact: ASAP_DEB_Package - draft: true - force_update: true - on: - branch: master # release from master branch only - APPVEYOR_REPO_TAG: true # deploy on tag push only -- - matrix: - only: - - image: macos-bigsur - - build_script: - - sh: rm -f /usr/local/include/X11 - - sh: brew unlink subversion - - sh: brew update - - sh: brew install openslide opencv swig qt5 - - sh: curl -LJO https://raw.githubusercontent.com/zeux/pugixml/master/src/pugixml.cpp - - sh: curl -LJO https://raw.githubusercontent.com/zeux/pugixml/master/src/pugixml.hpp - - sh: curl -LJO https://raw.githubusercontent.com/zeux/pugixml/master/src/pugiconfig.hpp - - sh: sudo mv pugixml.cpp /usr/local/include/ - - sh: sudo mv pugixml.hpp /usr/local/include/ - - sh: sudo mv pugiconfig.hpp /usr/local/include/ - - sh: source ~/venv${python_version}/bin/activate - - sh: pip install numpy -# - sh: export APPVEYOR_VNC_BLOCK=true -# - sh: curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-vnc.sh' | bash -e - - - sh: cmake . -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_WORKLIST_INTERFACE=TRUE -DWRAP_MULTIRESOLUTIONIMAGEINTERFACE_PYTHON=TRUE -DBUILD_ASAP=TRUE -DBUILD_EXECUTABLES=TRUE -DBUILD_IMAGEPROCESSING=TRUE -DCMAKE_BUILD_TYPE=Release -DPACKAGE_ON_INSTALL=TRUE -DOPENSLIDE_INCLUDE_DIR:PATH=/usr/local/Cellar/openslide/3.4.1_5/include/openslide -DQt5_DIR:PATH=/usr/local/Cellar/qt@5/5.15.5/lib/cmake/Qt5 -DPYTHON_EXECUTABLE=/Users/appveyor/.localpython${python_version_macos}/bin/python${python_version} -DPYTHON_INCLUDE_DIR=/Users/appveyor/.localpython${python_version_macos}/include/python${python_version} -DPYTHON_LIBRARY=/Users/appveyor/.localpython${python_version_macos}/lib/libpython${python_version}.dylib -DPYTHON_NUMPY_INCLUDE_DIR=/Users/appveyor/venv${python_version}/lib/python${python_version}/site-packages/numpy/core/include - - sh: make - - sh: cp **/*/*.dylib /usr/local/lib/ # i don't know how to combine these two commands - - sh: cp **/*.dylib /usr/local/lib/ - - sh: sudo make package - - sh: sudo mv /Users/appveyor/projects/asap/ASAP-2.0-Darwin.dmg /Users/appveyor/projects/asap/ASAP-2.0-py${python_version_no_dot}-Darwin.dmg - - artifacts: - - path: ./*.dmg - name: ASAP_DMG_Package - - deploy: - - provider: GitHub - release: ASAP $ASAP_MAJOR_VERSION.$ASAP_MINOR_VERSION (Nightly) - auth_token: - secure: 9dwaJVWgqJszg3feksfrVuddjVklp8UWrPskUUZnSuG62R014vDOuW0p+ytGBJbS - artifact: ASAP_DMG_Package - draft: false - force_update: true - on: - branch: develop # release from master branch only - APPVEYOR_REPO_TAG: false # deploy on tag push only - - - provider: GitHub - release: ASAP $(asap_major_version).$(asap_minor_version) - auth_token: - secure: 9dwaJVWgqJszg3feksfrVuddjVklp8UWrPskUUZnSuG62R014vDOuW0p+ytGBJbS - artifact: ASAP_DMG_Package - draft: false - force_update: true - on: - branch: master # release from master branch only - APPVEYOR_REPO_TAG: true # deploy on tag push only +image: + - Ubuntu + - Visual Studio 2022 + - macos-bigsur + + +environment: + GIT_REDIRECT_STDERR: '2>&1' + APPVEYOR_YML_DISABLE_PS_LINUX: true + + matrix: + - python_version: 3.8 + python_version_macos: 3.8.12 + python_version_no_dot: 38 + ubuntu_version: 20.04 + - python_version: 3.9 + python_version_macos: 3.9.10 + python_version_no_dot: 39 + ubuntu_version: 20.04 + - python_version: 3.10 + python_version_macos: 3.10.2 + python_version_no_dot: 310 + ubuntu_version: 20.04 + +install: + - ps: $env:asap_major_version=findstr "set(CURRENT_MAJOR_VERSION" CMakeLists.txt | % {"$($_.split(' ')[1])"[0]} + - ps: $env:asap_minor_version=findstr "set(CURRENT_MINOR_VERSION" CMakeLists.txt | % {"$($_.split(' ')[1])"[0]} + - ps: $env:asap_patch_version=findstr "set(CURRENT_PATCH_VERSION" CMakeLists.txt | % {"$($_.split(' ')[1])"[0]} + - cmd: echo ASAP version %asap_major_version%.%asap_minor_version%.%asap_patch_version%-%APPVEYOR_BUILD_NUMBER% + - sh: export ASAP_MAJOR_VERSION="$(grep set\(CURRENT_MAJOR_VERSION CMakeLists.txt | cut -d " " -f2 | cut -d ")" -f1)" + - sh: export ASAP_MINOR_VERSION="$(grep set\(CURRENT_MINOR_VERSION CMakeLists.txt | cut -d " " -f2 | cut -d ")" -f1)" + - sh: export ASAP_PATCH_VERSION="$(grep set\(CURRENT_PATCH_VERSION CMakeLists.txt | cut -d " " -f2 | cut -d ")" -f1)" + - sh: echo ASAP version $ASAP_MAJOR_VERSION.$ASAP_MINOR_VERSION.$ASAP_PATCH_VERSION-$APPVEYOR_BUILD_NUMBER + - ps: Update-AppveyorBuild -Version "$env:asap_major_version.$env:asap_minor_version.$env:asap_patch_version-$env:APPVEYOR_BUILD_NUMBER" + +for: +- + matrix: + only: + - image: Visual Studio 2022 + + before_build: + - cmd: set python_location=C:/Python%python_version_no_dot%-x64 + - cmd: set python_library=python%python_version_no_dot%.lib + - cmd: set python_pip=C:\Python%python_version_no_dot%-x64\Scripts\pip + - cmd: set artefact_name=ASAP-2.0-py%python_version_no_dot%-win64.exe + - ps: >- + If (!(Test-Path -Path 'C:\projects\pugixml')) { + git clone https://github.com/zeux/pugixml c:\projects\pugixml + } + - ps: >- + If (!(Test-Path -Path 'c:\projects\openslide')) { + Start-FileDownload 'https://github.com/computationalpathologygroup/ASAP/releases/download/1.9/custom_openslide.zip' + 7z x custom_openslide.zip -oc:\projects\openslide + } + - ps: >- + If (!(Test-Path -Path 'c:\projects\other_dependencies')) { + Start-FileDownload 'https://github.com/computationalpathologygroup/ASAP/releases/download/1.9/other_dependencies.zip' + 7z x other_dependencies.zip -oc:\projects\other_dependencies + } + - ps: >- + If (!(Test-Path -Path 'c:\projects\swig')) { + Start-FileDownload 'https://downloads.sourceforge.net/project/swig/swigwin/swigwin-4.0.1/swigwin-4.0.1.zip?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fswig%2Ffiles%2Fswigwin%2Fswigwin-4.0.1%2Fswigwin-4.0.1.zip%2Fdownload%3Fuse_mirror%3Dnetix&ts=1588101486' + 7z x swigwin-4.0.1.zip -oc:\projects\swig + } + - ps: >- + If (!(Test-Path -Path $env:python_location\Lib\site-packages\numpy)) { + Invoke-Expression "$env:python_pip install numpy" + } + - ps: >- + If (!(Test-Path -Path 'C:\tools\opencv')) { + choco install opencv + } + + build_script: + - cmd: cmake -B ./ASAP_build -DJPEG_INCLUDE_DIR=C:\projects\openslide\artefacts\include -DJPEG_LIBRARY_DEBUG=c:/projects/openslide/artefacts/lib/libjpeg.dll.a -DJPEG_LIBRARY_RELEASE=c:/projects/openslide/artefacts/lib/libjpeg.dll.a -DOpenJPEG_DIR=c:/projects/openslide/artefacts/lib/openjpeg-2.3 -DOPENSLIDE_INCLUDE_DIR=c:/projects/openslide/include/openslide -DOPENSLIDE_LIBRARY=c:/projects/openslide/lib/libopenslide.lib -DDCMTKJPEG_INCLUDE_DIR=C:/Code/thirdparty/dcmtk-3.6.5-win64-dynamic/install/include -DDCMTKJPEG_LIBRARY=C:/Code/thirdparty/dcmtk-3.6.5-win64-dynamic/install/lib/ijg8.lib -DTIFF_INCLUDE_DIR=c:/projects/openslide/artefacts/include -DTIFF_LIBRARY_DEBUG=c:/projects/openslide/artefacts/lib/libtiff.dll.a -DTIFF_LIBRARY_RELEASE=c:/projects/openslide/artefacts/lib/libtiff.dll.a -DZLIB_INCLUDE_DIR=c:/projects/openslide/artefacts/include -DZLIB_LIBRARY_DEBUG=c:/projects/openslide/artefacts/lib/libz.dll.a -DZLIB_LIBRARY_RELEASE=c:/projects/openslide/artefacts/lib/libz.dll.a -DPugiXML_INCLUDE_DIR=c:/projects/pugixml/src -DBUILD_MULTIRESOLUTIONIMAGEINTERFACE_VSI_SUPPORT=ON -DPACKAGE_ON_INSTALL=TRUE -DBUILD_ASAP=TRUE -DBUILD_IMAGEPROCESSING=TRUE -DBUILD_EXECUTABLES=TRUE -DQt5_DIR=C:/Qt/5.15.2/msvc2019_64/lib/cmake/Qt5 -DOpenCV_DIR=c:/tools/opencv/build -DBUILD_WORKLIST_INTERFACE=TRUE -DWRAP_MULTIRESOLUTIONIMAGEINTERFACE_PYTHON=ON -DWRAP_WHOLESLIDEFILTERS_PYTHON=ON -DPYTHON_DEBUG_LIBRARY=%python_location%/libs/%python_library% -DPYTHON_LIBRARY=%python_location%/libs//%python_library% -DPYTHON_LIBRARY_DEBUG=%python_location%/libs//%python_library% -DPYTHON_INCLUDE_DIR=%python_location%/include -DPYTHON_EXECUTABLE=%python_location%/python.exe -DPYTHON_NUMPY_INCLUDE_DIR=%python_location%/Lib/site-packages/numpy/core/include -DDCMTKJPEG_INCLUDE_DIR=C:/projects/other_dependencies/dcmtk-libjpeg/include -DDCMTKJPEG_LIBRARY=C:/projects/other_dependencies/dcmtk-libjpeg/lib/ijg8.lib -DSWIG_EXECUTABLE=c:/projects/swig/swigwin-4.0.1/swig.exe + - cmd: cd ./ASAP_build + - cmd: cmake --build . --config Release + - cmd: cpack + - ps: mv ASAP-2.0-win64.exe $env:artefact_name + + cache: + - C:\tools\opencv -> appveyor.yml + - C:\projects\openslide -> appveyor.yml + - C:\projects\swig -> appveyor.yml + - C:\projects\other_dependencies -> appveyor.yml + - C:\projects\pugixml -> appveyor.yml + - 'C:\Python%python_version_no_dot%-x64\Lib\site-packages\numpy -> appveyor.yml' + + artifacts: + - path: ./ASAP_build/*.exe + name: ASAP_Installer + + deploy: + - provider: GitHub + release: ASAP $(asap_major_version).$(asap_minor_version) (Nightly) + auth_token: + secure: 9dwaJVWgqJszg3feksfrVuddjVklp8UWrPskUUZnSuG62R014vDOuW0p+ytGBJbS + artifact: ASAP_Installer + draft: false + force_update: true + on: + branch: develop + APPVEYOR_REPO_TAG: false + + - provider: GitHub + release: ASAP $(asap_major_version).$(asap_minor_version) + auth_token: + secure: 9dwaJVWgqJszg3feksfrVuddjVklp8UWrPskUUZnSuG62R014vDOuW0p+ytGBJbS + artifact: ASAP_Installer + draft: false + force_update: true + on: + branch: master # release from master branch only + APPVEYOR_REPO_TAG: true # deploy on tag push only + +- + matrix: + only: + - image: Ubuntu + + services: + - docker + + build_script: + - sh: cd buildtools + - sh: docker build --tag asap_build:${ubuntu_version} --build-arg UBUNTU_VERSION=${ubuntu_version} . + - sh: docker run -v ${PWD}:/artifacts asap_build:${ubuntu_version} /root/build/build_ASAP.sh $python_version $python_version_no_dot true + + artifacts: + - path: ./buildtools/*.deb + name: ASAP_DEB_Package + + deploy: + - provider: GitHub + release: ASAP $ASAP_MAJOR_VERSION.$ASAP_MINOR_VERSION (Nightly) + auth_token: + secure: 9dwaJVWgqJszg3feksfrVuddjVklp8UWrPskUUZnSuG62R014vDOuW0p+ytGBJbS + artifact: ASAP_DEB_Package + draft: false + force_update: true + on: + branch: develop + APPVEYOR_REPO_TAG: false # deploy on tag push only + + - provider: GitHub + release: ASAP $ASAP_MAJOR_VERSION.$ASAP_MINOR_VERSION + auth_token: + secure: 9dwaJVWgqJszg3feksfrVuddjVklp8UWrPskUUZnSuG62R014vDOuW0p+ytGBJbS + artifact: ASAP_DEB_Package + draft: true + force_update: true + on: + branch: master # release from master branch only + APPVEYOR_REPO_TAG: true # deploy on tag push only +- + matrix: + only: + - image: macos-bigsur + + build_script: + - sh: rm -f /usr/local/include/X11 + - sh: brew unlink subversion + - sh: brew update + - sh: brew install openslide opencv swig qt5 + - sh: curl -LJO https://raw.githubusercontent.com/zeux/pugixml/master/src/pugixml.cpp + - sh: curl -LJO https://raw.githubusercontent.com/zeux/pugixml/master/src/pugixml.hpp + - sh: curl -LJO https://raw.githubusercontent.com/zeux/pugixml/master/src/pugiconfig.hpp + - sh: sudo mv pugixml.cpp /usr/local/include/ + - sh: sudo mv pugixml.hpp /usr/local/include/ + - sh: sudo mv pugiconfig.hpp /usr/local/include/ + - sh: source ~/venv${python_version}/bin/activate + - sh: pip install numpy +# - sh: export APPVEYOR_VNC_BLOCK=true +# - sh: curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-vnc.sh' | bash -e - + - sh: cmake . -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_WORKLIST_INTERFACE=TRUE -DWRAP_MULTIRESOLUTIONIMAGEINTERFACE_PYTHON=TRUE -DBUILD_ASAP=TRUE -DBUILD_EXECUTABLES=TRUE -DBUILD_IMAGEPROCESSING=TRUE -DCMAKE_BUILD_TYPE=Release -DPACKAGE_ON_INSTALL=TRUE -DOPENSLIDE_INCLUDE_DIR:PATH=/usr/local/Cellar/openslide/3.4.1_5/include/openslide -DQt5_DIR:PATH=/usr/local/Cellar/qt@5/5.15.5/lib/cmake/Qt5 -DPYTHON_EXECUTABLE=/Users/appveyor/.localpython${python_version_macos}/bin/python${python_version} -DPYTHON_INCLUDE_DIR=/Users/appveyor/.localpython${python_version_macos}/include/python${python_version} -DPYTHON_LIBRARY=/Users/appveyor/.localpython${python_version_macos}/lib/libpython${python_version}.dylib -DPYTHON_NUMPY_INCLUDE_DIR=/Users/appveyor/venv${python_version}/lib/python${python_version}/site-packages/numpy/core/include + - sh: make + - sh: cp **/*/*.dylib /usr/local/lib/ # i don't know how to combine these two commands + - sh: cp **/*.dylib /usr/local/lib/ + - sh: sudo make package + - sh: sudo mv /Users/appveyor/projects/asap/ASAP-2.0-Darwin.dmg /Users/appveyor/projects/asap/ASAP-2.0-py${python_version_no_dot}-Darwin.dmg + + artifacts: + - path: ./*.dmg + name: ASAP_DMG_Package + + deploy: + - provider: GitHub + release: ASAP $ASAP_MAJOR_VERSION.$ASAP_MINOR_VERSION (Nightly) + auth_token: + secure: 9dwaJVWgqJszg3feksfrVuddjVklp8UWrPskUUZnSuG62R014vDOuW0p+ytGBJbS + artifact: ASAP_DMG_Package + draft: false + force_update: true + on: + branch: develop # release from master branch only + APPVEYOR_REPO_TAG: false # deploy on tag push only + + - provider: GitHub + release: ASAP $(asap_major_version).$(asap_minor_version) + auth_token: + secure: 9dwaJVWgqJszg3feksfrVuddjVklp8UWrPskUUZnSuG62R014vDOuW0p+ytGBJbS + artifact: ASAP_DMG_Package + draft: false + force_update: true + on: + branch: master # release from master branch only + APPVEYOR_REPO_TAG: true # deploy on tag push only diff --git a/buildtools/Dockerfile b/buildtools/Dockerfile index 1e13c26..0d0d2c8 100644 --- a/buildtools/Dockerfile +++ b/buildtools/Dockerfile @@ -1,72 +1,72 @@ -ARG UBUNTU_VERSION=20.04 - -FROM ubuntu:${UBUNTU_VERSION} - -ENV TZ=Europe/Amsterdam -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -RUN apt-get update \ - && apt-get install -y -qq --no-install-recommends \ - cmake \ - dpkg-dev \ - file \ - g++ \ - make \ - qt5-default \ - qtbase5-dev \ - qttools5-dev \ - libqt5opengl5-dev \ - git \ - libopencv-dev \ - libdcmtk-dev \ - libopenjp2-7-dev \ - libopenslide-dev \ - wget \ - swig \ - libunittest++-dev \ - ca-certificates \ - nano \ - software-properties-common \ - lsb-release \ - && add-apt-repository ppa:ubuntu-toolchain-r/test \ - && apt-get update \ - && apt-get install -y -qq --no-install-recommends \ - g++-10 \ - gcc-10 \ - && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 50 \ - && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 50 - -# Ensure latest version of CMake -RUN apt purge -y --auto-remove cmake -RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null -RUN apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" -RUN apt update && \ - apt install -y cmake - -RUN wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \ - mkdir /root/.conda &&\ - bash Miniconda3-latest-Linux-x86_64.sh -b &&\ - rm -f Miniconda3-latest-Linux-x86_64.sh - -RUN /root/miniconda3/bin/conda update --quiet -n base -c defaults conda && \ - /root/miniconda3/bin/conda create --quiet --name build_python3.8 python=3.8 && \ - /root/miniconda3/bin/conda install --quiet -n build_python3.8 numpy nomkl && \ - /root/miniconda3/bin/conda create --quiet --name build_python3.9 python=3.9 && \ - /root/miniconda3/bin/conda install --quiet -n build_python3.9 numpy nomkl && \ - /root/miniconda3/bin/conda create --quiet --name build_python3.10 python=3.10 && \ - /root/miniconda3/bin/conda install --quiet -n build_python3.10 numpy nomkl - -# Small hack to as libijg8 is installed in a different locations in Ubuntu 20.04 -RUN ln -s /usr/lib/x86_64-linux-gnu/libijg8.so /usr/lib/libijg8.so; exit 0; - -WORKDIR /root -RUN wget -q https://github.com/zeux/pugixml/archive/v1.9.tar.gz && tar xzf v1.9.tar.gz && rm v1.9.tar.gz && \ - wget -q ftp://dicom.offis.de/pub/dicom/offis/software/dcmtk/dcmtk364/dcmtk-3.6.4.tar.gz && tar xzf dcmtk-3.6.4.tar.gz && mv dcmtk-3.6.4 dcmtk && rm dcmtk-3.6.4.tar.gz -RUN git clone https://github.com/computationalpathologygroup/ASAP src &&\ - mkdir build - -WORKDIR /root/build -COPY build_ASAP.sh /root/build/build_ASAP.sh -RUN chmod a+rxwX ./build_ASAP.sh - -CMD ./build_ASAP.sh +ARG UBUNTU_VERSION=20.04 + +FROM ubuntu:${UBUNTU_VERSION} + +ENV TZ=Europe/Amsterdam +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +RUN apt-get update \ + && apt-get install -y -qq --no-install-recommends \ + cmake \ + dpkg-dev \ + file \ + g++ \ + make \ + qt5-default \ + qtbase5-dev \ + qttools5-dev \ + libqt5opengl5-dev \ + git \ + libopencv-dev \ + libdcmtk-dev \ + libopenjp2-7-dev \ + libopenslide-dev \ + wget \ + swig \ + libunittest++-dev \ + ca-certificates \ + nano \ + software-properties-common \ + lsb-release \ + && add-apt-repository ppa:ubuntu-toolchain-r/test \ + && apt-get update \ + && apt-get install -y -qq --no-install-recommends \ + g++-10 \ + gcc-10 \ + && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 50 \ + && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 50 + +# Ensure latest version of CMake +RUN apt purge -y --auto-remove cmake +RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null +RUN apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" +RUN apt update && \ + apt install -y cmake + +RUN wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \ + mkdir /root/.conda &&\ + bash Miniconda3-latest-Linux-x86_64.sh -b &&\ + rm -f Miniconda3-latest-Linux-x86_64.sh + +RUN /root/miniconda3/bin/conda update --quiet -n base -c defaults conda && \ + /root/miniconda3/bin/conda create --quiet --name build_python3.8 python=3.8 && \ + /root/miniconda3/bin/conda install --quiet -n build_python3.8 numpy nomkl && \ + /root/miniconda3/bin/conda create --quiet --name build_python3.9 python=3.9 && \ + /root/miniconda3/bin/conda install --quiet -n build_python3.9 numpy nomkl && \ + /root/miniconda3/bin/conda create --quiet --name build_python3.10 python=3.10 && \ + /root/miniconda3/bin/conda install --quiet -n build_python3.10 numpy nomkl + +# Small hack to as libijg8 is installed in a different locations in Ubuntu 20.04 +RUN ln -s /usr/lib/x86_64-linux-gnu/libijg8.so /usr/lib/libijg8.so; exit 0; + +WORKDIR /root +RUN wget -q https://github.com/zeux/pugixml/archive/v1.9.tar.gz && tar xzf v1.9.tar.gz && rm v1.9.tar.gz && \ + wget -q ftp://dicom.offis.de/pub/dicom/offis/software/dcmtk/dcmtk364/dcmtk-3.6.4.tar.gz && tar xzf dcmtk-3.6.4.tar.gz && mv dcmtk-3.6.4 dcmtk && rm dcmtk-3.6.4.tar.gz +RUN git clone https://github.com/computationalpathologygroup/ASAP src &&\ + mkdir build + +WORKDIR /root/build +COPY build_ASAP.sh /root/build/build_ASAP.sh +RUN chmod a+rxwX ./build_ASAP.sh + +CMD ./build_ASAP.sh diff --git a/buildtools/build_ASAP.sh b/buildtools/build_ASAP.sh index ec8f120..3d0c041 100644 --- a/buildtools/build_ASAP.sh +++ b/buildtools/build_ASAP.sh @@ -1,60 +1,60 @@ -#!/bin/bash -if [ "$1" != "" ]; then - python_ver="$1" -else - python_ver="3.8" -fi - -if [ "$2" != "" ]; then - python_ver_no_dot="$2" -else - python_ver_no_dot="38" -fi - -if [ "$3" != "" ]; then - build_gui="$3" -else - build_gui="false" -fi -ubuntu_version=$(grep 'DISTRIB_RELEASE' /etc/lsb-release | cut -d'=' -f2) -ubuntu_version_no_dots=$(echo ${ubuntu_version} | tr -d ".") -echo "Building ASAP with Python ${python_ver}; building GUI = ${build_gui}; on Ubuntu ${ubuntu_version}" -if [ "${build_gui}" = "true" ] ; then \ - cmake ../src -DPugiXML_INCLUDE_DIR=/root/pugixml-1.9/src/ -DOPENSLIDE_INCLUDE_DIR=/usr/include/openslide \ - -DWRAP_MULTIRESOLUTIONIMAGEINTERFACE_PYTHON=TRUE -DCMAKE_INSTALL_PREFIX=/root/install \ - -DBUILD_ASAP=TRUE -DBUILD_EXECUTABLES=TRUE -DBUILD_IMAGEPROCESSING=TRUE -DBUILD_MULTIRESOLUTIONIMAGEINTERFACE_VSI_SUPPORT=TRUE -DCMAKE_BUILD_TYPE=Release \ - -DDCMTKJPEG_INCLUDE_DIR=/root -DDCMTKJPEG_LIBRARY=/usr/lib/libijg8.so -DUNITTEST_INCLUDE_DIR=/usr/include/UnitTest++ \ - -DPACKAGE_ON_INSTALL=TRUE -DBUILD_WORKLIST_INTERFACE=TRUE \ - -DPYTHON_DEBUG_LIBRARY=/root/miniconda3/envs/build_python${python_ver}/lib/libpython${python_ver}.so \ - -DPYTHON_LIBRARY_DEBUG=/root/miniconda3/envs/build_python${python_ver}/lib/libpython${python_ver}.so \ - -DPYTHON_LIBRARY=/root/miniconda3/envs/build_python${python_ver}/lib/libpython${python_ver}.so \ - -DPYTHON_INCLUDE_DIR=/root/miniconda3/envs/build_python${python_ver}/include/python${python_ver} \ - -DPYTHON_EXECUTABLE=/root/miniconda3/envs/build_python${python_ver}/bin/python \ - -DPYTHON_NUMPY_INCLUDE_DIR=/root/miniconda3/envs/build_python${python_ver}/lib/python${python_ver}/site-packages/numpy/core/include \ - ; else \ - echo "Skipping GUI..." - cmake ../src -DPugiXML_INCLUDE_DIR=/root/pugixml-1.9/src/ -DOPENSLIDE_INCLUDE_DIR=/usr/include/openslide \ - -DWRAP_MULTIRESOLUTIONIMAGEINTERFACE_PYTHON=TRUE -DCMAKE_INSTALL_PREFIX=/root/install \ - -DBUILD_MULTIRESOLUTIONIMAGEINTERFACE_VSI_SUPPORT=TRUE -DCMAKE_BUILD_TYPE=Release \ - -DDCMTKJPEG_INCLUDE_DIR=/root -DDCMTKJPEG_LIBRARY=/usr/lib/libijg8.so -DPACKAGE_ON_INSTALL=TRUE \ - -DPYTHON_DEBUG_LIBRARY=/root/miniconda3/envs/build_python${python_ver}/lib/libpython${python_ver}.so \ - -DPYTHON_LIBRARY_DEBUG=/root/miniconda3/envs/build_python${python_ver}/lib/libpython${python_ver}.so \ - -DPYTHON_LIBRARY=/root/miniconda3/envs/build_python${python_ver}/lib/libpython${python_ver}.so \ - -DPYTHON_INCLUDE_DIR=/root/miniconda3/envs/build_python${python_ver}/include/python${python_ver} \ - -DPYTHON_EXECUTABLE=/root/miniconda3/envs/build_python${python_ver}/bin/python \ - -DPYTHON_NUMPY_INCLUDE_DIR=/root/miniconda3/envs/build_python${python_ver}/lib/python${python_ver}/site-packages/numpy/core/include \ - ; fi -export LD_LIBRARY_PATH=/root/miniconda3/envs/build_python${python_ver}/lib -make package - -if [ "${build_gui}" = "true" ] ; then - for file in *.deb; do - outbasename="$(cut -d'-' -f1,2 <<<"$file")" - mv $file /artifacts/${outbasename}-py${python_ver_no_dot}-Ubuntu${ubuntu_version_no_dots}.deb - done; -else - for file in *.deb; do - outbasename="$(cut -d'-' -f1,2 <<<"$file")" - mv $file /artifacts/${outbasename}-nogui-py${python_ver_no_dot}-Ubuntu${ubuntu_version_no_dots}.deb - done; +#!/bin/bash +if [ "$1" != "" ]; then + python_ver="$1" +else + python_ver="3.8" +fi + +if [ "$2" != "" ]; then + python_ver_no_dot="$2" +else + python_ver_no_dot="38" +fi + +if [ "$3" != "" ]; then + build_gui="$3" +else + build_gui="false" +fi +ubuntu_version=$(grep 'DISTRIB_RELEASE' /etc/lsb-release | cut -d'=' -f2) +ubuntu_version_no_dots=$(echo ${ubuntu_version} | tr -d ".") +echo "Building ASAP with Python ${python_ver}; building GUI = ${build_gui}; on Ubuntu ${ubuntu_version}" +if [ "${build_gui}" = "true" ] ; then \ + cmake ../src -DPugiXML_INCLUDE_DIR=/root/pugixml-1.9/src/ -DOPENSLIDE_INCLUDE_DIR=/usr/include/openslide \ + -DWRAP_MULTIRESOLUTIONIMAGEINTERFACE_PYTHON=TRUE -DCMAKE_INSTALL_PREFIX=/root/install \ + -DBUILD_ASAP=TRUE -DBUILD_EXECUTABLES=TRUE -DBUILD_IMAGEPROCESSING=TRUE -DBUILD_MULTIRESOLUTIONIMAGEINTERFACE_VSI_SUPPORT=TRUE -DCMAKE_BUILD_TYPE=Release \ + -DDCMTKJPEG_INCLUDE_DIR=/root -DDCMTKJPEG_LIBRARY=/usr/lib/libijg8.so -DUNITTEST_INCLUDE_DIR=/usr/include/UnitTest++ \ + -DPACKAGE_ON_INSTALL=TRUE -DBUILD_WORKLIST_INTERFACE=TRUE \ + -DPYTHON_DEBUG_LIBRARY=/root/miniconda3/envs/build_python${python_ver}/lib/libpython${python_ver}.so \ + -DPYTHON_LIBRARY_DEBUG=/root/miniconda3/envs/build_python${python_ver}/lib/libpython${python_ver}.so \ + -DPYTHON_LIBRARY=/root/miniconda3/envs/build_python${python_ver}/lib/libpython${python_ver}.so \ + -DPYTHON_INCLUDE_DIR=/root/miniconda3/envs/build_python${python_ver}/include/python${python_ver} \ + -DPYTHON_EXECUTABLE=/root/miniconda3/envs/build_python${python_ver}/bin/python \ + -DPYTHON_NUMPY_INCLUDE_DIR=/root/miniconda3/envs/build_python${python_ver}/lib/python${python_ver}/site-packages/numpy/core/include \ + ; else \ + echo "Skipping GUI..." + cmake ../src -DPugiXML_INCLUDE_DIR=/root/pugixml-1.9/src/ -DOPENSLIDE_INCLUDE_DIR=/usr/include/openslide \ + -DWRAP_MULTIRESOLUTIONIMAGEINTERFACE_PYTHON=TRUE -DCMAKE_INSTALL_PREFIX=/root/install \ + -DBUILD_MULTIRESOLUTIONIMAGEINTERFACE_VSI_SUPPORT=TRUE -DCMAKE_BUILD_TYPE=Release \ + -DDCMTKJPEG_INCLUDE_DIR=/root -DDCMTKJPEG_LIBRARY=/usr/lib/libijg8.so -DPACKAGE_ON_INSTALL=TRUE \ + -DPYTHON_DEBUG_LIBRARY=/root/miniconda3/envs/build_python${python_ver}/lib/libpython${python_ver}.so \ + -DPYTHON_LIBRARY_DEBUG=/root/miniconda3/envs/build_python${python_ver}/lib/libpython${python_ver}.so \ + -DPYTHON_LIBRARY=/root/miniconda3/envs/build_python${python_ver}/lib/libpython${python_ver}.so \ + -DPYTHON_INCLUDE_DIR=/root/miniconda3/envs/build_python${python_ver}/include/python${python_ver} \ + -DPYTHON_EXECUTABLE=/root/miniconda3/envs/build_python${python_ver}/bin/python \ + -DPYTHON_NUMPY_INCLUDE_DIR=/root/miniconda3/envs/build_python${python_ver}/lib/python${python_ver}/site-packages/numpy/core/include \ + ; fi +export LD_LIBRARY_PATH=/root/miniconda3/envs/build_python${python_ver}/lib +make package + +if [ "${build_gui}" = "true" ] ; then + for file in *.deb; do + outbasename="$(cut -d'-' -f1,2 <<<"$file")" + mv $file /artifacts/${outbasename}-py${python_ver_no_dot}-Ubuntu${ubuntu_version_no_dots}.deb + done; +else + for file in *.deb; do + outbasename="$(cut -d'-' -f1,2 <<<"$file")" + mv $file /artifacts/${outbasename}-nogui-py${python_ver_no_dot}-Ubuntu${ubuntu_version_no_dots}.deb + done; fi \ No newline at end of file