Skip to content

Commit

Permalink
ci(gha): move aiplatform to its own shard (#14754)
Browse files Browse the repository at this point in the history
  • Loading branch information
scotthart authored Oct 3, 2024
1 parent b9d7e39 commit a695357
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 8 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/macos-bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
- Spanner
- Storage
- Compute
- AIPlatform
- Shard1
- Shard2
- Other
Expand Down Expand Up @@ -65,6 +66,9 @@ jobs:
- shard: Compute
targets:
- //google/cloud/compute/...
- shard: AIPlatform
targets:
- //google/cloud/aiplatform/...
- shard: Shard1
targets:
# Run this:
Expand All @@ -87,7 +91,6 @@ jobs:
- +//google/cloud/sql/...
- +//google/cloud/dialogflow_cx/...
- +//google/cloud/dialogflow_es/...
- +//google/cloud/aiplatform/...
- shard: Shard2
targets:
- //google/cloud/networkconnectivity/...
Expand Down Expand Up @@ -142,6 +145,8 @@ jobs:
- -//google/cloud/storage/...
# From Compute
- -//google/cloud/compute/...
# From AIPlatform
- -//google/cloud/aiplatform/...
# From Shard1
- -//google/cloud/appengine/...
- -//google/cloud/dataproc/...
Expand All @@ -151,7 +156,6 @@ jobs:
- -//google/cloud/sql/...
- -//google/cloud/dialogflow_cx/...
- -//google/cloud/dialogflow_es/...
- -//google/cloud/aiplatform/...
# From Shard2
- -//google/cloud/networkconnectivity/...
- -//google/cloud/networkservices/...
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/macos-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ jobs:
matrix:
exclude-from-full-trick: [ true ]
os: [ macos-14 ]
shard: [ Core1, Core2, Compute, Shard1, Shard2, Shard3, Shard4, Shard5, Other ]
shard: [ Core1, Core2, Compute, AIPlatform, Shard1, Shard2, Shard3, Shard4, Shard5, Other ]
exclude:
# Only full builds include shards with generated code.
- exclude-from-full-trick: ${{ ! inputs.full-matrix }}
shard: Compute
- exclude-from-full-trick: ${{ ! inputs.full-matrix }}
shard: AIPlatform
- exclude-from-full-trick: ${{ ! inputs.full-matrix }}
shard: Shard1
- exclude-from-full-trick: ${{ ! inputs.full-matrix }}
Expand Down Expand Up @@ -80,6 +82,7 @@ jobs:
pubsub
pubsublite
storage
storage_grpc
)
# These are the libraries with the most "clients". To build the list
# run something like this and find the midpoint:
Expand All @@ -94,7 +97,6 @@ jobs:
monitoring
retail
discoveryengine
aiplatform
)
shard2_features=(
servicecontrol
Expand Down Expand Up @@ -210,6 +212,8 @@ jobs:
echo "features=${features:1}" >> "${GITHUB_OUTPUT}"
elif [[ "${{matrix.shard}}" == "Compute" ]]; then
echo "features=compute" >> "${GITHUB_OUTPUT}"
elif [[ "${{matrix.shard}}" == "AIPlatform" ]]; then
echo "features=aiplatform" >> "${GITHUB_OUTPUT}"
elif [[ "${{ matrix.shard }}" == "Shard1" ]]; then
features="$(printf ",%s" "${shard1_features[@]}")"
echo "features=${features:1}" >> "${GITHUB_OUTPUT}"
Expand All @@ -229,6 +233,7 @@ jobs:
skipped_features=("${core1_features[@]}")
skipped_features+=("${core2_features[@]}")
skipped_features+=(compute)
skipped_features+=(aiplatform)
skipped_features+=("${shard1_features[@]}")
skipped_features+=("${shard2_features[@]}")
skipped_features+=("${shard3_features[@]}")
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/windows-bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
# - dbg creates very large debugging files and GHA has limited storage.
# - fastbuild also takes too much storage.
compilation_mode: [ opt ]
shard: [ Core, Compute, Other ]
shard: [ Core, Compute, AIPlatform, Other ]
include:
- shard: Core
targets:
Expand All @@ -49,6 +49,9 @@ jobs:
- shard: Compute
targets:
- //google/cloud/compute/...
- shard: AIPlatform
targets:
- //google/cloud/aiplatform/...
- shard: Other
targets:
- //...
Expand All @@ -65,6 +68,8 @@ jobs:
- -//google/cloud/storage/...
# From Compute
- -//google/cloud/compute/...
# From AIPlatform
- -//google/cloud/aiplatform/...
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -81,6 +86,9 @@ jobs:
# Note that in other runners the publisher is GitHub. If we trust GitHub
# to run the VM, we should trust their runners.
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # @v1.13.0
- name: Pre Build Disk Space
shell: bash
run: df -m
- name: Build google-cloud-cpp
shell: bash
run: |
Expand All @@ -93,6 +101,9 @@ jobs:
export BAZEL_REMOTE_CACHE_RW_MODE=${{ inputs.bazel-cache-mode }}
export EXECUTE_INTEGRATION_TESTS=${{ inputs.execute-integration-tests }}
ci/gha/builds/windows-bazel.sh ${{ matrix.compilation_mode }} ${{ join(matrix.targets, ' ') }}
- name: Post Build Disk Space
shell: bash
run: df -m
env:
BAZEL_REMOTE_CACHE: https://storage.googleapis.com/cloud-cpp-community-gha-cache/bazel-cache/${{ matrix.msvc }}/${{ matrix.compilation_mode }}
GHA_TEST_BUCKET: "gcs-grpc-team-cloud-cpp-testing-bucket"
21 changes: 18 additions & 3 deletions .github/workflows/windows-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ jobs:
msvc: [ msvc-2022 ]
build_type: [ Debug, Release ]
arch: [ x64, x86 ]
shard: [Core1, Core2, Compute, Shard1, Shard2, Shard3, Other]
shard: [Core1, Core2, Core3, Compute, AIPlatform, Shard1, Shard2, Shard3, Other]
exclude:
# Also skip shards (Compute and Other) that contain only generated code.
- exclude-from-full-trick: ${{ ! inputs.full-matrix }}
shard: Compute
- exclude-from-full-trick: ${{ ! inputs.full-matrix }}
shard: AIPlatform
- exclude-from-full-trick: ${{ ! inputs.full-matrix }}
shard: Shard1
- exclude-from-full-trick: ${{ ! inputs.full-matrix }}
Expand Down Expand Up @@ -80,7 +82,8 @@ jobs:
run: |
echo "vcpkg-version=$(cat ci/etc/vcpkg-version.txt)" >> "${GITHUB_OUTPUT}"
core1_features=(bigtable pubsub pubsublite)
core2_features=(spanner storage)
core2_features=(spanner)
core3_features=(storage storage_grpc)
# These are the libraries with the most "clients". To build the list
# run something like this and create shards:
#
Expand All @@ -98,7 +101,6 @@ jobs:
sql
dialogflow_cx
dialogflow_es
aiplatform
)
shard2_features=(
beyondcorp
Expand Down Expand Up @@ -174,8 +176,13 @@ jobs:
elif [[ "${{ matrix.shard }}" == "Core2" ]]; then
features="$(printf ",%s" "${core2_features[@]}")"
echo "features=${features:1}" >> "${GITHUB_OUTPUT}"
elif [[ "${{ matrix.shard }}" == "Core3" ]]; then
features="$(printf ",%s" "${core3_features[@]}")"
echo "features=${features:1}" >> "${GITHUB_OUTPUT}"
elif [[ "${{matrix.shard}}" == "Compute" ]]; then
echo "features=compute" >> "${GITHUB_OUTPUT}"
elif [[ "${{matrix.shard}}" == "AIPlatform" ]]; then
echo "features=aiplatform" >> "${GITHUB_OUTPUT}"
elif [[ "${{matrix.shard}}" == "Shard1" ]]; then
features="$(printf ",%s" "${shard1_features[@]}")"
echo "features=${features:1}" >> "${GITHUB_OUTPUT}"
Expand All @@ -188,7 +195,9 @@ jobs:
else
skipped_features=("${core1_features[@]}")
skipped_features+=("${core2_features[@]}")
skipped_features+=("${core3_features[@]}")
skipped_features+=(compute)
skipped_features+=(aiplatform)
skipped_features+=("${shard1_features[@]}")
skipped_features+=("${shard2_features[@]}")
skipped_features+=("${shard3_features[@]}")
Expand All @@ -199,6 +208,9 @@ jobs:
skipped="$(printf ",-%s" "${skipped_features[@]}")"
echo "features=__ga_libraries__,__experimental_libraries__,${skipped:1}" >> "${GITHUB_OUTPUT}"
fi
- name: Pre Build Disk Space
shell: bash
run: df -m
- name: Download and Install CMake
shell: bash
run: |
Expand Down Expand Up @@ -241,6 +253,9 @@ jobs:
export CMAKE_OUT='c:\b'
export EXECUTE_INTEGRATION_TESTS=${{ inputs.execute-integration-tests }}
ci/gha/builds/windows-cmake.sh ${{ matrix.build_type }} ${{ steps.dynamic.outputs.features }}
- name: Post Build Disk Space
shell: bash
run: df -m
env:
SCCACHE_GCS_BUCKET: cloud-cpp-community-gha-cache
SCCACHE_GCS_KEY_PREFIX: sccache/${{ matrix.msvc }}/${{ matrix.arch}}/${{ matrix.build_type }}
Expand Down

0 comments on commit a695357

Please sign in to comment.