forked from Samsung/netcoredbg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
77 lines (67 loc) · 1.87 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
matrix:
allow_failures:
- os: osx
include:
- os: linux
dist: bionic
env: MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0"
addons:
apt:
packages:
- llvm-6.0
- clang-6.0
- os: linux
dist: focal
env: MATRIX_EVAL="CC=clang-9 && CXX=clang++-9"
addons:
apt:
packages:
- llvm-9
- clang-9
- os: osx
osx_image: xcode12
language: cpp
branches:
except:
- /[0-9]+\.[0-9]+\.[0-9]+-[0-9]+/
git:
depth: false
env:
global:
- RELEASE_BRANCH=master
script:
- eval "${MATRIX_EVAL}"
- mkdir build && cd build
- |
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/../bin
cmake --build . --target install
- cd ..
before_deploy:
- |
if [ "$TRAVIS_BRANCH" = "$RELEASE_BRANCH" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then
if [[ -z "$TRAVIS_TAG" ]]; then
export TRAVIS_TAG="$(awk '/Version:/ {print $2}' ./packaging/netcoredbg.spec)-$(git rev-list HEAD --count)"
git config --local user.name "Travis"
git config --local user.email "[email protected]"
git tag "$TRAVIS_TAG" -a -m "[Autogenerated] This is the latest version pushed to the ${TRAVIS_BRANCH} branch."
git push https://${GITHUB_API_KEY}@github.com/${TRAVIS_REPO_SLUG} --tags >/dev/null 2>&1
fi
# Prepare files for deployment
mv bin netcoredbg
if [ ${TRAVIS_OS_NAME} = 'linux' ]; then
tar cfz netcoredbg-${TRAVIS_OS_NAME}-${TRAVIS_DIST}-${TRAVIS_CPU_ARCH}.tar.gz ./netcoredbg/*
else
tar cfz netcoredbg-${TRAVIS_OS_NAME}.tar.gz ./netcoredbg/*
fi
fi
deploy:
provider: releases
api_key: $GITHUB_API_KEY
file:
- "*.tar.gz"
file_glob: true
skip_cleanup: true
overwrite: true
on:
repo: $TRAVIS_REPO_SLUG
branch: $RELEASE_BRANCH