summaryrefslogtreecommitdiff
path: root/ci/linux_gcc-latest_libstdcxx_cmake.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/linux_gcc-latest_libstdcxx_cmake.sh')
-rwxr-xr-xci/linux_gcc-latest_libstdcxx_cmake.sh20
1 files changed, 8 insertions, 12 deletions
diff --git a/ci/linux_gcc-latest_libstdcxx_cmake.sh b/ci/linux_gcc-latest_libstdcxx_cmake.sh
index 26415e23..ab06aa05 100755
--- a/ci/linux_gcc-latest_libstdcxx_cmake.sh
+++ b/ci/linux_gcc-latest_libstdcxx_cmake.sh
@@ -14,18 +14,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# TODO(absl-team): This script isn't fully hermetic because
-# -DABSL_USE_GOOGLETEST_HEAD=ON means that this script isn't pinned to a fixed
-# version of GoogleTest. This means that an upstream change to GoogleTest could
-# break this test. Fix this by allowing this script to pin to a known-good
-# version of GoogleTest.
-
set -euox pipefail
if [[ -z ${ABSEIL_ROOT:-} ]]; then
ABSEIL_ROOT="$(realpath $(dirname ${0})/..)"
fi
+source "${ABSEIL_ROOT}/ci/cmake_common.sh"
+
if [[ -z ${ABSL_CMAKE_CXX_STANDARDS:-} ]]; then
ABSL_CMAKE_CXX_STANDARDS="11 14 17 20"
fi
@@ -45,20 +41,20 @@ for std in ${ABSL_CMAKE_CXX_STANDARDS}; do
for compilation_mode in ${ABSL_CMAKE_BUILD_TYPES}; do
for build_shared in ${ABSL_CMAKE_BUILD_SHARED}; do
time docker run \
- --volume="${ABSEIL_ROOT}:/abseil-cpp:ro" \
- --workdir=/abseil-cpp \
+ --mount type=bind,source="${ABSEIL_ROOT}",target=/abseil-cpp,readonly \
--tmpfs=/buildfs:exec \
+ --workdir=/buildfs \
--cap-add=SYS_PTRACE \
--rm \
-e CFLAGS="-Werror" \
-e CXXFLAGS="-Werror" \
- ${DOCKER_CONTAINER} \
+ ${DOCKER_EXTRA_ARGS:-} \
+ "${DOCKER_CONTAINER}" \
/bin/bash -c "
- cd /buildfs && \
cmake /abseil-cpp \
- -DABSL_USE_GOOGLETEST_HEAD=ON \
- -DABSL_RUN_TESTS=ON \
+ -DABSL_GOOGLETEST_DOWNLOAD_URL=${ABSL_GOOGLETEST_DOWNLOAD_URL} \
-DBUILD_SHARED_LIBS=${build_shared} \
+ -DBUILD_TESTING=ON \
-DCMAKE_BUILD_TYPE=${compilation_mode} \
-DCMAKE_CXX_STANDARD=${std} \
-DCMAKE_MODULE_LINKER_FLAGS=\"-Wl,--no-undefined\" && \