Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

Commit

Permalink
PR comments: fixed some //build and //ci scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
devjgm committed Aug 2, 2019
1 parent f995e97 commit 6ca0d62
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 7 deletions.
18 changes: 17 additions & 1 deletion bazel/compiler_id.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
#!/bin/bash
#
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Given an argument that is the path to a compiler, tries to determine an
# identification string for the compiler according to the CMake-defined IDs:
# https://cmake.org/cmake/help/v3.5/variable/CMAKE_LANG_COMPILER_ID.html
Expand All @@ -23,7 +37,9 @@ case "${version}" in
;;

*msvc* | *microsoft*)
echo "Clang"
# I don't think "--version" above will actually work on Windows, so we
# should figure out how to do that correctly. See #281.
echo "MSVC"
;;

*)
Expand Down
14 changes: 14 additions & 0 deletions bazel/compiler_version.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
#!/bin/bash
#
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Given an argument that is the path to a compiler, tries to determine
# the compiler's version by looking for the first string that looks like
# X.Y with more optional numbers, '.', '-', and '+'.
Expand Down
5 changes: 0 additions & 5 deletions ci/kokoro/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ elif [[ "${BUILD_NAME}" = "cxx17" ]]; then
in_docker_script="ci/kokoro/docker/build-in-docker-cmake.sh"
elif [[ "${BUILD_NAME}" = "coverage" ]]; then
export BUILD_TYPE=Coverage
export CODE_COVERAGE=yes
export RUN_INTEGRATION_TESTS=yes
export DISTRO=fedora-install
export DISTRO_VERSION=30
Expand Down Expand Up @@ -229,10 +228,6 @@ docker_flags=(
# installations.
"--env" "TEST_INSTALL=${TEST_INSTALL:-}"

# If set to 'yes', run compile with code coverage flags. Currently only the
# CMake builds use this flag.
"--env" "CODE_COVERAGE=${CODE_COVERAGE:-}"

# If set, pass -DGOOGLE_CLOUD_CPP_CXX_STANDARD=<value> to CMake.
"--env" "GOOGLE_CLOUD_CPP_CXX_STANDARD=${GOOGLE_CLOUD_CPP_CXX_STANDARD:-}"

Expand Down
2 changes: 1 addition & 1 deletion ci/kokoro/docker/upload-coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fi
source "${PROJECT_ROOT}/ci/kokoro/define-docker-variables.sh"
source "${PROJECT_ROOT}/ci/define-dump-log.sh"

if [[ "${CODE_COVERAGE:-}" != "yes" ]]; then
if [[ "${BUILD_NAME:-}" != "coverage" ]]; then
# Not a code coverage build, exit silently.
exit 0
fi
Expand Down

0 comments on commit 6ca0d62

Please sign in to comment.