-
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.
Attempt to use ccache, stage correct llvm packages
- Loading branch information
Jason Mobarak
committed
Jun 11, 2018
1 parent
e56f084
commit 2fe5fd2
Showing
11 changed files
with
113 additions
and
31 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 |
---|---|---|
|
@@ -10,6 +10,10 @@ branches: | |
services: | ||
- docker | ||
|
||
cache: | ||
directories: | ||
- output/ccache | ||
|
||
matrix: | ||
include: | ||
- env: | ||
|
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,14 @@ | ||
# Copyright (C) 2017-2018 Swift Navigation Inc. | ||
# Contact: Swift Navigation <[email protected]> | ||
# | ||
# This source is subject to the license found in the file 'LICENSE' which must | ||
# be be distributed together with this source. All other rights reserved. | ||
# | ||
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, | ||
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED | ||
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. | ||
|
||
ARG DOCKER_NAMETAG | ||
FROM $DOCKER_NAMETAG | ||
|
||
RUN apt-get install -y llvm-4.0 llvm-4.0-dev clang-4.0 libclang-4.0-dev |
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,14 @@ | ||
# Copyright (C) 2017-2018 Swift Navigation Inc. | ||
# Contact: Swift Navigation <[email protected]> | ||
# | ||
# This source is subject to the license found in the file 'LICENSE' which must | ||
# be be distributed together with this source. All other rights reserved. | ||
# | ||
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, | ||
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED | ||
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. | ||
|
||
ARG DOCKER_NAMETAG | ||
FROM $DOCKER_NAMETAG | ||
|
||
RUN apt-get install -y llvm-6.0 llvm-6.0-dev clang-6.0 libclang-6.0-dev |
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 |
---|---|---|
@@ -1,5 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright (C) 2018 Swift Navigation Inc. | ||
# Contact: Swift Navigation <[email protected]> | ||
# | ||
# This source is subject to the license found in the file 'LICENSE' which must | ||
# be be distributed together with this source. All other rights reserved. | ||
# | ||
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, | ||
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED | ||
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. | ||
|
||
set -euo pipefail | ||
IFS=$'\n\t' | ||
|
||
|
@@ -9,14 +19,15 @@ die_non_empty() | |
die_not_defined() | ||
{ echo "*** ERROR: variable $1 must be defined (can be empty)" >&2; exit 1; } | ||
|
||
[[ -n "${VARIANT}" ]] || die_not_defined | ||
[[ -n "${VARIANT:-}" ]] || die_non_empty | ||
|
||
[[ "${VARIANT}" == "obfuscator" ]] || [[ "${VARIANT}" == "vanilla" ]] || \ | ||
{ echo "*** ERROR: invalid variant (must be one of 'vanilla', or 'obfuscator')" >&2; exit 1; } | ||
|
||
[[ -n "${LLVM_REPO}" ]] || die_non_empty LLVM_REPO | ||
[[ -n "${LLVM_BRANCH}" ]] || die_non_empty LLVM_BRANCH | ||
[[ -n "${CMAKE_COMMAND}" ]] || die_non_empty CMAKE_COMMAND | ||
[[ -n "${LLVM_REPO:-}" ]] || die_non_empty LLVM_REPO | ||
[[ -n "${LLVM_BRANCH:-}" ]] || die_non_empty LLVM_BRANCH | ||
[[ -n "${CMAKE_COMMAND:-}" ]] || die_non_empty CMAKE_COMMAND | ||
[[ -n "${CCACHE_DIR:-}" ]] || die_non_empty CCACHE_DIR | ||
|
||
[[ -n "${CLANG_REPO+x}" ]] || die_not_defined CLANG_REPO | ||
[[ -n "${CLANG_TOOLS_EXTRA_REPO+x}" ]] || die_not_defined CLANG_TOOLS_EXTRA_REPO | ||
|
@@ -49,6 +60,9 @@ if [ -n "${CLANG_TOOLS_EXTRA_REPO:-}" ]; then \ | |
fi | ||
fi | ||
|
||
export CCACHE_DIR=$CCACHE_DIR | ||
echo "CCACHE_DIR: $CCACHE_DIR" | ||
|
||
eval "$COMPILE_CPP_WRAPPER" | ||
|
||
cd "/work/$VARIANT-llvm" | ||
|
@@ -58,10 +72,5 @@ cd /work/build | |
|
||
eval "$CMAKE_COMMAND" | ||
|
||
if [[ -n "$VERBOSE" ]]; then | ||
ninja -v | ||
ninja -v install | ||
else | ||
ninja | ||
ninja install | ||
fi | ||
eval ninja "$VERBOSE" | ||
eval ninja "$VERBOSE" install |
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 +1 @@ | ||
swiftnav/arm-llvm-obf:4.0-ubuntu1604-2018.06.08 | ||
swiftnav/arm-llvm-obf:2018.06.10 |
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,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright (C) 2017 Swift Navigation Inc. | ||
# Contact: Swift Navigation <[email protected]> | ||
# | ||
# This source is subject to the license found in the file 'LICENSE' which must | ||
# be be distributed together with this source. All other rights reserved. | ||
# | ||
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, | ||
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED | ||
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. | ||
|
||
set -euo pipefail | ||
IFS=$'\n\t' | ||
|
||
[[ -z "${DEBUG:-}" ]] || set -x | ||
|
||
DOCKER_NAMETAG=$(cat docker_nametag) | ||
|
||
if [[ -n "${DOCKER_USER:-}" ]] && [[ -n "${DOCKER_PASS:-}" ]]; then | ||
echo "$DOCKER_PASS" | docker login --username="$DOCKER_USER" --password-stdin | ||
docker push "$DOCKER_NAMETAG" | ||
docker push "$DOCKER_NAMETAG-vanilla" | ||
docker push "$DOCKER_NAMETAG-obfuscator" | ||
else | ||
echo "WARNING: not pushing new image to Docker Hub..." >&2 | ||
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