Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a43518f

Browse files
committed
See if we can add timings to the titles
1 parent 4cfaa9e commit a43518f

File tree

2 files changed

+30
-18
lines changed

2 files changed

+30
-18
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ matrix:
104104

105105
before_install:
106106
- |
107+
# Install libraries and set up ccache
107108
case "$TRAVIS_OS_NAME" in
108109
linux)
109110
export PATH=/usr/lib/ccache:$PATH

ci/osx-deps

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,40 @@
22

33
set -euo pipefail
44

5-
echo -e "travis_fold:start:Python\e[2K"
6-
echo "Install Python 3.8 from python.org"
5+
fold_start() {
6+
key=$1
7+
title=$2
8+
echo -e "travis_fold:start:$key\e[2K"
9+
echo -e "travis_time:start:$key\e[2K"
10+
tick="$(date +%s)"
11+
echo "$title"
12+
}
13+
14+
fold_end() {
15+
key=$1
16+
tock="$(date +%s)"
17+
nano=000000000
18+
echo -e "travis_time:end:$key:start=$tick$nano,finish=$tock$nano,duration=$((tock - tick))$nano\e[2K"
19+
echo -e "travis_fold:end:$key\e[2K"
20+
}
21+
22+
fold_start Python "Install Python 3.8 from python.org"
723
curl -O https://www.python.org/ftp/python/3.8.5/python-3.8.5-macosx10.9.pkg
824
sudo installer -package python-3.8.5-macosx10.9.pkg -target /
925
sudo ln -s /usr/local/bin/python3 /usr/local/bin/python
1026
hash -r
11-
echo -e "travis_fold:end:Python\e[2K"
27+
fold_end Python
1228

13-
echo -e "travis_fold:start:Qt4.8\e[2K"
14-
echo "Install Qt 4.8 from qt.io"
29+
fold_start Qt4.8 "Install Qt 4.8 from qt.io"
1530
curl -O https://download.qt.io/archive/qt/4.8/4.8.7/qt-opensource-mac-4.8.7.dmg
1631
hdiutil attach qt-opensource-mac-4.8.7.dmg
1732
sudo installer -package '/Volumes/Qt 4.8.7/packages/Qt_headers.pkg' -target /
1833
sudo installer -package '/Volumes/Qt 4.8.7/packages/Qt_imports.pkg' -target /
1934
sudo installer -package '/Volumes/Qt 4.8.7/packages/Qt_libraries.pkg' -target /
2035
hdiutil detach '/Volumes/Qt 4.8.7'
21-
echo -e "travis_fold:end:Qt4.8\e[2K"
36+
fold_end Qt4.8
2237

23-
echo -e "travis_fold:start:ccache\e[2K"
24-
echo 'Install ccache (compile it ourselves)'
38+
fold_start ccache 'Install ccache (compile it ourselves)'
2539
curl -O -L https://github.com/ccache/ccache/releases/download/v3.7.11/ccache-3.7.11.tar.xz
2640
tar xf ccache-3.7.11.tar.xz
2741
pushd ccache-3.7.11
@@ -32,10 +46,9 @@ popd
3246
for compiler in clang clang++ cc gcc c++ g++; do
3347
ln -sf ccache /usr/local/bin/$compiler
3448
done
35-
echo -e "travis_fold:end:ccache\e[2K"
49+
fold_end ccache
3650

37-
echo -e "travis_fold:start:pkg-config\e[2K"
38-
echo 'Install pkg-config (compile it ourselves)'
51+
fold_start pkg-config 'Install pkg-config (compile it ourselves)'
3952
curl -O -L https://dl.bintray.com/homebrew/mirror/pkg-config-0.29.2.tar.gz
4053
tar xf pkg-config-0.29.2.tar.gz
4154
pushd pkg-config-0.29.2
@@ -45,22 +58,20 @@ pushd pkg-config-0.29.2
4558
make
4659
make install
4760
popd
48-
echo -e "travis_fold:end:pkg-config\e[2K"
61+
fold_end pkg-config
4962

50-
echo -e "travis_fold:start:libpng\e[2K"
51-
echo 'Install libpng (compile it ourselves)'
63+
fold_start libpng 'Install libpng (compile it ourselves)'
5264
curl -O -L https://downloads.sourceforge.net/libpng/libpng-1.6.37.tar.xz
5365
tar xf libpng-1.6.37.tar.xz
5466
pushd libpng-1.6.37
5567
./configure --disable-dependency-tracking --disable-silent-rules --prefix=/usr/local
5668
make
5769
make install
5870
popd
59-
echo -e "travis_fold:end:libpng\e[2K"
71+
fold_end libpng
6072

61-
echo -e "travis_fold:start:freetype\e[2K"
62-
echo 'Install libpng (just unpack into the build directory)'
73+
fold_start freetype 'Install freetype (just unpack into the build directory)'
6374
curl -O -L https://download.savannah.gnu.org/releases/freetype/freetype-2.6.1.tar.gz
6475
mkdir -p build
6576
tar -x -C build -f freetype-2.6.1.tar.gz
66-
echo -e "travis_fold:end:freetype\e[2K"
77+
fold_end freetype

0 commit comments

Comments
 (0)