1language: cpp
2
3# Any time a commit is done to either master or WIP we do a CI build on all three platforms to make
4# sure it really builds. The linux version will be saved to the continuous tag and thus available
5# for testing. All three platforms will get a proper release upon a tagged commit.
6
7matrix:
8   include:
9      - os: linux
10        dist: xenial
11        compiler: gcc
12        sudo: require
13        before_install:
14           - sudo add-apt-repository ppa:beineri/opt-qt-5.14.1-xenial -y
15           - sudo apt-get update -qq
16
17        install:
18           - sudo apt-get -y install qt514base qt514connectivity qt514imageformats qt514serialport qt514serialbus qt514doc qt514tools libgl1-mesa-dev
19           - source /opt/qt*/bin/qt*-env.sh
20
21        script:
22           - qmake CONFIG+=release PREFIX=/usr
23           - make -j$(nproc)
24           - make INSTALL_ROOT=appdir -j$(nproc) install ; find appdir/
25           - wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
26           - chmod a+x linuxdeployqt-continuous-x86_64.AppImage
27           # export VERSION=... # linuxdeployqt uses this for naming the file
28           - ./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/local/share/applications/SavvyCAN.desktop -appimage -extra-plugins=iconengines,platformthemes/libqgtk3.so,canbus
29
30        after_success:
31           # find appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq # for debugging
32           # curl --upload-file APPNAME*.AppImage https://transfer.sh/APPNAME-git.$(git rev-parse --short HEAD)-x86_64.AppImage
33           - wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
34           - bash upload.sh SavvyCAN*.AppImage*
35
36        deploy:
37           provider: releases
38           skip_cleanup: true
39           api_key: $GITHUB_TOKEN
40           file_glob: true
41           file: SavvyCAN*.AppImage
42           on:
43              tags: true #deploy is only done on tagged builds
44           draft: false
45
46#      - os: osx
47#        osx_image: xcode10
48#        before_install:
49#           - brew install qt5
50#           - brew link qt5 --force
51#        script:
52#           - qmake CONFIG+=release -spec macx-xcode SavvyCAN.pro
53#           - xcodebuild
54#           - mkdir Release/SavvyCAN.app/Contents/MacOS/help
55#           - cp -R help/*.* Release/SavvyCAN.app/Contents/MacOS/help
56#           - cd Release
57#           - ls SavvyCAN.app/Contents/MacOS
58#           - macdeployqt SavvyCAN.app -dmg
59#        deploy:
60#           provider: releases
61#           skip_cleanup: true
62#           api_key: $GITHUB_TOKEN
63#           file: SavvyCAN.dmg
64#           on:
65#              tags: true
66#           draft: false
67
68branches:
69  except:
70    - # Do not build tags that we create when we upload to GitHub Releases
71    - /^(?i:continuous)/
72