aboutsummaryrefslogtreecommitdiffstats
path: root/.travis.yml
diff options
context:
space:
mode:
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml100
1 files changed, 0 insertions, 100 deletions
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 554dbddff..000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,100 +0,0 @@
1matrix:
2 fast_finish: true
3 include:
4 - os: linux
5 dist: xenial
6 addons:
7 apt:
8 packages:
9 - libx11-dev
10 - libxext-dev
11 - libxss-dev
12 - libxkbfile-dev
13 - rpm
14 env:
15 - USE_HARD_LINKS=false
16 - ELECTRON_CACHE=$HOME/.cache/electron
17 - ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
18 - os: osx
19 osx_image: xcode12.4
20 env:
21 - USE_HARD_LINKS=false
22 - ELECTRON_CACHE=$HOME/.cache/electron
23 - ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
24
25language: node_js
26node_js: "14.16.1"
27
28git:
29 submodules: false
30branches:
31 only:
32 - develop
33 - release
34 - nightly
35cache:
36 directories:
37 - node_modules
38 - $HOME/.cache/electron
39 - $HOME/.cache/electron-builder
40
41before_install:
42 - git submodule update --init --recursive
43 - |
44 if [ $TRAVIS_BRANCH == "nightly" ]; then
45 git remote add source https://${GH_TOKEN}@github.com/getferdi/ferdi.git > /dev/null 2>&1
46 git fetch source
47 git merge --no-ff --commit -m "Merge remote-tracking branch 'source/develop' into HEAD [skip ci]" source/develop
48 CHANGES_COUNT=$(git diff --shortstat HEAD origin/$TRAVIS_BRANCH | wc -l)
49 echo "Travis event type: $TRAVIS_EVENT_TYPE"
50 echo "Number of changes: $CHANGES_COUNT"
51 if [ $CHANGES_COUNT -eq 0 -a $TRAVIS_EVENT_TYPE == "cron" ]; then
52 export SHOULD_CONTINUE_BUILD="false"
53 echo "Exporting SHOULD_CONTINUE_BUILD to false for future stages"
54 else
55 echo "Found changes, proceeding with submodule updates"
56 git submodule update --remote --force
57 git commit -am "Update submodules [skip ci]" --no-verify
58 echo "Completed merging from develop branch and upgrading submodules"
59 fi
60 fi
61install:
62 - |
63 if [ "$SHOULD_CONTINUE_BUILD" == "false" ]; then
64 echo "Skipping install stage since SHOULD_CONTINUE_BUILD: $SHOULD_CONTINUE_BUILD"
65 else
66 travis_retry npm cache clean -f || travis_terminate 1
67 travis_retry npm uninstall node-gyp || travis_terminate 1
68 travis_retry npm i -g node-gyp@8.0.0 || travis_terminate 1
69 cd recipes && npm i && npm run package && cd .. || travis_terminate 1
70 travis_retry npx lerna bootstrap || travis_terminate 1
71 fi
72before_script:
73 - |
74 if [ "$SHOULD_CONTINUE_BUILD" == "false" ]; then
75 echo "Skipping before_script stage since SHOULD_CONTINUE_BUILD: $SHOULD_CONTINUE_BUILD"
76 else
77 npm run lint && npm run test || travis_terminate 1
78 fi
79script:
80 - |
81 if [ "$SHOULD_CONTINUE_BUILD" == "false" ]; then
82 echo "Terminating the build since there are no changes in a cron-triggered build"
83 travis_terminate 0
84 exit 0 # Note: Bug fix since 'travis_terminate' doesn't seem to exit immediately
85 else
86 echo "Building for branch: $TRAVIS_BRANCH"
87 if [ $TRAVIS_BRANCH == "release" ]; then
88 travis_retry travis_wait 100 npm run build -- --publish always -c.publish.provider=github -c.publish.owner=getferdi -c.publish.repo=ferdi || travis_terminate 1
89 elif [ $TRAVIS_BRANCH == "nightly" ]; then
90 git commit -am "Apply linter fixes [skip ci]" --no-verify
91 npm version prerelease --preid=nightly -m "%s and trigger AppVeyor nightly build [skip travisci]" || travis_terminate 1
92 if [ $TRAVIS_OS_NAME == "osx" ]; then
93 git remote add source https://${GH_TOKEN}@github.com/getferdi/ferdi.git > /dev/null 2>&1
94 git push -qu source HEAD:$TRAVIS_BRANCH --no-verify >/dev/null 2>&1
95 fi
96 travis_retry travis_wait 100 npm run build -- --publish always -c.publish.provider=github -c.publish.owner=getferdi -c.publish.repo=nightlies || travis_terminate 1
97 elif [ "$TRAVIS_PULL_REQUEST_BRANCH" != "i18n" ]; then
98 travis_retry travis_wait 100 npm run build || travis_terminate 1
99 fi
100 fi