forked from AnAkkk/TFTrue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
58 lines (48 loc) · 1.44 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
os: linux
dist: bionic
language: cpp
compiler:
- gcc
addons:
apt:
packages:
- g++-11-multilib
- gcc-11-multilib
- linux-libc-dev:i386
- cmake
sources:
- sourceline: ppa:ubuntu-toolchain-r/test
- sourceline: 'deb https://apt.kitware.com/ubuntu/ bionic main'
key_url: 'https://apt.kitware.com/keys/kitware-archive-latest.asc'
install:
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 20
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 20
before_script:
- mkdir build
- cd build
- /usr/bin/cmake -DCMAKE_BUILD_TYPE=Release ..
- /usr/bin/cmake --build . --verbose
script: make
after_success:
# set up our cfg
- git config --global user.email "[email protected]"
- git config --global user.name "Travis CI"
# copy our just built file to the releases folder
- cp ./TFTrue.so ../release/TFTrue.so -vf
# checkout our current branch, so we're not on a detatched head
- git checkout ${TRAVIS_BRANCH}
# add our built file
- git add ../release/TFTrue.so
# commit, add correct remote, and push
- git commit --message "Travis build ${TRAVIS_BUILD_NUMBER} on branch ${TRAVIS_BRANCH}"
- git remote add origin-push https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
- git push -u origin-push ${TRAVIS_BRANCH}
deploy:
provider: releases
api_key: ${GH_TOKEN}
file: ./TFTrue.so
skip_cleanup: true
draft: false
on:
tags: true
# GH_TOKEN is a secret token defined in your travis proj