-
Notifications
You must be signed in to change notification settings - Fork 115
/
.travis.yml
258 lines (213 loc) · 12.2 KB
/
.travis.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
250
251
252
253
254
255
256
257
258
dist: bionic
language: cpp
compiler: gcc
#env:
# # "BINTRAY_KEY=<secure>"
# - secure: "AjycfSfIztFeat6AO3SETSFW9Xd0AUt17hg87sEo8pSPO3SILq6bKS5Pfe4Bdo3Za32BvGzeJaOZ9EEVtzweuYJwsBejVfk2lxiBH5RKoBVrHpJLXDNj7MUt2ezb734bjFFt3+lMG84vSCqioNMcYwlHcqCChiTT529NZhaGMsDFzF5NimJZl0LGcEQlaTxTfeCKwSk+apHw5rQes2I2Jf9icweUGe/VOOVmYjDTiPWKcBEwBvfV5vabr5btCgUY8zK5451x/35API2Hbq7o0hNxqvwQUFI54jZwqfR4DOA1V/Nk7rdc34Fe+xgKSoBmHC0RgCIbXw1erEkn31Y0+tLBVxa971FB+y7L+5ZEaqw9UolT0PM5LHZmWUA60A5JlvsFOr0urid8lk0g5mdGF4aHEy2O5rDOMbwE11MpTEkDDbgE6uSD0/aubTJYPu24yMlBrP1lz10Sltg+YLi5hshhzRmd4iWTKuEy4jly1SdOKjjdbLCzlAnsF9Ta0a/lfumOd2lmELhYKhFLuVTCWZFvjpJyziCIFLVs4refDbDrsdfE+CaJedP/uBDGoBp4Hg6aug+66zKPybVzODqR2uIa3I7ACM3l/GdJcGg+1AH1T/ievq4rQ52T3MspevFxQmevuA9vvgOVko79PDrW1xbp+oQPTk0/pODNjVvrZFk="
env:
global:
- ANDROID_SDK_CMDLINE_TOOLS_ZIP="commandlinetools-linux-7583922_latest.zip"
- ANDROID_SDK_CMDLINE_TOOLS_SHA256="124f2d5115eee365df6cf3228ffbca6fc3911d16f8025bebd5b1c6e2fcfa7faf"
- ANDROID_BUILD_TOOLS_VER="28.0.3" # Same as buildToolsVersion in src/welle-gui/android/build.gradle
- ANDROID_PLATFORM_VER="android-30"
- ANDROID_NDK_ZIP="android-ndk-r20b-linux-x86_64.zip"
- ANDROID_NDK_SHA1="d903fdf077039ad9331fb6c3bee78aa46d45527b"
- ANDROID_NDK_MOUNT_DIR="${HOME}/r20b"
- ANDROID_NDK_BASE_DIR="android-ndk-r20b"
script:
- DATE=`date +%Y%m%d`
- GIT_HASH=`git rev-parse --short HEAD`
# Compile airspy
- wget https://github.com/airspy/host/archive/master.zip
- unzip master.zip
- cd airspyone_host-master/
- mkdir build
- cd build
- cmake ../ -DINSTALL_UDEV_RULES=ON
- make -j 4
- sudo make install
- cd ../..
# Compile librtlsdr
- git clone https://github.com/steve-m/librtlsdr.git
- cd librtlsdr
- mkdir build
- cd build
- cmake ../ -DDETACH_KERNEL_DRIVER=ON
- make -j 4
- sudo make install
- cd ../..
# Compile welle.io
- mkdir build
- cd build
- qmake PREFIX=/usr ..
- make -j4
- cd ..
# Compile welle-cli
- mkdir build-cli
- cd build-cli
- cmake ../ -DBUILD_WELLE_IO=OFF -DAIRSPY=TRUE -DRTLSDR=TRUE -DSOAPYSDR=TRUE
- make -j4
- cd ..
jobs:
include:
- os: linux
before_install:
# QT
- sudo add-apt-repository ppa:beineri/opt-qt-5.15.2-bionic -y
# SoapySDR
- sudo add-apt-repository ppa:myriadrf/drivers -y
- sudo apt-get update -qq
install:
- sudo apt-get -y install sshpass
# For AppImage
- sudo apt-get -y install libusb-1.0-0-dev pkg-config libmp3lame-dev libmpg123-dev qt515base qt515declarative qt515quickcontrols qt515quickcontrols2 qt515charts-no-lgpl qt515graphicaleffects qt515multimedia libpulse0 libfaad-dev libfftw3-dev libusb-1.0-0-dev mesa-common-dev libglu1-mesa-dev libpulse-dev libsoapysdr-dev
- source /opt/qt515/bin/qt515-env.sh
# For Flatpak
- sudo add-apt-repository ppa:alexlarsson/flatpak -y
- sudo apt-get update -qq
- sudo apt-get -y install flatpak-builder elfutils
- sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
- sudo flatpak install -y flathub org.kde.Sdk//5.15 org.kde.Platform//5.15
after_success:
- sudo ldconfig
# Get linuxdeploy
- sudo wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -P /usr/local/bin
- sudo chmod +x /usr/local/bin/linuxdeploy-x86_64.AppImage
- sudo wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage -P /usr/local/bin
- sudo chmod +x /usr/local/bin/linuxdeploy-plugin-qt-x86_64.AppImage
# Prepare welle.io AppImage
- find build/
- mkdir -p ./appdir/usr/share/applications
- cp welle-io.desktop ./appdir/usr/share/applications
- mkdir -p ./appdir/usr/bin
- cp build/src/welle-gui/welle-io ./appdir/usr/bin
- mkdir -p ./appdir/usr/lib
- mkdir -p ./appdir/usr/share/icons/hicolor/512x512/apps/
- cp src/welle-gui/icons/icon.png appdir/usr/share/icons/hicolor/512x512/apps/welle-io.png
# Create welle.io AppImage
- QML_SOURCES_PATHS=. linuxdeploy-x86_64.AppImage --appdir ./appdir --plugin qt --output appimage
- mv welle.io-"$GIT_HASH"-x86_64.AppImage "$DATE"_"$GIT_HASH"_Linux_welle-io-x86_64.AppImage
# Prepare welle-cli AppImage
- find build-cli/
- mkdir -p ./appdir-cli/usr/share/applications
- cp welle-cli.desktop ./appdir-cli/usr/share/applications
- mkdir -p ./appdir-cli/usr/bin
- cp build-cli/welle-cli ./appdir-cli/usr/bin
- mkdir -p ./appdir-cli/usr/lib
- mkdir -p ./appdir-cli/usr/share/icons/hicolor/512x512/apps/
- cp src/welle-gui/icons/icon.png appdir-cli/usr/share/icons/hicolor/512x512/apps/welle-io.png
# Create welle-cli AppImage
- linuxdeploy-x86_64.AppImage --appdir ./appdir-cli --output appimage
- mv welle.io-cli-"$GIT_HASH"-x86_64.AppImage "$DATE"_"$GIT_HASH"_Linux_welle-io-cli-x86_64.AppImage
# Create welle-gui Flatpak
- sudo flatpak-builder --repo=wellerepo --force-clean fp_build io.welle.welle-gui.json
- sudo flatpak --user remote-add --no-gpg-verify welle-repo wellerepo
- sudo flatpak --user install welle-repo io.welle.welle-gui --assumeyes
- flatpak build-bundle wellerepo welle-io.flatpak io.welle.welle-gui
- mv welle-io.flatpak "$DATE"_"$GIT_HASH"_Linux_welle-io-x86_64.flatpak
# Upload
- sshpass -p ${SFTP_PASSWORD} scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "$DATE"_"$GIT_HASH"_Linux_welle-io-x86_64.AppImage ${SFTP_USER}@welle-io-nightlies.albrechtloh.de:/welle-io-nightlies.albrechtloh.de/
- sshpass -p ${SFTP_PASSWORD} scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "$DATE"_"$GIT_HASH"_Linux_welle-io-cli-x86_64.AppImage ${SFTP_USER}@welle-io-nightlies.albrechtloh.de:/welle-io-nightlies.albrechtloh.de/
- sshpass -p ${SFTP_PASSWORD} scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "$DATE"_"$GIT_HASH"_Linux_welle-io-x86_64.flatpak ${SFTP_USER}@welle-io-nightlies.albrechtloh.de:/welle-io-nightlies.albrechtloh.de/
- os: linux
before_install:
- export JOB_ID=2020761
- sudo apt-get -y install wget
- wget https://salsa.debian.org/bastif/qt-android/-/jobs/$JOB_ID/artifacts/raw/aptly/public-key.asc
- sudo cp public-key.asc /etc/apt/trusted.gpg.d/
- sudo add-apt-repository "deb https://salsa.debian.org/bastif/qt-android/-/jobs/$JOB_ID/artifacts/raw/aptly stretch main" -y
- sudo apt-get update -qq
install:
- sudo apt-get -y install apt-transport-https ca-certificates default-jdk default-jre-headless eatmydata fuse-zip sshpass
# qt-android 5.15
- sudo apt-get -y -t stretch install qt-android-5.15
# Android SDK Command Line Tools
- wget https://dl.google.com/android/repository/$ANDROID_SDK_CMDLINE_TOOLS_ZIP
- echo "$ANDROID_SDK_CMDLINE_TOOLS_SHA256 $ANDROID_SDK_CMDLINE_TOOLS_ZIP" | sha256sum -c
# need to symlink /etc/mtab to work around a fusermount(1) deficiency (copied from /usr/lib/python3/dist-packages/reprotest/presets.py)
- test -c /dev/fuse || mknod -m 666 /dev/fuse c 10 229
- test -f /etc/mtab || ln -s ../proc/self/mounts /etc/mtab
- mkdir -p ${HOME}/cmdline-tools
- fuse-zip -r $ANDROID_SDK_CMDLINE_TOOLS_ZIP ${HOME}/cmdline-tools
# Android SDK Platform 30
- mkdir -p ${HOME}/android-sdk
- test -e ${HOME}/android-sdk/platforms/$ANDROID_PLATFORM_VER/source.properties || echo "y" | ${HOME}/cmdline-tools/cmdline-tools/bin/sdkmanager "platforms;$ANDROID_PLATFORM_VER" --channel=0 --sdk_root=${HOME}/android-sdk
- test -e ${HOME}/android-sdk/build-tools/$ANDROID_BUILD_TOOLS_VER/source.properties || echo "y" | ${HOME}/cmdline-tools/cmdline-tools/bin/sdkmanager "build-tools;$ANDROID_BUILD_TOOLS_VER" --channel=0 --sdk_root=${HOME}/android-sdk
- test -e ${HOME}/android-sdk/platform-tools/source.properties || echo "y" | ${HOME}/cmdline-tools/cmdline-tools/bin/sdkmanager "platform-tools" --channel=0 --sdk_root=${HOME}/android-sdk
# Unmound Command Line Tools
- fusermount -u ${HOME}/cmdline-tools
# Android NDK
- wget https://dl.google.com/android/repository/$ANDROID_NDK_ZIP
- echo "$ANDROID_NDK_SHA1 $ANDROID_NDK_ZIP" | sha1sum -c
# Android SDK & NDK
# need to symlink /etc/mtab to work around a fusermount(1) deficiency (copied from /usr/lib/python3/dist-packages/reprotest/presets.py)
- test -c /dev/fuse || mknod -m 666 /dev/fuse c 10 229
- test -f /etc/mtab || ln -s ../proc/self/mounts /etc/mtab
- mkdir -p $ANDROID_NDK_MOUNT_DIR
- fuse-zip -r $ANDROID_NDK_ZIP $ANDROID_NDK_MOUNT_DIR
script:
- DATE=`date +%Y%m%d`
- GIT_HASH=`git rev-parse --short HEAD`
# Create welle-io apk
- export ANDROID_SDK_ROOT=${HOME}/android-sdk
- export ANDROID_NDK_ROOT=$ANDROID_NDK_MOUNT_DIR/$ANDROID_NDK_BASE_DIR
- export QT_ROOT=/usr/lib/qt-android-5.15
- mkdir -p android-build
- cd android-build
- $QT_ROOT/bin/qmake ../welle.io.pro
- make -j$(nproc)
- make -j$(nproc) apk_install_target
- $QT_ROOT/bin/androiddeployqt --input src/welle-gui/android-welle-io-deployment-settings.json
--output src/welle-gui/android-build --android-platform android-30
--jdk /usr/lib/jvm/default-java --gradle
- cd ..
after_success:
# welle-io APK
- mv android-build/src/welle-gui/android-build/build/outputs/apk/debug/android-build-debug.apk "$DATE"_"$GIT_HASH"_Android_welle-io.apk
# Upload
- sshpass -p ${SFTP_PASSWORD} scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "$DATE"_"$GIT_HASH"_Android_welle-io.apk ${SFTP_USER}@welle-io-nightlies.albrechtloh.de:/welle-io-nightlies.albrechtloh.de/
- os: osx
osx_image: xcode13.2
before_install:
- brew tap pothosware/homebrew-pothos
- brew update
- brew pin ansible
install:
- brew install fftw faad2 lame mpg123 soapysdr esolitos/ipa/sshpass qt@5
- brew install --HEAD soapyuhd
- echo 'export PATH="/usr/local/opt/qt@5/bin:$PATH"' >> ~/.zshrc
- source ~/.zshrc
- export LIBRARY_PATH=/usr/local/lib
after_success:
# Get macdeployqtfix
- curl -O https://raw.githubusercontent.com/arl/macdeployqtfix/master/macdeployqtfix.py
# Prepare welle.io app
- find build
- mkdir appdir
- cp -R build/src/welle-gui/welle-io.app appdir/welle.io.app
- macdeployqt appdir/welle.io.app -qmldir=$TRAVIS_BUILD_DIR/src/welle-gui/QML
- cp /usr/local/lib/librtlsdr.0.dylib appdir/welle.io.app/Contents/Frameworks/librtlsdr.0.dylib
- install_name_tool -change @rpath/librtlsdr.0.dylib @executable_path/../Frameworks/librtlsdr.0.dylib appdir/welle.io.app/Contents/MacOS/welle-io
- python macdeployqtfix.py appdir/welle.io.app/Contents/MacOS/welle.io /usr/local/opt/qt
# Add shortcut to Applications
- ln -s /Applications appdir/Applications
# Build DMG
- hdiutil create welle-io.dmg -ov -volname "Install welle.io" -fs HFS+ -srcfolder appdir
- hdiutil convert welle-io.dmg -format UDZO -o "$DATE"_"$GIT_HASH"_MacOS_welle-io.dmg
- rm welle-io.dmg
# Upload
- sshpass -p ${SFTP_PASSWORD} scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "$DATE"_"$GIT_HASH"_MacOS_welle-io.dmg ${SFTP_USER}@welle-io-nightlies.albrechtloh.de:/welle-io-nightlies.albrechtloh.de/
#before_deploy:
# # Prepare bintray deploy
# - sed -e "s/\${VERSION}/"$DATE"_"$GIT_HASH"/" .travis-bintray-deploy.json.template >travis-bintray-deploy.json
#deploy:
# on:
# branch: next
# provider: bintray
# file: "travis-bintray-deploy.json"
# user: "albrechtl"
# skip_cleanup: true
# key: $BINTRAY_KEY
#after_deploy:
# Delete old builds on bintray. Keep only the last 20 builds
#- python .bintray_delete_old_version.py albrechtl $BINTRAY_KEY /packages/albrechtl/welle.io/welle.io_nightly 20