-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Ubuntu 14.04 support * Fix logging to figure out what's failing * Re-encrypt AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY / GITHUB_TOKEN * Manually build cmake since llvm requires a later version of cmake than what ubuntu 14.04 provides by default * Don't build/push of docker tag is already pushed Also trap logging so it doesn't overflow Travis. * Add a ticker * Don't eval DEBUG without default * Add some debugging * Add --no-tty to build with re-directed input/output * Echo every 10 seconds * Use a volume to make rebuilds easier * Build speed and travis fix-ups + Add support for --no-tty to more places and fix the non "--no-tty" support + Use a volume to (try to) speed up file access for the compilation + Fix more locations where the new docker_nametag file was not used * Shellcheck everything * Fix sysroot for c++
- Loading branch information
Jason Mobarak
authored
Dec 21, 2017
1 parent
a15624e
commit b050926
Showing
16 changed files
with
313 additions
and
89 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,61 @@ | ||
#!/bin/bash | ||
|
||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then | ||
file_names=`curl "https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST/files" | jq '.[] | .filename' | tr '\n' ' ' | tr '"' ' '` | ||
set -euo pipefail | ||
IFS=$'\n\t' | ||
|
||
if [[ -n "${TRAVIS_PULL_REQUEST:-}" ]] || [[ -n "${TRAVIS_COMMIT_RANGE:-}" ]]; then | ||
|
||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then | ||
file_names=$(curl "https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST/files" \ | ||
| jq '.[] | .filename' | tr '\n' ' ' | tr '"' ' ') | ||
else | ||
file_names=$( (git diff --name-only "$TRAVIS_COMMIT_RANGE" || echo "") \ | ||
| tr '\n' ' ' ) | ||
fi | ||
|
||
else | ||
file_names=`(git diff --name-only $TRAVIS_COMMIT_RANGE || echo "") | tr '\n' ' '` | ||
echo "WARNING: No travis information present, assuming this is a non-travis test run..." >&2 | ||
NO_TRAVIS=y | ||
fi | ||
|
||
if echo $file_names | grep -q "Dockerfile"; then | ||
./base.bash | ||
### Setup activity ticker | ||
|
||
( | ||
while true; do | ||
echo '...' | ||
sleep 10 | ||
done | ||
)& | ||
TICKER_PID=$! | ||
trap 'kill ${TICKER_PID:-} ${BUILD_PID:-}' EXIT | ||
|
||
### base.bash | ||
|
||
if [[ -z "${NO_TRAVIS:-}" ]]; then | ||
if echo "$file_names" | grep -q "Dockerfile"; then | ||
echo -n 'Building base image (if needed) ... ' | ||
make base &>/tmp/base.bash.log | ||
echo 'DONE.' | ||
fi | ||
fi | ||
|
||
./build.bash --arch=$ARCH | ||
### build.bash | ||
|
||
echo 'Running build of llvm-obfuscator... ' | ||
|
||
make "ARCH=$ARCH" NO_TTY=y build &>/tmp/build.bash.log & | ||
BUILD_PID=$! | ||
|
||
wait $BUILD_PID | ||
|
||
echo 'DONE.' | ||
|
||
### build_example.bash | ||
|
||
if [[ $ARCH = arm ]]; then | ||
./build_example.bash | ||
|
||
echo -n 'Building example project... ' | ||
make NO_TTY=y build-example &>/tmp/build_example.bash.log | ||
|
||
echo 'DONE.' | ||
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
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,34 @@ | ||
SCRIPTS := .travis.sh \ | ||
base.bash \ | ||
build.bash \ | ||
build_example.bash \ | ||
publish.sh \ | ||
run_build_shell.bash \ | ||
stage_sysroot.bash \ | ||
|
||
check: | ||
docker run -v $(CURDIR):/mnt koalaman/shellcheck -x $(SCRIPTS) | ||
|
||
check-%: | ||
docker run -v $(CURDIR):/mnt koalaman/shellcheck -x $*.bash | ||
|
||
ifeq ($(NO_TTY),y) | ||
NO_TTY_ARG := --no-tty | ||
else | ||
NO_TTY_ARG := | ||
endif | ||
|
||
base: check-base | ||
$(CURDIR)/base.bash $(NO_TTY_ARG) | ||
|
||
build: check-build | ||
$(CURDIR)/build.bash $(NO_TTY_ARG) --arch=$(ARCH) | ||
|
||
stage: check-stage_sysroot | ||
$(CURDIR)/stage_sysroot.bash $(NO_TTY_ARG) | ||
|
||
build-example: check-build_example | ||
$(CURDIR)/build_example.bash $(NO_TTY_ARG) | ||
|
||
run: check-run_build_shell | ||
$(CURDIR)/run_build_shell.bash $(NO_TTY_ARG) |
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
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
Oops, something went wrong.