-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "feat: Use gapic-generator-java jar in the client library gene…
- Loading branch information
Showing
11 changed files
with
554 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
name: ci | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
java: [ 8, 11 ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
distribution: temurin | ||
- run: java -version | ||
- run: bazelisk version | ||
- name: Bazel File Cache Setup | ||
id: cache-bazel | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/bazel | ||
key: ${{ runner.os }}-${{ hashFiles('WORKSPACE') }} | ||
restore-keys: ${{ runner.os }}- | ||
- name: Bazel Cache Not Found | ||
if: steps.cache-bazel.outputs.cache-hit != 'true' | ||
run: | | ||
echo "No cache found." | ||
- name: Bazel Cache Found | ||
if: steps.cache-bazel.outputs.cache-hit == 'true' | ||
run: | | ||
echo -n "Cache found. Cache size: " | ||
du -sh ~/.cache/bazel | ||
echo "If the cache seems broken, update the root WORKSPACE file with a trivial change." | ||
echo "The old one will disappear after 7 days." | ||
- name: Integration Tests | ||
run: bazelisk --batch test //test/integration/... | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: ${{ failure() }} | ||
with: | ||
name: test-artifacts | ||
path: ~/.cache/bazel/*/*/*/gapic_generator_java/bazel-out/*/testlogs/* | ||
retention-days: 5 | ||
|
||
generate-client-libraries: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
java: [ 8, 11 ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
distribution: temurin | ||
- run: java -version | ||
- run: bazelisk version | ||
- name: Bazel File Cache Setup | ||
id: cache-bazel | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/bazel | ||
key: ${{ runner.os }}-${{ hashFiles('WORKSPACE') }} | ||
restore-keys: ${{ runner.os }}- | ||
- name: Bazel Cache Not Found | ||
if: steps.cache-bazel.outputs.cache-hit != 'true' | ||
run: | | ||
echo "No cache found." | ||
- name: Bazel Cache Found | ||
if: steps.cache-bazel.outputs.cache-hit == 'true' | ||
run: | | ||
echo -n "Cache found. Cache size: " | ||
du -sh ~/.cache/bazel | ||
echo "If the cache seems broken, update the root WORKSPACE file with a trivial change." | ||
echo "The old cache will disappear after 7 days." | ||
- name: Gradle Build Generated Storage Client Library | ||
run: | | ||
echo "Building Storage lib from generated source..." | ||
mkdir /tmp/java-storage | ||
bazelisk --batch build @com_google_googleapis//google/storage/v2:google-cloud-storage-v2-java | ||
tar zxvf bazel-bin/external/com_google_googleapis/google/storage/v2/google-cloud-storage-v2-java.tar.gz -C /tmp/java-storage | ||
pushd /tmp/java-storage/google-cloud-storage-v2-java | ||
./gradlew clean build publishToMavenLocal sourcesJar allJars | ||
popd | ||
- name: Gradle Build Generated Compute Client Library | ||
run: | | ||
echo "Building Compute lib from generated source..." | ||
mkdir /tmp/java-compute | ||
bazelisk --batch build @com_google_googleapis//google/cloud/compute/v1small:google-cloud-compute-small-v1-java | ||
tar zxvf bazel-bin/external/com_google_googleapis/google/cloud/compute/v1small/google-cloud-compute-small-v1-java.tar.gz -C /tmp/java-compute | ||
pushd /tmp/java-compute/google-cloud-compute-small-v1-java | ||
./gradlew clean build publishToMavenLocal sourcesJar allJars | ||
popd | ||
license-header: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '^1.13.1' | ||
- name: License Header Check | ||
run: | | ||
go install github.com/google/addlicense@latest | ||
addlicense -c "Google LLC" -l apache -check $(find $PWD -type f -name '*.java' ! -path '**/showcase/**' ! -iname '*PlaceholderFile.java') | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,5 +14,3 @@ target/ | |
|
||
# Vscode Settings | ||
.vscode/settings.json | ||
|
||
*.iml |
Oops, something went wrong.