diff --git a/.cirrus.yml b/.cirrus.yml index 4d2bea58e..5ed953769 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -2,7 +2,6 @@ macos_instance: image: ghcr.io/cirruslabs/macos-ventura-base:latest build_wheel_task: - skip: $CIRRUS_BRANCH != 'master' && $CIRRUS_TAG == '' env: PATH: $HOME/miniconda3/bin/:$PATH @@ -35,20 +34,22 @@ build_wheel_task: - conda list - which python - pip install wget colored - - pip install cibuildwheel==2.11.2 - - conda install -c conda-forge qt==5.15.6 + - pip install wheel delocate + - brew install qt - mkdir -p $HOME/software - cd $HOME/software - mkdir -p geant4 - cd geant4 + - rm -rf src bin data - mkdir -p src bin data - - if [ ! -d "src/source" ] ; then git clone --branch v11.1.1 https://github.com/Geant4/geant4.git --depth 1 src ; fi + - if [ ! -d "src/source" ] ; then git clone --branch v11.2.1 https://github.com/Geant4/geant4.git --depth 1 src ; fi - cd bin - cmake -DCMAKE_CXX_FLAGS=-std=c++17 -DGEANT4_INSTALL_DATA=OFF -DGEANT4_INSTALL_DATADIR=$HOME/software/geant4/data -DGEANT4_USE_QT=ON -DGEANT4_USE_OPENGL_X11=ON + -DGEANT4_USE_QT_QT6=ON -DGEANT4_BUILD_MULTITHREADED=ON -DGEANT4_USE_SYSTEM_EXPAT=OFF -DGEANT4_USE_GDML=ON @@ -57,6 +58,7 @@ build_wheel_task: - cd $HOME/software - mkdir -p itk - cd itk + - rm -rf src bin - mkdir -p src bin - if [ ! -d "src/CMake" ] ; then git clone --branch v5.2.1 https://github.com/InsightSoftwareConsortium/ITK.git --depth 1 src ; fi - cd bin @@ -70,18 +72,26 @@ build_wheel_task: opengate_core_script: - echo $PWD - - ls $HOME/miniconda3/plugins/platforms + - ls /opt/homebrew/share/qt/plugins/platforms - source $HOME/software/geant4/bin/geant4make.sh - export CMAKE_PREFIX_PATH=$HOME/software/geant4/bin:$HOME/software/itk/bin/:${CMAKE_PREFIX_PATH} - ls - cd core - mkdir opengate_core/plugins - - mkdir opengate_core/plugins/miniconda - - ls $HOME/miniconda3/lib/ + - cp -r /opt/homebrew/share/qt/plugins/platforms/* opengate_core/plugins/ + - cp -r /opt/homebrew/share/qt/plugins/imageformats/* opengate_core/plugins/ + - ls /opt/homebrew/lib + - rm -rf dist + - python3 setup.py sdist bdist_wheel + - ls dist + - export DYLD_LIBRARY_PATH=$HOME/software/geant4/bin/BuildProducts/lib:/opt/homebrew/share/qt/plugins/platforms/:/opt/X11/lib/:$DYLD_LIBRARY_PATH:/opt/homebrew/lib + - python -c "import os,delocate; print(os.path.join(os.path.dirname(delocate.__file__), 'tools.py'));quit()" | xargs -I{} sed -i."" "s/first, /input.pop('i386',None); first, /g" {} + - delocate-listdeps --all dist/*.whl + - delocate-wheel -w fixed_wheels -v dist/*.whl - rm -rf dist - - export CIBW_BEFORE_BUILD="python -m pip install colored; - python -c \"import os,delocate; print(os.path.join(os.path.dirname(delocate.__file__), 'tools.py'));quit()\" | xargs -I{} sed -i.\"\" \"s/first, /input.pop('i386',None); first, /g\" {}" - - python -m cibuildwheel --output-dir dist + - ls fixed_wheels + - delocate-listdeps --all fixed_wheels/*.whl + - mv fixed_wheels dist - cd dist - cd ../.. - mv core/dist .