forked from NeutrinoToolkit/Neutrino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.cirrus.yml
250 lines (236 loc) · 10.3 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
macM1_task:
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-base:latest
script: |
brew update
brew install objc-codegenutils objc-run create-dmg
brew install libomp git cmake fftw gcc qt lcov pkg-config zlib cmake libtiff cfitsio hdf5 gsl clfft pandoc vulkan-headers
brew install iltommi/brews/hdf4
mkdir -p build && cd build
cmake .. -DCMAKE_CXX_FLAGS="-I$(brew --prefix libomp)/include" -DCMAKE_EXE_LINKER_FLAGS="-L$(brew --prefix libomp)/lib"
make -j$(sysctl -n hw.ncpu) install
../resources/macPackage/prepareapp.sh
cp Neutrino-*.dmg ..
package_artifacts:
path: "Neutrino-*.*"
win32_task:
container:
image: fedora:36
script: |
dnf clean all
dnf -y --nogpgcheck update
dnf -y install cmake git mingw32-qt6* mingw32-gcc-c++ mingw32-gcc mingw32-gcc-gfortran mingw32-libgomp mingw32-gsl mingw32-zlib mingw32-nsis unzip wget autoconf automake bash bison bzip2 flex gcc-c++ gdk-pixbuf2-devel gettext git gperf intltool make sed libffi-devel libtool openssl-devel p7zip patch perl pkgconfig python ruby scons unzip wget xz gtk-doc dh-autoreconf mingw32-portablexdr pandoc mingw32-cfitsio
wget http://www.fftw.org/fftw-3.3.6-pl2.tar.gz
tar -zxvf fftw-3.3.6-pl2.tar.gz
cd fftw-3.3.6-pl2
mingw32-configure --disable-static --enable-shared --enable-threads --with-combined-threads
make bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
make install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
cd ..
wget https://support.hdfgroup.org/ftp/HDF/releases/HDF4.2.10/src/hdf-4.2.10.tar.bz2
tar -jxvf hdf-4.2.10.tar.bz2 && cd hdf-4.2.10
wget https://raw.githubusercontent.com/iltommi/mxe/master/src/hdf4-1-portability-fixes.patch
wget https://raw.githubusercontent.com/iltommi/mxe/master/src/hdf4-2-dllimport.patch
patch -p1 -u < hdf4-1-portability-fixes.patch
patch -p1 -u < hdf4-2-dllimport.patch
libtoolize --force
autoreconf --install
mingw32-configure --disable-static --enable-shared --disable-fortran --disable-netcdf LIBS="-lportablexdr -lws2_32" CPPFLAGS="-DH4_F77_FUNC\(name,NAME\)=NAME -DH4_BUILT_AS_DYNAMIC_LIB=1 -DBIG_LONGS"
make -C mfhdf/xdr LDFLAGS="-no-undefined -lssp"
make -C hdf/src LDFLAGS="-no-undefined -lssp"
make -C hdf/src install
make -C mfhdf/libsrc LDFLAGS="-no-undefined -ldf"
make -C mfhdf/libsrc install
cd ..
mkdir build && cd build
mingw32-cmake ..
make -j2 package
cp Neutrino*.exe ..
package_artifacts:
path: "Neutrino-*.*"
win64_task:
container:
image: fedora:36
script: |
dnf clean all
dnf -y --nogpgcheck update
dnf -y install cmake git mingw64-qt6* mingw64-gcc-c++ mingw64-gcc-gfortran mingw64-libgomp mingw64-gsl mingw64-zlib mingw32-nsis unzip wget autoconf automake bash bison bzip2 flex gcc-c++ gdk-pixbuf2-devel gettext git gperf intltool make sed libffi-devel libtool openssl-devel p7zip patch perl pkgconfig python ruby scons unzip wget xz gtk-doc dh-autoreconf mingw64-portablexdr pandoc mingw64-cfitsio
wget http://www.fftw.org/fftw-3.3.6-pl2.tar.gz
tar -zxvf fftw-3.3.6-pl2.tar.gz
cd fftw-3.3.6-pl2
mingw64-configure --disable-static --enable-shared --enable-threads --with-combined-threads
make -j bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
make install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
cd ..
wget https://support.hdfgroup.org/ftp/HDF/releases/HDF4.2.10/src/hdf-4.2.10.tar.bz2
tar -jxvf hdf-4.2.10.tar.bz2 && cd hdf-4.2.10
wget https://raw.githubusercontent.com/iltommi/mxe/master/src/hdf4-1-portability-fixes.patch
wget https://raw.githubusercontent.com/iltommi/mxe/master/src/hdf4-2-dllimport.patch
patch -p1 -u < hdf4-1-portability-fixes.patch
patch -p1 -u < hdf4-2-dllimport.patch
libtoolize --force
autoreconf --install
mingw64-configure --disable-static --enable-shared --disable-fortran --disable-netcdf LIBS="-lportablexdr -lws2_32" CPPFLAGS="-DH4_F77_FUNC\(name,NAME\)=NAME -DH4_BUILT_AS_DYNAMIC_LIB=1 -DBIG_LONGS"
make -C mfhdf/xdr LDFLAGS="-no-undefined -lssp"
make -C hdf/src LDFLAGS="-no-undefined -lssp"
make -C hdf/src install
make -C mfhdf/libsrc LDFLAGS="-no-undefined -ldf"
make -C mfhdf/libsrc install
cd ..
mkdir build && cd build
mingw64-cmake ..
make -j2 package
cp Neutrino*.exe ..
package_artifacts:
path: "Neutrino-*.*"
AppImage_task:
container:
image: fedora:36
env:
VERSION: Linux
APPIMAGE_EXTRACT_AND_RUN: 1
LD_LIBRARY_PATH: AppDir/usr/lib
script: |
dnf -y install gcc gcc-c++ qconf libtiff-devel gsl-devel redhat-lsb-core blas-devel pandoc hdf-devel hdf5-devel cfitsio-devel fftw3-devel rpm-build qt6-* git wget
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x linuxdeploy*.AppImage
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
make -j2 install DESTDIR=AppDir
../linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt --output appimage --custom-apprun=../resources/linuxPackage/AppRun --icon-file=../resources/icons/neutrino.svg
cp Neutrino-*.AppImage ..
package_artifacts:
path: "Neutrino-*.AppImage"
upload_task:
only_if: $CIRRUS_BRANCH == 'master'
depends_on:
- macM1
- win32
- win64
- AppImage
container:
image: ubuntu:22.04
script: |
apt-get update -qq
apt-get install -yy git gh wget zip
wget -q https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/package.zip
unzip package.zip -d package
git config --global user.name "Cirrus CI"
git config --global user.email "[email protected]"
git remote set-url origin https://[email protected]/NeutrinoToolkit/Neutrino
git pull
gh release upload --clobber latest package/*
# waiting linuxdeploy for arm
# allow_failures: true
# linuxArm_task:
# arm_container:
# image: arm64v8/fedora
# script: |
# dnf -y install gcc gcc-c++ qconf libtiff-devel gsl-devel redhat-lsb-core blas-devel pandoc hdf-devel hdf5-devel cfitsio-devel fftw3-devel rpm-build qt6-* git wget
# mkdir build && cd build
# cmake -DCMAKE_INSTALL_PREFIX=/usr ..
# make -j2 install DESTDIR=AppDir
ubuntu_task:
allow_failures: true
container:
image: ubuntu:22.04
script: |
export DEBIAN_FRONTEND=noninteractive
apt-get update -qq
apt-get install -yy git file pandoc cmake qt6* libqt6* libgl1-mesa-dev libvulkan* libnetpbm10-dev libhdf5-dev libfftw3-dev libhdf4-dev g++ build-essential libtiff5-dev libgsl-dev lsb-release libcfitsio-dev libhdf4-dev libhdf5-dev libhdf5-103
mkdir build && cd build
cmake ..
make -j2 package
cp Neutrino*.deb ..
package_artifacts:
path: "Neutrino-*.*"
debian_task:
allow_failures: true
container:
image: debian:unstable
script: |
export DEBIAN_FRONTEND=noninteractive
apt-get update -qq
apt-get install -yy git file pandoc cmake libgl1-mesa-dev libvulkan* libnetpbm10-dev libhdf5-dev libfftw3-dev libhdf4-dev g++ build-essential libtiff5-dev libgsl-dev lsb-release libcfitsio-dev libhdf4-dev libhdf5-dev libhdf5-103-1 libxcb-xkb-dev qt6-tools-dev qt6-multimedia-dev qt6-declarative-dev qt6-charts-dev qt6-svg-dev
apt-get install -yy qml6-module*
mkdir build && cd build
cmake ..
make -j2 package
cp Neutrino*.deb ..
package_artifacts:
path: "Neutrino-*.*"
mint_task:
allow_failures: true
container:
image: linuxmintd/mint21-amd64:latest
script: |
export DEBIAN_FRONTEND=noninteractive
apt-get update -qq
apt-get install -yy git file lsb-release pandoc g++ build-essential cmake qt6* libqt6* libgl1-mesa-dev libvulkan* libnetpbm10-dev libfftw3-dev libhdf4-dev libtiff5-dev libgsl-dev libcfitsio-dev libhdf5-dev libhdf5-103
mkdir build && cd build
cmake ..
make -j2 package
cp Neutrino*.deb ..
package_artifacts:
path: "Neutrino-*.*"
fedora_task:
allow_failures: true
container:
image: fedora:36
script: |
dnf clean all
dnf -y --nogpgcheck update
dnf -y install gcc gcc-c++ qconf git qt6-* libtiff-devel gsl-devel redhat-lsb-core blas-devel pandoc hdf-devel hdf5-devel cfitsio-devel fftw3-devel rpm-build
mkdir build && cd build
cmake ..
make -j2 package
cp Neutrino*.rpm ..
package_artifacts:
path: "Neutrino-*.*"
opensuse_task:
allow_failures: true
container:
image: opensuse/tumbleweed
script: |
zypper --non-interactive --quiet ar -C http://download.opensuse.org/repositories/science/openSUSE_Tumbleweed/science.repo
zypper --gpg-auto-import-keys ref
zypper update -y
zypper install -y gcc gcc-c++ qt6-* lsb-release libtiff-devel gsl-devel blas-devel pandoc hdf5-devel cfitsio-devel fftw3-threads-devel rpm-build git
mkdir build && cd build
cmake ..
make -j2 package
cp Neutrino*.rpm ..
package_artifacts:
path: "Neutrino-*.*"
# ARCHIVED RULES
# prepare_task:
# container:
# image: ubuntu:22.04
# script: |
# apt-get update -qq
# apt-get install -yy git gh
# git config --global user.name "Cirrus CI"
# git config --global user.email "[email protected]"
# git remote set-url origin https://[email protected]/NeutrinoToolkit/Neutrino
# git push origin :refs/tags/latest
# git tag -fa latest -m "Commit # $(git rev-list HEAD --count) Build info: https://cirrus-ci.com/build/$CIRRUS_BUILD_ID"
# git push --follow-tags origin HEAD:master || true
# gh release delete latest -y || true
# gh release create latest -n "Commit # $(git rev-list HEAD --count) Build info: https://cirrus-ci.com/build/$CIRRUS_BUILD_ID"
# macIntel_task:
# macos_instance:
# image: big-sur-base
# script: |
# brew update
# brew install objc-codegenutils objc-run create-dmg
# brew install libomp git cmake fftw gcc qt lcov pkg-config zlib cmake libtiff cfitsio hdf5 gsl clfft pandoc
# brew install iltommi/brews/hdf4
# mkdir -p build && cd build
# cmake .. -DCMAKE_CXX_FLAGS="-I$(brew --prefix libomp)/include" -DCMAKE_EXE_LINKER_FLAGS="-L$(brew --prefix libomp)/lib"
# make -j$(sysctl -n hw.ncpu) install
# ../resources/macPackage/prepareapp.sh
# cp Neutrino-*.dmg ..
# echo "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/package.zip"
# package_artifacts:
# path: "Neutrino-*.*"