forked from OpenGATE/opengate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
131 lines (117 loc) · 4.11 KB
/
.cirrus.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
macos_instance:
image: ghcr.io/cirruslabs/macos-ventura-base:latest
build_wheel_task:
env:
PATH: $HOME/miniconda3/bin/:$PATH
clone_submodules_script:
- git submodule update --init
conda_script:
- wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-MacOSX-arm64.sh -O ~/miniconda.sh
- bash ~/miniconda.sh -b -p $HOME/miniconda3
- export PATH="$HOME/miniconda3/bin/:$PATH"
software_cache:
folder: $HOME/software
build_dependencies_script:
- sudo /usr/sbin/softwareupdate --install-rosetta --agree-to-license
- brew update
- brew install --force --verbose
ccache
fftw
llvm
libomp
xquartz
wget
- export LDFLAGS="-L/usr/local/opt/llvm/lib"
- export CPPFLAGS="-I/usr/local/opt/llvm/include -fopenmp"
- conda info
- conda list
- which python
- pip install wget colored
- pip install cibuildwheel==2.11.2
- conda install -c anaconda qt==5.15.9
- mkdir -p $HOME/software
- cd $HOME/software
- mkdir -p geant4
- cd geant4
- mkdir -p src bin data
- if [ ! -d "src/source" ] ; then git clone --branch v11.0.2 https://github.com/Geant4/geant4.git --depth 1 src ; fi
- cd bin
- cmake -DCMAKE_CXX_FLAGS=-std=c++17
-DGEANT4_INSTALL_DATA=ON
-DGEANT4_INSTALL_DATADIR=$HOME/software/geant4/data
-DGEANT4_USE_QT=ON
-DGEANT4_USE_OPENGL_X11=ON
-DGEANT4_BUILD_MULTITHREADED=ON
../src
- make -j4
- cd $HOME/software
- mkdir -p itk
- cd itk
- 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
- cmake -DCMAKE_CXX_FLAGS=-std=c++17
-DBUILD_TESTING=OFF
-DITK_USE_FFTWD=ON
-DITK_USE_FFTWF=ON
-DITK_USE_SYSTEM_FFTW:BOOL=ON
../src
- make -j4
opengate_core_script:
- echo $PWD
- ls $HOME/miniconda3/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/
- 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
- cd dist
- find . -name '*whl' -exec bash -c ' mv $0 ${0/macosx_11_0/macosx_10_9}' {} \;
- cd ../..
- mv core/dist .
binaries_artifacts:
path: dist/*
pypi_push_task:
depends_on:
- build_wheel
only_if: $CIRRUS_TAG != ''
env:
PATH: $HOME/miniconda3/bin/:$PATH
conda_script:
- wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-MacOSX-arm64.sh -O ~/miniconda.sh
- bash ~/miniconda.sh -b -p $HOME/miniconda3
- export PATH="$HOME/miniconda3/bin/:$PATH"
software_cache:
folder: $HOME/software
env:
TWINE_REPOSITORY: pypi
TWINE_USERNAME: __token__
TWINE_PASSWORD: $PYPI_TOKEN
build_dependencies_script:
- sudo /usr/sbin/softwareupdate --install-rosetta --agree-to-license
- brew update
- brew install --force --verbose
ccache
fftw
llvm
libomp
xquartz
wget
- export LDFLAGS="-L/usr/local/opt/llvm/lib"
- export CPPFLAGS="-I/usr/local/opt/llvm/include -fopenmp"
- conda info
- conda list
- which python
- pip install wget colored
- pip install cibuildwheel==2.11.2
- pip install twine
publish_script:
- wget https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/build_wheel/binaries.zip
- unzip binaries
- twine upload dist/*