|
1 | 1 | language: c
|
2 |
| -os: linux |
3 |
| -dist: xenial |
4 |
| -sudo: required |
5 | 2 |
|
6 |
| -compiler: |
7 |
| - - m68k-atari-mint-gcc |
| 3 | +addons: |
| 4 | + apt: |
| 5 | + sources: |
| 6 | + - sourceline: 'ppa:vriviere/ppa' |
| 7 | + packages: |
| 8 | + - binutils-m68k-atari-mint |
| 9 | + - gcc-m68k-atari-mint |
| 10 | + - mintbin-m68k-atari-mint |
8 | 11 |
|
| 12 | +env: |
| 13 | + global: |
| 14 | + - PROJECT_REPO=$(echo "${TRAVIS_REPO_SLUG}" | cut -d '/' -f 1) |
| 15 | + - PROJECT_NAME=$(echo "${TRAVIS_REPO_SLUG}" | cut -d '/' -f 2) |
| 16 | + - PROJECT_VERSION="0.44.0" |
| 17 | + - INSTALL_DIR="/tmp/${PROJECT_NAME}" |
| 18 | + - DEPLOY_DIR="/tmp/${PROJECT_NAME}-deploy" |
| 19 | + - DEPLOY_ARCHIVE="tar.bz2" |
| 20 | + - BINTRAY_USER="mikrosk" |
| 21 | + # BINTRAY_API_KEY is defined in Travis Settings of freemint/gemlib |
| 22 | + |
| 23 | +# If before_install, install or before_script return a non-zero exit code, the build is errored and stops immediately. |
9 | 24 | before_install:
|
10 |
| - - export USER=$(echo "${TRAVIS_REPO_SLUG}" | cut -d '/' -f 1) |
11 |
| - - export BASE_RAW_URL="https://raw.githubusercontent.com/${USER}" |
| 25 | + - wget -q -O - https://github.com/freemint/travis-scripts/archive/master.tar.gz | tar xzf - --strip-components=1 -C .travis |
| 26 | + - if [ -x .travis/before_install.sh ]; then ./.travis/before_install.sh; else true; fi |
| 27 | + |
| 28 | +install: |
| 29 | + - if [ -x .travis/install.sh ]; then ./.travis/install.sh; else true; fi |
12 | 30 |
|
13 |
| - - wget -O .travis/download_prerequisities.sh "${BASE_RAW_URL}/travis-scripts/master/download_prerequisities.sh" |
14 |
| - - sh ./.travis/download_prerequisities.sh |
15 |
| - - sh ./.travis/install-cross-mint.sh gcc-m68k-atari-mint binutils-m68k-atari-mint mintlib-m68k-atari-mint > /dev/null |
16 |
| - |
17 | 31 | before_script:
|
18 |
| - - . ./.travis/setup_env.sh |
| 32 | + - if [ -x .travis/before_script.sh ]; then ./.travis/before_script.sh; else true; fi |
19 | 33 |
|
| 34 | +# If script returns a non-zero exit code, the build is failed, but continues to run before being marked as failed. |
20 | 35 | script:
|
21 |
| - - sh ./.travis/build.sh "${PWD}/.travis/tmp" "${PWD}/.travis/out" |
| 36 | + - if [ -x .travis/script.sh ]; then ./.travis/script.sh; else true; fi |
| 37 | +# The exit code of after_success, after_failure, after_script and subsequent stages do not affect the build result. |
| 38 | +# However, if one of these stages times out, the build is marked as a failure. |
| 39 | +after_success: |
| 40 | + - if [ -x .travis/after_success.sh ]; then ./.travis/after_success.sh; else true; fi |
| 41 | +after_failure: |
| 42 | + - if [ -x .travis/after_failure.sh ]; then ./.travis/after_failure.sh; else true; fi |
| 43 | + |
| 44 | +# A non-zero exit code in this phase will mark the build as errored. |
| 45 | +before_deploy: |
| 46 | + - if [ -x .travis/before_deploy.sh ]; then ./.travis/before_deploy.sh; else true; fi |
22 | 47 |
|
23 | 48 | deploy:
|
24 |
| - provider: script |
| 49 | + provider: bintray |
| 50 | + file: ".travis/bintray.desc" |
| 51 | + user: "${BINTRAY_USER}" |
| 52 | + key: "${BINTRAY_API_KEY}" |
25 | 53 | skip_cleanup: true
|
26 |
| - script: sh ./.travis/deploy.sh "${PWD}/.travis/out" $encrypted_184ce553573b_key $encrypted_184ce553573b_iv |
27 | 54 | on:
|
| 55 | + branch: master |
28 | 56 | repo: freemint/gemlib
|
| 57 | + |
| 58 | +after_deploy: |
| 59 | + - if [ -x .travis/after_deploy.sh ]; then ./.travis/after_deploy.sh; else true; fi |
| 60 | + |
| 61 | +after_script: |
| 62 | + - if [ -x .travis/after_script.sh ]; then ./.travis/after_script.sh; else true; fi |
0 commit comments