1+ brew install
[email protected] || true 2+ brew link --overwrite
[email protected] 3+ # brew update
4+ # rm -rf /usr/local/bin/python3.1*-config /usr/local/bin/2to3-3.1* /usr/local/bin/idle3.1* /usr/local/bin/pydoc3.1* /usr/local/bin/python3.1*
5+ # rm -rf /usr/local/bin/python3-config /usr/local/bin/2to3 /usr/local/bin/idle3 /usr/local/bin/pydoc3 /usr/local/bin/python3
6+ brew install --force --verbose --overwrite \
7+ ccache \
8+ fftw \
9+ libomp \
10+ xquartz \
11+ xerces-c \
12+ wget || true
13+ brew uninstall --ignore-dependencies libxext
14+ brew uninstall --ignore-dependencies libx11
15+ export LDFLAGS=" -L/usr/local/opt/llvm/lib"
16+ export CPPFLAGS=" -I/usr/local/opt/llvm/include -fopenmp"
17+ conda info
18+ conda list
19+ which python
20+ python --version
21+ export PATH=" /usr/local/miniconda/envs/opengate_core/bin/:$PATH "
22+ pip install wget colored
23+ pip install wheel delocate
24+ if [[ ${{ matrix.os } } == " macos-15-intel" ]]; then
25+ conda install conda-forge::qt6-main conda-forge::qt6-3d
26+ else
27+ brew install qt
28+ fi
29+ mkdir -p $HOME /software
30+ if [ " ${{ steps.cache_opengate_core_dependencies.outputs.cache-hit } }" != ' true' ]; then
31+ cd $HOME /software
32+ mkdir geant4
33+ cd geant4
34+ mkdir src bin data
35+ git clone --branch $GEANT4_VERSION https://github.com/Geant4/geant4.git --depth 1 src
36+ cd bin
37+ cmake -DCMAKE_CXX_FLAGS=-std=c++17 \
38+ -DGEANT4_INSTALL_DATA=OFF \
39+ -DGEANT4_INSTALL_DATADIR=$HOME /software/geant4/data \
40+ -DGEANT4_USE_QT=ON \
41+ -DGEANT4_USE_OPENGL_X11=OFF \
42+ -DGEANT4_USE_QT_QT6=ON \
43+ -DGEANT4_USE_SYSTEM_EXPAT=OFF \
44+ -DGEANT4_BUILD_MULTITHREADED=ON \
45+ -DGEANT4_USE_GDML=ON \
46+ ../src
47+ make -j4
48+ cd $HOME /software
49+ mkdir itk
50+ cd itk
51+ mkdir src bin
52+ git clone --branch $ITK_VERSION https://github.com/InsightSoftwareConsortium/ITK.git --depth 1 src
53+ cd bin
54+ cmake -DCMAKE_CXX_FLAGS=-std=c++17 \
55+ -DBUILD_TESTING=OFF \
56+ -DITK_USE_FFTWD=ON \
57+ -DITK_USE_FFTWF=ON \
58+ -DITK_USE_SYSTEM_FFTW:BOOL=ON \
59+ ../src
60+ make -j4
61+ fi
62+ cd $GITHUB_WORKSPACE
63+ source $HOME /software/geant4/bin/geant4make.sh
64+ export CMAKE_PREFIX_PATH=$HOME /software/geant4/bin:$HOME /software/itk/bin/:${CMAKE_PREFIX_PATH}
65+ cd core
66+ mkdir opengate_core/plugins
67+ if [[ ${{ matrix.os } } == " macos-15-intel" ]]; then
68+ cp -r /Users/runner/miniconda3/envs/opengate_core/lib/qt6/plugins/platforms/* opengate_core/plugins/
69+ cp -r /Users/runner/miniconda3/envs/opengate_core/lib/qt6/plugins/imageformats opengate_core/plugins/
70+ else
71+ cp -r /opt/homebrew/share/qt/plugins/platforms/* opengate_core/plugins/
72+ cp -r /opt/homebrew/share/qt/plugins/imageformats/* opengate_core/plugins/
73+ fi
74+ python3 setup.py sdist bdist_wheel
75+ ls dist
76+ if [[ ${{ matrix.os } } == " macos-15-intel" ]]; then
77+ export DYLD_LIBRARY_PATH=$HOME /software/geant4/bin/BuildProducts/lib:/Users/runner/miniconda3/envs/opengate_core/lib/qt6/plugins/platforms:/opt/X11/lib/:$DYLD_LIBRARY_PATH :/Users/runner/miniconda3/envs/opengate_core/lib
78+ else
79+ 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
80+ 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" {}
81+ fi
82+ delocate-listdeps --all dist/* .whl
83+ delocate-wheel -w fixed_wheels -v dist/* .whl
84+ rm -rf dist
85+ ls fixed_wheels
86+ delocate-listdeps --all fixed_wheels/* .whl
87+ mv fixed_wheels dist
88+ cd dist
89+ if [[ ${{ matrix.os } } == " macos-15-intel" ]]; then
90+ find . -name ' *whl' -exec bash -c ' mv $0 ${0/macosx_15_0/macosx_10_9}' {} \;
91+ fi
92+ cd ../..
93+ mv core/dist .
0 commit comments