forked from cloudflare/cfssl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
88 lines (80 loc) · 2.57 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
sudo: false
language: go
matrix:
include:
- go: 1.12.x
- go: 1.13.x
- go: 1.14.x
- go: 1.15.x
- arch: s390x
go: 1.12.x
- arch: s390x
go: 1.13.x
- arch: s390x
go: 1.14.x
- arch: s390x
go: 1.15.x
- arch: ppc64le
go: 1.12.x
- arch: ppc64le
go: 1.13.x
- arch: ppc64le
go: 1.14.x
- arch: ppc64le
go: 1.15.x
# Install g++-4.8 to support std=c++11 for github.com/google/certificate-transparency/go/merkletree
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
install:
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8"; fi
# Used by the certdb tests
services:
- mysql
- postgresql
# Only build pull requests, pushes to the master branch, and branches
# starting with `test-`. This is a convenient way to push branches to
# your own fork of the repository to ensure Travis passes before submitting
# a PR. For instance, you might run:
# git push myremote branchname:test-branchname
branches:
only:
- master
- /^test-.*$/
before_script:
- make bin/golint
#Setup postgresql for s390x environment or Power Support environment
- if [[ $(uname -m) == 's390x' || $(uname -m) == 'ppc64le' ]]; then
sudo apt-get --purge remove postgresql-*;
sudo rm -Rf /etc/postgresql /var/lib/postgresql;
sudo apt-get update;
sudo apt-get install -y postgresql-9.5;
sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/9.5/main/pg_hba.conf;
sudo service postgresql restart;
sudo -u postgres createuser travis;
fi
# Setup DBs + run migrations
# The sql_mode adjustment is to remove a sql_mode that was added in MySQL 5.7, this mode applies a rule that does:
# > The NO_ZERO_DATE mode affects whether the server permits '0000-00-00' as a valid date.
# https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_no_zero_date
- if [[ $(uname -s) == 'Linux' ]]; then
make bin/goose;
psql -c 'create database certdb_development;' -U postgres;
./bin/goose -path certdb/pg up;
mysql -e 'create database certdb_development;' -u root;
mysql -e 'SET global sql_mode = 0;' -u root;
./bin/goose -path certdb/mysql up;
fi
script:
- ./test.sh
env:
global:
- secure: "OmaaZ3jhU9VQ/0SYpenUJEfnmKy/MwExkefFRpDbkRSu/hTQpxxALAZV5WEHo7gxLRMRI0pytLo7w+lAd2FlX1CNcyY62MUicta/8P2twsxp+lR3v1bJ7dwk6qsDbO7Nvv3BKPCDQCHUkggbAEJaHEQGdLk4ursNEB1aGimuCEc="
- GO111MODULE=on
matrix:
- BUILD_TAGS="postgresql mysql"
after_success:
- bash <(curl -s https://codecov.io/bash)