Skip to content

Commit

Permalink
Merge pull request envoyproxy#90 from istio/merge-from-wasm
Browse files Browse the repository at this point in the history
Merge from envoyproxy/envoy-wasm:master
  • Loading branch information
rlenglet authored Aug 13, 2019
2 parents 0bce48d + c9595dc commit ad234fe
Show file tree
Hide file tree
Showing 2,974 changed files with 988,489 additions and 41,687 deletions.
53 changes: 53 additions & 0 deletions .azure-pipelines/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
jobs:
- job: bazel
strategy:
matrix:
release:
CI_TARGET: 'bazel.release'
tsan:
CI_TARGET: 'bazel.tsan'
gcc:
CI_TARGET: 'bazel.gcc'
compile_time_options:
CI_TARGET: 'bazel.compile_time_options'
dependsOn: [] # this removes the implicit dependency on previous stage and causes this to run in parallel.
timeoutInMinutes: 360
pool:
vmImage: 'Ubuntu 16.04'
steps:
- bash: |
echo "disk space at beginning of build:"
df -h
displayName: "Check disk space at beginning"
- bash: |
sudo mkdir -p /etc/docker
echo '{
"ipv6": true,
"fixed-cidr-v6": "2001:db8:1::/64"
}' | sudo tee /etc/docker/daemon.json
sudo service docker restart
displayName: "Enable IPv6"
- script: ci/run_envoy_docker.sh 'ci/do_ci.sh $(CI_TARGET)'
workingDirectory: $(Build.SourcesDirectory)
env:
ENVOY_DOCKER_BUILD_DIR: $(Build.StagingDirectory)
ENVOY_RBE: "true"
BAZEL_BUILD_EXTRA_OPTIONS: "--config=remote-ci --config=remote --jobs=100 --curses=no"
BAZEL_REMOTE_CACHE: grpcs://remotebuildexecution.googleapis.com
BAZEL_REMOTE_INSTANCE: projects/envoy-ci/instances/default_instance
GCP_SERVICE_ACCOUNT_KEY: $(GcpServiceAccountKey)
displayName: "Run CI script"

- bash: |
echo "disk space at end of build:"
df -h
displayName: "Check disk space at end"
condition: always()
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: "$(Build.StagingDirectory)/envoy"
artifactName: $(CI_TARGET)
condition: always()
26 changes: 26 additions & 0 deletions .azure-pipelines/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Azure Pipelines
trigger:
- master

jobs:
- job: macOS
timeoutInMinutes: 360
pool:
vmImage: 'macos-latest'

steps:
- script: ./ci/mac_ci_setup.sh
displayName: 'Install dependencies'

- script: ./ci/mac_ci_steps.sh
displayName: 'Run Mac CI'
env:
BAZEL_REMOTE_CACHE: grpcs://remotebuildexecution.googleapis.com
BAZEL_REMOTE_INSTANCE: projects/envoy-ci/instances/default_instance
GCP_SERVICE_ACCOUNT_KEY: $(GcpServiceAccountKey)

- task: PublishTestResults@2
inputs:
testResultsFiles: '**/bazel-testlogs/**/test.xml'
testRunTitle: 'macOS'
condition: always()
11 changes: 11 additions & 0 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
tasks:
release:
platform: ubuntu1804
build_targets:
- "//source/exe:envoy-static"
test_targets:
- "//test/..."
test_flags:
# Workaround for https://github.com/envoyproxy/envoy/issues/7647
- "--deleted_packages=//test/extensions/tracers/dynamic_ot"
1 change: 1 addition & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
examples/grpc-bridge/script
106 changes: 96 additions & 10 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
# Envoy specific Bazel build/test options.

# Bazel doesn't need more than 200MB of memory based on memory profiling:
# Bazel doesn't need more than 200MB of memory for local build based on memory profiling:
# https://docs.bazel.build/versions/master/skylark/performance.html#memory-profiling
# The default JVM max heapsize is 1/4 of physical memory up to 32GB which could be large
# enough to consume all memory constrained by cgroup in large host, which is the case in CircleCI.
# Limiting JVM heapsize here to let it do GC more when approaching the limit to
# leave room for compiler/linker.
startup --host_jvm_args=-Xmx512m
# The number 2G is choosed heuristically to both support in CircleCI and large enough for RBE.
# Startup options cannot be selected via config.
startup --host_jvm_args=-Xmx2g

