Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into stat
Browse files Browse the repository at this point in the history
(Maybe fix unrelated test failures.)

Signed-off-by: Raven Black <ravenblack@dropbox.com>
  • Loading branch information
ravenblackx committed Dec 1, 2022
2 parents 5acaaf7 + d2f544f commit b582141
Show file tree
Hide file tree
Showing 417 changed files with 10,401 additions and 8,581 deletions.
73 changes: 71 additions & 2 deletions .azure-pipelines/pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,75 @@ variables:
value: $[or(eq(variables['isMain'], 'true'), eq(variables['isReleaseBranch'], 'true'))]

stages:
- stage: env
#
# Note to use the outputs created here - this `stage` must be set as a dependency in the relevant stage
# eg:
#
# stage: mystage
# dependsOn: ["env"]
#
# To use a variable as a condition for a `stage` you can specify it as follows:
#
# condition: ne(dependencies.env.outputs['repo.changed.mobileOnly'], 'true')
#
# To use a variable as a condition for a `job` you can specify it as follows:
#
# job:
# condition: ne(stageDependencies.env.repo.outputs['changed.mobileOnly'], 'true')
#
# Note the difference in name resolution when used in stages and jobs.
#
# NB: Avoid using _inclusive_ lists to trigger CI - eg _dont_ only trigger mobile CI if `mobile/` changed.
# Instead use _exclusive_ bools - eg _do_ suppress other CI if only `mobile/` changed
#
# To use a variable in a `step` you can specify it as follows:
#
# stage: my_next_stage
# jobs:
# job: another_job
# variables:
# mobileOnly: $[stageDependencies.env.repo.outputs['changed.mobileOnly']]
# steps:
# - bash: echo $(mobileOnly)
#

jobs:
- job: repo
pool:
vmImage: "ubuntu-20.04"
steps:
- bash: |
if [[ $(Build.Reason) == "PullRequest" ]]; then
CHANGE_TARGET="origin/$(System.PullRequest.TargetBranch)"
else
# This may not work so well on release branches where multiple commits are rebased to the branch
CHANGE_TARGET=$(git log --format="%H" -2 | tail -n1)
fi
echo "Comparing changes ${CHANGE_TARGET}...HEAD"
CHANGED_PATHS="$(git diff --name-only ${CHANGE_TARGET}...HEAD | cut -d/ -f1 | sort -u | jq -R 'split("\n")')"
CHANGED_PATH_COUNT=$(echo $CHANGED_PATHS | jq '. | length')
CHANGED_MOBILE_ONLY=false
CHANGED_DOCS_ONLY=false
CHANGED_MOBILE=$(echo $CHANGED_PATHS | jq '. as $A | "mobile" | IN($A[])')
if [[ $CHANGED_MOBILE == true && $CHANGED_PATH_COUNT -eq 1 ]]; then
CHANGED_MOBILE_ONLY=true
fi
CHANGED_DOCS=$(echo $CHANGED_PATHS | jq '. as $A | "docs" | IN($A[])')
if [[ $CHANGED_DOCS == true && $CHANGED_PATH_COUNT -eq 1 ]]; then
CHANGED_DOCS_ONLY=true
fi
echo "##vso[task.setvariable variable=mobileOnly;isoutput=true]${CHANGED_MOBILE_ONLY}"
echo "##vso[task.setvariable variable=docsOnly;isoutput=true]${CHANGED_DOCS_ONLY}"
displayName: "Detect repo changes"
workingDirectory: $(Build.SourcesDirectory)
name: changed
- stage: precheck
dependsOn: ["env"]
jobs:
- job: format
dependsOn: []
Expand Down Expand Up @@ -305,7 +373,8 @@ stages:
displayName: "Verify packages"

- stage: check
dependsOn: ["linux_x64"]
dependsOn: ["env", "linux_x64"]
condition: or(eq(variables['PostSubmit'], true), and(ne(dependencies.env.repo.outputs['changed.mobileOnly'], 'true'), ne(dependencies.env.repo.outputs['changed.docsOnly'], 'true')))
jobs:
- job: bazel
displayName: "linux_x64"
Expand Down Expand Up @@ -341,7 +410,7 @@ stages:
- job: coverage
displayName: "linux_x64"
dependsOn: []
timeoutInMinutes: 120
timeoutInMinutes: 180
pool: "x64-large"
strategy:
maxParallel: 2
Expand Down
3 changes: 3 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ build --action_env=PATH --host_action_env=PATH
build --enable_platform_specific_config
build --test_summary=terse

# TODO(keith): Remove once this is the default
build --incompatible_config_setting_private_default_visibility

# Allow tags to influence execution requirements
common --experimental_allow_tags_propagation

Expand Down
32 changes: 32 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: 2.1

executors:
ubuntu-build:
description: "A regular build executor based on ubuntu image"
docker:
- image: envoyproxy/envoy-build-ubuntu:0a02a76af5951bf7f4c7029c0ea6d29d96c0f682
# TODO(mattklein123): Get xlarge class enabled
resource_class: medium
working_directory: /source

jobs:
docs:
executor: ubuntu-build
steps:
- checkout
- run: mobile/docs/build.sh
- add_ssh_keys:
fingerprints:
- "33:78:4d:5c:bd:62:2e:43:9d:79:2c:3e:dc:45:c0:98"
- run: mobile/docs/publish.sh
- store_artifacts:
path: generated/docs

workflows:
version: 2
all:
jobs:
- docs:
filters:
tags:
only: /^v.*/
Loading

0 comments on commit b582141

Please sign in to comment.