-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (48 loc) · 2.39 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
sudo: required
language: generic
dist: xenial
osx_image: xcode11.2
env:
- PEXT_BUILD_PORTABLE=0
- PEXT_BUILD_PORTABLE=1
os:
- osx
- linux
before_install:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then pip3 install tox-travis; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then bash -xe travis/bootstrap-container.sh; fi
# beware: the line below is a DIRTY HACK -- it will override the system pip -- the proper way to do this would be a virtualenv
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then wget https://bootstrap.pypa.io/get-pip.py -O- | sudo python3.6; sudo pip install tox-travis; fi
script:
# compile translations
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install qt jq; fi
- bash prepare_activate_translations.sh 70 https://hosted.weblate.org/exports/stats/pext/?format=json
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then lrelease pext/pext.pro; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then PATH="/usr/local/opt/qt/bin:$PATH" lrelease pext/pext.pro; fi
# check REUSE compliance
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then pip3 install fsfe-reuse; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo pip install fsfe-reuse; fi
- reuse lint
# run tests
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then xvfb-run tox -v; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then tox -v; fi
# build dmg for macOS
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then bash -xe travis/build-dmg.sh; fi
# build AppImage for Linux
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then mkdir -p build; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then cd build; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then bash -xe ../travis/build-appimage.sh; fi
# get uploadtool
- wget https://github.com/probonopd/uploadtool/raw/master/upload.sh
after_success:
- if [ "$TRAVIS_BRANCH" != "master" ]; then export TRAVIS_EVENT_TYPE=pull_request; fi
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$PEXT_BUILD_PORTABLE" -eq 1 ]; then bash upload.sh Pext*.zip; fi
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$PEXT_BUILD_PORTABLE" -eq 0 ]; then bash upload.sh Pext*.dmg; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then bash upload.sh Pext*.AppImage*; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then bash upload.sh "$TRAVIS_BUILD_DIR/pext/VERSION"; fi
branches:
except:
- # Do not build tags that we create when we upload to GitHub Releases
- /^(?i:continuous)$/
- # Also, don't build i18n, the only changes are uncompiled translation files
- i18n