aboutsummaryrefslogtreecommitdiffstats
path: root/dist/linux/travis-utils.sh
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-08-25 12:05:25 +0200
committerTristan Gingold <tgingold@free.fr>2017-08-25 12:05:25 +0200
commit8342d5af61fc7c936c3f1f8354f3332d47a636b1 (patch)
tree22a99fabac585912b6652d553a3e612c0886384e /dist/linux/travis-utils.sh
parentfd99c0f8fc967b1b89b4eda249543b3df577d3f0 (diff)
downloadghdl-8342d5af61fc7c936c3f1f8354f3332d47a636b1.tar.gz
ghdl-8342d5af61fc7c936c3f1f8354f3332d47a636b1.tar.bz2
ghdl-8342d5af61fc7c936c3f1f8354f3332d47a636b1.zip
travis-ci: use matrix for docker builds
Diffstat (limited to 'dist/linux/travis-utils.sh')
-rw-r--r--dist/linux/travis-utils.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/dist/linux/travis-utils.sh b/dist/linux/travis-utils.sh
new file mode 100644
index 000000000..3f644c930
--- /dev/null
+++ b/dist/linux/travis-utils.sh
@@ -0,0 +1,22 @@
+# This is a trimmed down copy of
+# https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/templates/header.sh
+travis_time_start() {
+ travis_timer_id=$RANDOM
+ travis_start_time=$(travis_nanoseconds)
+ echo "travis_time:start:$travis_timer_id"
+}
+travis_time_finish() {
+ travis_end_time=$(travis_nanoseconds)
+ local duration=$(($travis_end_time-$travis_start_time))
+ echo "travis_time:end:$travis_timer_id:start=$travis_start_time,finish=$travis_end_time,duration=$duration"
+}
+
+if [ "$TRAVIS_OS_NAME" = "osx" ]; then
+ travis_nanoseconds() {
+ date -u '+%s000000000'
+ }
+else
+ travis_nanoseconds() {
+ date -u '+%s%N'
+ }
+fi