Skip to content

Commit

Permalink
chore: Fix CI issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lqiu96 committed Nov 25, 2024
1 parent e53c973 commit c7cd80a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/downstream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ jobs:
run: |
sudo apt-get update
sudo apt-get -y install libxml2-utils
- name: Test helper scripts
run: ./.kokoro/presubmit/common_test.sh
- name: Perform downstream compatibility testing
run: REPOS_UNDER_TEST="${{ matrix.repo }}" PROTOBUF_RUNTIME_VERSION="${{ matrix.protobuf-version}}" ./.kokoro/presubmit/downstream-protobuf-source-compatibility.sh
# downstream-compatibility-spring-generator:
Expand Down
17 changes: 3 additions & 14 deletions .kokoro/presubmit/downstream-protobuf-source-compatibility.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,32 +35,21 @@ source "$scriptDir/common.sh"

setup_maven_mirror

# Update Protobuf-Java runtime version in Shared-Dependencies
pushd gapic-generator-java-pom-parent
sed -i "/<protobuf.version>.*<\/protobuf.version>/s/\(.*<protobuf.version>\).*\(<\/protobuf.version>\)/\1${PROTOBUF_RUNTIME_VERSION}\2/" pom.xml
echo "Protobuf version has been updated to $(cat pom.xml | grep "protobuf.version")"
popd

# Install Shared-Deps with the Protobuf-Java version
install_repo_modules '!gapic-generator-java'
SHARED_DEPS_VERSION=$(parse_pom_version java-shared-dependencies)
echo "Install complete. java-shared-dependencies = $SHARED_DEPS_VERSION"
echo "Testing with Protobuf-Java v${PROTOBUF_RUNTIME_VERSION}"

for repo in ${REPOS_UNDER_TEST//,/ }; do # Split on comma
# Perform source-compatibility testing on main (latest changes)
git clone "https://github.com/googleapis/$repo.git" --depth=1

# Update the Handwritten Library to use the new Shared-Dependencies (new Protobuf-Java version)
update_all_poms_dependency "$repo" google-cloud-shared-dependencies "$SHARED_DEPS_VERSION"

pushd "$repo"

# Compile the Handwritten Library with the Protobuf-Java version to test source compatibility
mvn clean compile -B -V -ntp \
-DskipTests=true \
-Dclirr.skip=true \
-Denforcer.skip=true \
-Dmaven.javadoc.skip=true \
-Dgcloud.download.skip=true \
-Dprotobuf.version=${PROTOBUF_RUNTIME_VERSION} \
-T 1C
popd
done

0 comments on commit c7cd80a

Please sign in to comment.