build --workspace_status_command=bazel/get_workspace_status
build --experimental_remap_main_repo
build --experimental_local_memory_estimate
build --host_force_python=PY2
build --action_env=BAZEL_LINKLIBS=-l%:libstdc++.a
build --action_env=BAZEL_LINKOPTS=-lm:-static-libgcc
build --host_javabase=@bazel_tools//tools/jdk:remote_jdk11
build --javabase=@bazel_tools//tools/jdk:remote_jdk11

# Pass PATH, CC and CXX variables from the environment.
build --action_env=CC
build --action_env=CXX
build --action_env=PATH

# Basic ASAN/UBSAN that works for gcc
build:asan --action_env=BAZEL_LINKLIBS=
build:asan --action_env=BAZEL_LINKOPTS=-lstdc++:-lm
build:asan --define ENVOY_CONFIG_ASAN=1
build:asan --copt -fsanitize=address,undefined
build:asan --linkopt -fsanitize=address,undefined
Expand All @@ -20,7 +39,8 @@ build:asan --test_tag_filters=-no_asan
build:asan --define signal_trace=disabled
build:asan --copt -DADDRESS_SANITIZER=1
build:asan --copt -D__SANITIZE_ADDRESS__
build:asan --test_env=ASAN_OPTIONS=handle_abort=1:allow_addr2line=true:check_initialization_order=true:strict_init_order=true
build:asan --test_env=ASAN_OPTIONS=handle_abort=1:allow_addr2line=true:check_initialization_order=true:strict_init_order=true:detect_odr_violation=1
build:asan --test_env=UBSAN_OPTIONS=halt_on_error=true:print_stacktrace=1
build:asan --test_env=ASAN_SYMBOLIZER_PATH

# Clang ASAN/UBSAN
Expand All @@ -32,13 +52,20 @@ build:macos-asan --config=asan
# Workaround, see https://github.com/bazelbuild/bazel/issues/6932
build:macos-asan --copt -Wno-macro-redefined
build:macos-asan --copt -D_FORTIFY_SOURCE=0
# Workaround, see https://github.com/bazelbuild/bazel/issues/4341
build:macos-asan --copt -DGRPC_BAZEL_BUILD
# Dynamic link cause issues like: `dyld: malformed mach-o: load commands size (59272) > 32768`
build:macos-asan --dynamic_mode=off

# Clang TSAN
build:clang-tsan --define ENVOY_CONFIG_TSAN=1
build:clang-tsan --copt -fsanitize=thread
build:clang-tsan --linkopt -fsanitize=thread
build:clang-tsan --define tcmalloc=disabled
build:clang-tsan --linkopt -fuse-ld=lld
build:clang-tsan --linkopt -static-libsan
build:clang-tsan --define tcmalloc=disabled
# Needed due to https://github.com/libevent/libevent/issues/777
build:clang-tsan --copt -DEVENT__DISABLE_DEBUG_MODE

# Clang MSAN - broken today since we need to rebuild lib[std]c++ and external deps with MSAN
# support (see https://github.com/envoyproxy/envoy/issues/443).
Expand All @@ -47,15 +74,74 @@ build:clang-msan --copt -fsanitize=memory
build:clang-msan --linkopt -fsanitize=memory
build:clang-msan --define tcmalloc=disabled
build:clang-msan --copt -fsanitize-memory-track-origins=2
build:clang-msan --linkopt -fuse-ld=lld

