Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:Project-OSRM/node-osrm into latest
- Loading branch information
Showing
8 changed files
with
164 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
set -eu | ||
set -o pipefail | ||
|
||
if [[ $(uname -s) == 'Linux' ]]; then | ||
mason install clang 3.8.0 | ||
export PATH=$(mason prefix clang 3.8.0)/bin:${PATH} | ||
which clang++ | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,4 @@ function setup_mason() { | |
export CC=${CC:-clang} | ||
} | ||
|
||
|
||
setup_mason | ||
|
||
set +eu | ||
set +o pipefail | ||
setup_mason |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This script is sourced, so do not set -e or -o pipefail here. Doing so would | ||
# bleed into Travis' wrapper script, which messes with their workflow, e.g. | ||
# preventing after_failure scripts to be triggered. | ||
|
||
case `uname -s` in | ||
'Darwin') JOBS=$((`sysctl -n hw.ncpu` + 2)) ;; | ||
'Linux') JOBS=$((`nproc` + 2)) ;; | ||
*) JOBS=2 ;; | ||
esac | ||
|
||
function mapbox_time_start { | ||
local name=$1 | ||
mapbox_timer_name=$name | ||
|
||
mapbox_fold start $name | ||
|
||
mapbox_timer_id=$(printf %08x $(( RANDOM * RANDOM ))) | ||
eval "mapbox_start_time_$mapbox_timer_id=$(mapbox_nanoseconds)" | ||
echo -en "travis_time:start:$mapbox_timer_id\n" | ||
} | ||
|
||
function mapbox_time_finish { | ||
local name=${1:-$mapbox_timer_name} | ||
local timer_id=${2:-$mapbox_timer_id} | ||
local timer_start="mapbox_start_time_$timer_id" | ||
eval local start_time=\${$timer_start} | ||
local end_time=$(mapbox_nanoseconds) | ||
local duration=$(($end_time-$start_time)) | ||
echo -en "travis_time:end:$timer_id:start=$start_time,finish=$end_time,duration=$duration\n" | ||
|
||
mapbox_fold end $name | ||
} | ||
|
||
function mapbox_time { | ||
local name=$1 ; shift | ||
mapbox_time_start $name | ||
local timer_id=$mapbox_timer_id | ||
echo "\$ $@" | ||
$@ | ||
mapbox_time_finish $name $timer_id | ||
} | ||
|
||
function mapbox_fold { | ||
local action=$1 | ||
local name=$2 | ||
local ANSI_CLEAR="\e[0m" | ||
echo -en "travis_fold:${action}:${name}\r${ANSI_CLEAR}" | ||
} | ||
|
||
function mapbox_nanoseconds { | ||
local cmd="date" | ||
local format="+%s%N" | ||
local os=$(uname -s) | ||
|
||
if hash gdate > /dev/null 2>&1; then | ||
cmd="gdate" # use gdate if available | ||
elif [[ "$os" = Darwin ]]; then | ||
format="+%s000000000" # fallback to second precision on darwin (does not support %N) | ||
fi | ||
|
||
$cmd -u $format | ||
} | ||
|
||
export JOBS | ||
export -f mapbox_fold | ||
export -f mapbox_nanoseconds | ||
export -f mapbox_time | ||
export -f mapbox_time_start | ||
export -f mapbox_time_finish |
Oops, something went wrong.