forked from cheshirekow/cmake_format
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
99 lines (84 loc) · 3.18 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
dist: bionic
language: python
python:
- '2.7'
- '3.5'
- '3.6'
go:
- 1.13
env:
global:
# GITHUB_ACCESS_TOKEN=
- secure: "e62y3i4FG7KsJ/I8aVKoPk5CG0L7/TW1K4M+BLt5zULsKGyRw6b53I97p5Tc1zcAHqcocFeYL/eC3AucG3VNvyv6LIZuv5Y0upF/MG++tvkfV9Iyok76mP70DXR/ikAJDMgZSdEL/6uTTJ4XfBuH/VvCMMBvj+5ORSL65KIfqXcexj2JWaNtEEfwiVSkDvQZYYbHLRjQdAXzzI7g1xh+8mCmuFAvtn6U1cIZpdQv5u1DNIry8PoQ2asHr+vaCN9iVXvkWcUjoXpJTp96Hd8eO40ts3v3Ja1yJ7GzH09zjbKJS63dcB0LfV5uLjybJCkQ03102ua0V+E5OzPn5VYeIRSRWmdo35e9xZjqqbtNdHqNayOOpew/ik+wf2Nmzva5MCRf154pFfWjBDL4zh0WGBW8FyJ/9NxdYDJsOIznHBPBHCXnQOlrpdInIptuoLnT52V7MOq9XIiuqLlAH8Tr0GzNSJIJfwwhwJuGxgYi2DPDH8PRmkbHbvY/mN2WBxNFfHBSfCQGZJt6kHtEE+xIi0QQXME0h36V/8sOsmQDzArNFl2Um5GCXodtIjZI6Ga3nQhHDRRiQKJz0V/9OsJF4GteGw94xt/l6PkCT0o4D1cmPIELrBTzaEMnXYKRQEOPnvViyV8eJF2RBnaqNk+FqI+hmGtXXUKAdXZWAzyS66I="
before_install:
- sudo add-apt-repository --no-update -y ppa:longsleep/golang-backports
- sudo apt-get update
- sudo apt-get -y install
$(tr '\n' ' ' < apt-requirements.txt)
install:
- export GOROOT=/usr/lib/go-1.13
- export GOPATH=$HOME/gopath
- export PATH=$GOROOT/bin:$PATH:$GOPATH/bin
- export PATH=$PATH:${PWD}/cmake/node_modules/.bin
- go get $(tr '\n' ' ' < go-requirements.txt)
- npm --prefix ./cmake install ./cmake
- pip install -r pip-requirements.txt
script:
- mkdir ${TRAVIS_BUILD_DIR}/../cmake-build
- cd ${TRAVIS_BUILD_DIR}/../cmake-build
- cmake -G Ninja ${TRAVIS_BUILD_DIR}
- ninja better-test
- ninja lint
_is_pseudo_source_branch: &is-pseudo-source-branch
repo = cheshirekow/cmake_format
AND NOT tag IS present
AND branch =~ ^((master)|(staging))$
_is_pseudo_release: &is-pseudo-release
repo = cheshirekow/cmake_format
AND tag IS present
AND tag =~ ^pseudo-((master)|(staging))$
_not_pseudo_tag: ¬-pseudo-release
repo = cheshirekow/cmake_format
AND (tag IS NOT present
OR tag =~ ^(?!pseudo-).*$)
_is_release: &is-release
repo == cheshirekow/cmake_format
AND tag IS present
AND (tag =~ ^pseudo-((master)|(staging))$
OR tag =~ ^v\d+\.\d+\.\d+$)
jobs:
include:
# If this is a push to one of the pseudo-release branches, then generate
# the tag and push it to the repo
- stage: deploy
name: deploy-tag
if: *is-pseudo-source-branch
python: 3.6
script:
- mkdir ${TRAVIS_BUILD_DIR}/../cmake-build
- cd ${TRAVIS_BUILD_DIR}/../cmake-build
- cmake -G Ninja ${TRAVIS_BUILD_DIR}
- ninja push-cmakelang-github-pseudorelease-tag
# If this is a release tag, then push release artifacts and synchronize
# dependant repositories.
- name: deploy-artifacts
python: 3.6
if: *is-release
script:
- mkdir ${TRAVIS_BUILD_DIR}/../cmake-build
- cd ${TRAVIS_BUILD_DIR}/../cmake-build
- cmake -G Ninja ${TRAVIS_BUILD_DIR}
- ninja push-cmakelang-github-release
- ninja push-cmakelang-rtd-repo
- ninja push-cmakelang-pypi-release
- ninja push-cmakelang-precommit
- ninja push-cmakelang-docker
stages:
# Skip the test stage if this is a pseudo-release tag, since those tests
# were already run on the branch
- name: test
if: *not-pseudo-release
# Enable the deploy stage only if this was a push. In particular, exclude
# this stage on pull requests
- name: deploy
if: type = push