2019-02-21 11:04:31 -06:00
|
|
|
# vim: set ts=2 sts=2 sw=2 expandtab :
|
2020-04-03 20:24:10 -06:00
|
|
|
dist: bionic
|
|
|
|
language: shell
|
|
|
|
os: linux
|
2019-02-21 11:04:31 -06:00
|
|
|
services:
|
|
|
|
- docker
|
2020-04-03 20:24:10 -06:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- python3-github
|
2019-02-21 11:04:31 -06:00
|
|
|
|
2019-04-27 21:28:47 -05:00
|
|
|
branches:
|
|
|
|
except:
|
|
|
|
- gh-pages
|
|
|
|
|
2019-02-21 11:04:31 -06:00
|
|
|
before_install:
|
|
|
|
- curl -Ls -o docker-build https://github.com/mate-desktop/mate-dev-scripts/raw/master/travis/docker-build
|
2019-04-27 21:28:47 -05:00
|
|
|
- curl -Ls -o gen-index https://github.com/mate-desktop/mate-dev-scripts/raw/master/travis/gen-index.sh
|
|
|
|
- chmod +x docker-build gen-index
|
2019-02-21 11:04:31 -06:00
|
|
|
|
|
|
|
install:
|
2020-02-18 02:28:29 -06:00
|
|
|
- ./docker-build --name ${DISTRO} --config .build.yml --install
|
2019-02-21 11:04:31 -06:00
|
|
|
|
|
|
|
script:
|
2020-02-18 02:28:29 -06:00
|
|
|
- ./docker-build --name ${DISTRO} --verbose --config .build.yml --build scripts
|
2019-02-21 11:04:31 -06:00
|
|
|
|
2019-04-04 09:44:53 -06:00
|
|
|
deploy:
|
2019-04-27 21:28:47 -05:00
|
|
|
- provider: pages
|
2020-04-03 20:24:10 -06:00
|
|
|
edge: true
|
|
|
|
token: $GITHUB_TOKEN
|
|
|
|
keep_history: false
|
|
|
|
committer_from_gh: true
|
|
|
|
target_branch: gh-pages
|
|
|
|
local_dir: html-report
|
|
|
|
strategy: git
|
2019-04-27 21:28:47 -05:00
|
|
|
on:
|
|
|
|
all_branches: true
|
|
|
|
condition: ${DISTRO} =~ ^fedora.*$
|
2019-04-04 09:44:53 -06:00
|
|
|
- provider: script
|
2020-04-03 20:24:10 -06:00
|
|
|
edge: true
|
2020-02-18 02:28:29 -06:00
|
|
|
script: ./docker-build --verbose --config .build.yml --release github
|
2019-04-04 09:44:53 -06:00
|
|
|
on:
|
|
|
|
tags: true
|
|
|
|
condition: "${TRAVIS_TAG} =~ ^v.*$ && ${DISTRO} =~ ^fedora.*$"
|
|
|
|
|
2019-04-27 21:28:47 -05:00
|
|
|
after_success:
|
|
|
|
- 'if [[ "$TRAVIS_SECURE_ENV_VARS" == "true" && "$TRAVIS_PULL_REQUEST" != "false" && ${DISTRO} =~ ^fedora.*$ ]]; then
|
|
|
|
REPO_SLUG_ARRAY=(${TRAVIS_REPO_SLUG//\// });
|
|
|
|
REPO_NAME=${REPO_SLUG_ARRAY[1]};
|
|
|
|
URL="https://${REPO_NAME}.mate-desktop.dev";
|
|
|
|
COMMENT="Code analysis completed";
|
|
|
|
curl -H "Authorization: token $GITHUB_TOKEN" -X POST
|
|
|
|
-d "{\"state\": \"success\", \"description\": \"$COMMENT\", \"context\":\"scan-build\", \"target_url\": \"$URL\"}"
|
|
|
|
https://api.github.com/repos/${TRAVIS_REPO_SLUG}/statuses/${TRAVIS_PULL_REQUEST_SHA};
|
|
|
|
fi'
|
|
|
|
|
2019-02-21 11:04:31 -06:00
|
|
|
env:
|
2020-04-03 20:24:10 -06:00
|
|
|
- DISTRO="archlinux:latest"
|
2019-10-07 08:12:06 -05:00
|
|
|
- DISTRO="debian:testing"
|
2019-11-24 05:30:07 -06:00
|
|
|
- DISTRO="fedora:latest"
|
2020-03-26 06:46:06 -06:00
|
|
|
- DISTRO="ubuntu:devel"
|