Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .azure-pipelines/stage/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,19 @@ jobs:
- script: ./ci/mac_ci_setup.sh
displayName: "Install dependencies"

- script: ./ci/mac_ci_steps.sh
- bash: |
set -e
GCP_SERVICE_ACCOUNT_KEY_PATH=$(mktemp -t gcp_service_account.XXXXXX.json)
bash -c 'echo "$(GcpServiceAccountKey)"' | base64 --decode > "${GCP_SERVICE_ACCOUNT_KEY_PATH}"
BAZEL_BUILD_EXTRA_OPTIONS+=" --google_credentials=${GCP_SERVICE_ACCOUNT_KEY_PATH}"
./ci/mac_ci_steps.sh
displayName: "Run Mac CI"
env:
BAZEL_BUILD_EXTRA_OPTIONS: >-
--remote_download_toplevel
--flaky_test_attempts=2
--remote_cache=grpcs://remotebuildexecution.googleapis.com
--remote_instance_name=projects/envoy-ci/instances/default_instance
GCP_SERVICE_ACCOUNT_KEY: ${{ parameters.authGCP }}
ENVOY_RBE: 1

- task: PublishTestResults@2
Expand Down
19 changes: 16 additions & 3 deletions .azure-pipelines/stage/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,27 @@ jobs:
key: '"windows.release" | $(cacheKeyBazel)'
path: $(Build.StagingDirectory)/repository_cache
continueOnError: true
- bash: ci/run_envoy_docker.sh ci/windows_ci_steps.sh

- bash: |
set -e
ENVOY_SHARED_TMP_DIR="C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\bazel-shared"
mkdir -p "$ENVOY_SHARED_TMP_DIR"
GCP_SERVICE_ACCOUNT_KEY_PATH=$(mktemp -p "${ENVOY_SHARED_TMP_DIR}" -t gcp_service_account.XXXXXX.json)
bash -c 'echo "$(GcpServiceAccountKey)"' | base64 --decode > "${GCP_SERVICE_ACCOUNT_KEY_PATH}"
export BAZEL_BUILD_EXTRA_OPTIONS+=" --google_credentials=${GCP_SERVICE_ACCOUNT_KEY_PATH}"
export ENVOY_SHARED_TMP_DIR
ci/run_envoy_docker.sh ci/windows_ci_steps.sh
displayName: "Run Windows msvc-cl CI"
env:
CI_TARGET: "windows"
ENVOY_DOCKER_BUILD_DIR: "$(Build.StagingDirectory)"
ENVOY_RBE: "true"
BAZEL_BUILD_EXTRA_OPTIONS: "--config=remote-ci --config=rbe-google --config=remote-msvc-cl --jobs=$(RbeJobs) --flaky_test_attempts=2"
GCP_SERVICE_ACCOUNT_KEY: ${{ parameters.authGCP }}
BAZEL_BUILD_EXTRA_OPTIONS: >-
--config=remote-ci
--config=rbe-google
--config=remote-msvc-cl
--jobs=$(RbeJobs)
--flaky_test_attempts=2

- task: PublishTestResults@2
inputs:
Expand Down
4 changes: 1 addition & 3 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#!/usr/bin/env bash

. ci/setup_cache.sh
trap - EXIT # Don't remove the key file written into a temporary file

BAZELRC_FILE=~/.bazelrc bazel/setup_clang.sh /opt/llvm

# TODO(phlax): use user.bazelrc
# Use generated toolchain config because we know the base container is the one we're using in RBE.
# Not using libc++ here because clangd will raise some tidy issue in libc++ header as of version 9.
echo "build --config=rbe-toolchain-clang" >> ~/.bazelrc
Expand Down
2 changes: 0 additions & 2 deletions ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ set -e
export SRCDIR="${SRCDIR:-$PWD}"
export ENVOY_SRCDIR="${ENVOY_SRCDIR:-$PWD}"

# shellcheck source=ci/setup_cache.sh
. "$(dirname "$0")"/setup_cache.sh
# shellcheck source=ci/build_setup.sh
. "$(dirname "$0")"/build_setup.sh

Expand Down
3 changes: 0 additions & 3 deletions ci/mac_ci_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ trap finish EXIT
echo "disk space at beginning of build:"
df -h

# shellcheck source=ci/setup_cache.sh
. "$(dirname "$0")"/setup_cache.sh

read -ra BAZEL_BUILD_EXTRA_OPTIONS <<< "${BAZEL_BUILD_EXTRA_OPTIONS:-}"
read -ra BAZEL_EXTRA_TEST_OPTIONS <<< "${BAZEL_EXTRA_TEST_OPTIONS:-}"

Expand Down
2 changes: 1 addition & 1 deletion ci/run_envoy_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ VOLUMES=(
-v "${ENVOY_DOCKER_BUILD_DIR}":"${BUILD_DIR_MOUNT_DEST}"
-v "${SOURCE_DIR}":"${SOURCE_DIR_MOUNT_DEST}")

if ! is_windows && [[ -n "$ENVOY_DOCKER_IN_DOCKER" || -n "$ENVOY_SHARED_TMP_DIR" ]]; then
if [[ -n "$ENVOY_DOCKER_IN_DOCKER" || -n "$ENVOY_SHARED_TMP_DIR" ]]; then
# Create a "shared" directory that has the same path in/outside the container
# This allows the host docker engine to see artefacts using a temporary path created inside the container,
# at the same path.
Expand Down
37 changes: 0 additions & 37 deletions ci/setup_cache.sh

This file was deleted.

3 changes: 0 additions & 3 deletions ci/windows_ci_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ trap finish EXIT
echo "disk space at beginning of build:"
df -h

# shellcheck source=ci/setup_cache.sh
. "$(dirname "$0")"/setup_cache.sh

[ -z "${ENVOY_SRCDIR}" ] && export ENVOY_SRCDIR=/c/source

read -ra BAZEL_STARTUP_OPTIONS <<< "${BAZEL_STARTUP_OPTIONS:-}"
Expand Down