# Clang with libc++
build:libc++ --action_env=CC
build:libc++ --action_env=CXX
# TODO(cmluciano) fix and re-enable _LIBCPP_VERSION testing for TCMALLOC in Envoy::Stats::TestUtil::hasDeterministicMallocStats
# and update stats_integration_test with appropriate m_per_cluster value
build:libc++ --action_env=CXXFLAGS=-stdlib=libc++
build:libc++ --action_env=PATH
build:libc++ --action_env=BAZEL_CXXOPTS=-stdlib=libc++
build:libc++ --action_env=BAZEL_LINKLIBS=-l%:libc++.a:-l%:libc++abi.a:-lm
build:libc++ --host_linkopt=-fuse-ld=lld
build:libc++ --define force_libcpp=enabled
build:libc++ --linkopt -fuse-ld=lld

# Optimize build for binary size reduction.
build:sizeopt -c opt --copt -Os

# Test options
test --test_env=HEAPCHECK=normal --test_env=PPROF_PATH
build --test_env=HEAPCHECK=normal --test_env=PPROF_PATH

# Remote execution: https://docs.bazel.build/versions/master/remote-execution.html
build:rbe-toolchain --host_platform=@envoy//bazel/toolchains:rbe_ubuntu_clang_platform
build:rbe-toolchain --platforms=@envoy//bazel/toolchains:rbe_ubuntu_clang_platform
build:rbe-toolchain --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1

build:rbe-toolchain-clang --config=rbe-toolchain
build:rbe-toolchain-clang --crosstool_top=@rbe_ubuntu_clang//cc:toolchain
build:rbe-toolchain-clang --extra_toolchains=@rbe_ubuntu_clang//config:cc-toolchain
build:rbe-toolchain-clang --action_env=CC=clang --action_env=CXX=clang++ --action_env=PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/llvm-8/bin

build:rbe-toolchain-clang-libc++ --config=rbe-toolchain
build:rbe-toolchain-clang-libc++ --crosstool_top=@rbe_ubuntu_clang_libcxx//cc:toolchain
build:rbe-toolchain-clang-libc++ --extra_toolchains=@rbe_ubuntu_clang_libcxx//config:cc-toolchain
build:rbe-toolchain-clang-libc++ --action_env=CC=clang --action_env=CXX=clang++ --action_env=PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/llvm-8/bin

build:rbe-toolchain-gcc --config=rbe-toolchain
build:rbe-toolchain-gcc --crosstool_top=@rbe_ubuntu_gcc//cc:toolchain
build:rbe-toolchain-gcc --extra_toolchains=@rbe_ubuntu_gcc//config:cc-toolchain

build:remote --spawn_strategy=remote,sandboxed,local
build:remote --strategy=Javac=remote,sandboxed,local
build:remote --strategy=Closure=remote,sandboxed,local
build:remote --strategy=Genrule=remote,sandboxed,local
build:remote --remote_timeout=3600
build:remote --auth_enabled=true
build:remote --experimental_inmemory_jdeps_files
build:remote --experimental_inmemory_dotd_files
build:remote --experimental_remote_download_outputs=toplevel
test:remote --experimental_remote_download_outputs=minimal

build:remote-clang --config=remote
build:remote-clang --config=rbe-toolchain-clang

# Docker sandbox
build:docker-sandbox --experimental_docker_image=envoyproxy/envoy-build:8246167b9d238797cbc6c03dccc9e3921c37617d
build:docker-sandbox --spawn_strategy=docker
build:docker-sandbox --strategy=Javac=docker
build:docker-sandbox --strategy=Closure=docker
build:docker-sandbox --strategy=Genrule=docker
build:docker-sandbox --define=EXECUTOR=remote
build:docker-sandbox --experimental_docker_verbose
build:docker-sandbox --experimental_enable_docker_sandbox

build:docker-clang --config=docker-sandbox
build:docker-clang --config=rbe-toolchain-clang

# CI configurations
build:remote-ci --remote_cache=grpcs://remotebuildexecution.googleapis.com
build:remote-ci --remote_executor=grpcs://remotebuildexecution.googleapis.com

# Fuzz builds
build:asan-fuzzer --config=asan
build:asan-fuzzer --define=FUZZING_ENGINE=libfuzzer
build:asan-fuzzer --copt=-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
build:asan-fuzzer --copt=-fsanitize-coverage=trace-pc-guard
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.28.1
Loading

0 comments on commit ad234fe

Please sign in to comment.