Skip to content

Commit 80bf993

Browse files
committed
ci: Fix ci issue
1 parent 24e9bef commit 80bf993

File tree

2 files changed

+41
-5
lines changed

2 files changed

+41
-5
lines changed

.github/workflows/downstream_protobuf_compatibility_check_nightly.yaml

+4-5
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ jobs:
5555
echo "Testing with Protobuf-Java v${{ matrix.protobuf-runtime-version }}"
5656
- name: Perform downstream protoc compatibility testing
5757
run: REPOS_UNDER_TEST="${{ matrix.repo }}" PROTOC_VERSION="${{ matrix.protoc-version }}" PROTOBUF_RUNTIME_VERSION="${{ matrix.protobuf-runtime-version }}" ./.kokoro/nightly/downstream-protoc-compatibility.sh
58-
- name: Perform downstream source compatibility testing
59-
run: REPOS_UNDER_TEST="${{ matrix.repo }}" PROTOBUF_RUNTIME_VERSION="${{ matrix.protobuf-runtime-version }}" ./.kokoro/nightly/downstream-protobuf-source-compatibility.sh
60-
- name: Perform downstream binary compatibility testing
61-
run: REPOS_UNDER_TEST="${{ matrix.repo }}" PROTOBUF_RUNTIME_VERSION="${{ matrix.protobuf-runtime-version }}" ./.kokoro/nightly/downstream-protobuf-binary-compatibility.sh
62-
58+
# - name: Perform downstream source compatibility testing
59+
# run: REPOS_UNDER_TEST="${{ matrix.repo }}" PROTOBUF_RUNTIME_VERSION="${{ matrix.protobuf-runtime-version }}" ./.kokoro/nightly/downstream-protobuf-source-compatibility.sh
60+
# - name: Perform downstream binary compatibility testing
61+
# run: REPOS_UNDER_TEST="${{ matrix.repo }}" PROTOBUF_RUNTIME_VERSION="${{ matrix.protobuf-runtime-version }}" ./.kokoro/nightly/downstream-protobuf-binary-compatibility.sh

.kokoro/nightly/downstream-protoc-compatibility.sh

+37
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ LOCAL_GENERATOR_VERSION=$(mvn \
5656

5757
git clone https://github.com/googleapis/googleapis.git
5858

59+
git clone https://github.com/lqiu96/cloud-opensource-java.git
60+
pushd cloud-opensource-java
61+
git checkout source-filter
62+
mvn -B -ntp clean compile
63+
pushd dependencies
64+
5965
for repo in ${REPOS_UNDER_TEST//,/ }; do # Split on comma
6066
if [[ "$repo" == "google-cloud-java" ]]; then
6167
continue
@@ -78,5 +84,36 @@ for repo in ${REPOS_UNDER_TEST//,/ }; do # Split on comma
7884
--generation-config-path=/workspace/generation_config.yaml \
7985
--repository-path=/workspace \
8086
--api-definitions-path=/workspace/apis
87+
88+
# Compile the Handwritten Library with the Protobuf-Java version to test source compatibility
89+
mvn clean compile -B -V -ntp \
90+
-Dclirr.skip=true \
91+
-Denforcer.skip=true \
92+
-Dmaven.javadoc.skip=true \
93+
-Dprotobuf.version=${PROTOBUF_RUNTIME_VERSION} \
94+
-T 1C
95+
96+
mvn -B -ntp install -T 1C -DskipTests -Dclirr.skip
97+
98+
# Match all artifacts that start with google-cloud (rules out proto and grpc modules)
99+
# Exclude any matches to BOM artifacts or emulators
100+
ARTIFACT_LIST=$(cat "versions.txt" | grep "^google-cloud" | grep -vE "(bom|emulator)" | tr '\n' ',')
101+
ARTIFACT_LIST=${ARTIFACT_LIST%,}
102+
103+
echo "Found artifacts ${ARTIFACT_LIST}"
104+
popd
105+
106+
for artifact in ${ARTIFACT_LIST//,/ }; do
107+
artifact_id=$(echo "${artifact}" | tr ':' '\n' | head -n 1)
108+
version=$(echo "${artifact}" | tr ':' '\n' | tail -n 1)
109+
110+
maven_coordinates="com.google.cloud:${artifact_id}:${version}"
111+
echo "Using ${maven_coordinates}"
112+
113+
# The `-s` argument filters the linkage check problems that stem from the artifact
114+
program_args="-r --artifacts ${maven_coordinates},com.google.protobuf:protobuf-java:${PROTOBUF_RUNTIME_VERSION} -s ${maven_coordinates}"
115+
echo "Linkage Checker Program Arguments: ${program_args}"
116+
mvn -B -ntp exec:java -Dexec.mainClass="com.google.cloud.tools.opensource.classpath.LinkageCheckerMain" -Dexec.args="${program_args}"
117+
done
81118
popd
82119
done

0 commit comments

Comments
 (0)