Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion third_party/googleapis/.bazeliskrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# See https://github.com/bazelbuild/bazelisk
USE_BAZEL_VERSION=6.0.0
USE_BAZEL_VERSION=6.3.0
14 changes: 8 additions & 6 deletions third_party/googleapis/.github/workflows/diregapic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ on: # yamllint disable-line rule:truthy

jobs:
regenerate-compute:
if: github.repository == 'googleapis/googleapis'
runs-on: ubuntu-latest
container: gcr.io/gapic-images/googleapis:20230301
container: gcr.io/gapic-images/googleapis:20230531
steps:
- name: Checkout master
uses: actions/checkout@v3
Expand All @@ -20,18 +21,19 @@ jobs:
echo compute_revision=$(grep -oP '"revision":\s*"\d+"' google/cloud/compute/v1/compute.v1.json | grep -oP '\d+') >> $GITHUB_ENV
- name: Regenerate API definitions
run: |
bazel build //google/cloud/compute/v1:compute_gen
git config --global --add safe.directory /__w/googleapis/googleapis
bazelisk build //google/cloud/compute/v1:compute_gen
cp bazel-bin/google/cloud/compute/v1/compute_gen.proto google/cloud/compute/v1/compute.proto
bazel build //google/cloud/compute/v1:compute_grpc_service_config_gen
bazelisk build //google/cloud/compute/v1:compute_grpc_service_config_gen
cp bazel-bin/google/cloud/compute/v1/compute_grpc_service_config_gen.json google/cloud/compute/v1/compute_grpc_service_config.json
bazel build //google/cloud/compute/v1:compute_gapic_gen
bazelisk build //google/cloud/compute/v1:compute_gapic_gen
cp bazel-bin/google/cloud/compute/v1/compute_gapic_gen.yaml google/cloud/compute/v1/compute_gapic.yaml
echo api_changes=$(git diff-index --shortstat HEAD) >> $GITHUB_ENV
- name: Build GAPIC clients
if: contains(env.api_changes, 'file')
run: |
bazel build //google/cloud/compute/v1/...
bazel build //google/cloud/compute/v1/...
bazelisk build //google/cloud/compute/v1/...
bazelisk build //google/cloud/compute/v1/...
- name: Create PR
uses: googleapis/code-suggester@v2
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v1.8.0
uses: actions/setup-dotnet@v3
- name: Checkout googleapis (this repository)
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: googleapis
- name: Checkout index generator
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: googleapis/googleapis-api-index-generator
path: gen
Expand Down
12 changes: 10 additions & 2 deletions third_party/googleapis/.kokoro/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.10
FROM python:3.10.11-bullseye

RUN apt-get update

Expand All @@ -7,7 +7,10 @@ RUN apt-get install -y \
build-essential \
python-dev \
python3-dev \
openjdk-11-jdk
openjdk-11-jdk \
pkg-config \
openssl \
libcurl4-openssl-dev

RUN mkdir -p /tools
WORKDIR /tools
Expand All @@ -24,4 +27,9 @@ ENV BAZEL_BIN=/tools/bazelisk

RUN apt-get clean

# Ask Bazel to use C++14 by default.
# Note: Bazel will use this system-wide configuration file and will merge it
# with other bazelrc file it finds: https://bazel.build/run/bazelrc
RUN echo 'build --repo_env=BAZEL_CXXOPTS="-std=c++14"' > /etc/bazel.bazelrc

ENTRYPOINT [ "/bin/bash" ]
17 changes: 14 additions & 3 deletions third_party/googleapis/.kokoro/docker_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,28 @@
# PHP and Ruby runtimes binaries to use in GAPIC generators for these
# languages.
#
# Historically, PHP and Ruby keep their compiled runtimes in the generators'
# repositories:
# https://github.com/googleapis/gapic-generator-php/tree/main/rules_php_gapic/resources
# https://github.com/googleapis/gapic-generator-ruby/tree/main/rules_ruby_gapic/prebuilt
# They are needed to prevent rebuilding of PHP and Ruby runtime (each taking
# several minutes) every time the build is executed from a clean workspace.
#
# Sometimes these binaries need to be updated: they are dynamically linked,
# and may stop working if some dependency changes in an incompatible way.
# Use this script to update both the googleapis Docker image, and those
# binaries.
#
# Run from any local working directory where you have write access.
#
# Usage:
# $ mkdir workdir
# $ cd workdir
# $ sh /google/src/head/depot/google3/third_party/googleapis/stable/.kokoro/docker_update.sh
# $ sh /path/to/.kokoro/docker_update.sh
#
# After the script completes, it should print out commands to push the new
# Docker image and to create pull requests against Ruby and PHP generators.
# Whenever the image is published, tag it here:
# https://pantheon.corp.google.com/gcr/images/gapic-images/global/googleapis?project=gapic-images
# Whenever the image is published, tag it in Google Cloud Console,
# then release new versions of the generators and update the image tag in
# start.sh scripts in Kokoro folders in all googleapis workspaces.

Expand Down
2 changes: 1 addition & 1 deletion third_party/googleapis/.kokoro/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ docker container run \
--workdir ${KOKORO_ROOT} \
--ipc=host \
--entrypoint ${KOKORO_ARTIFACTS_DIR}/github/googleapis/.kokoro/build.sh \
gcr.io/gapic-images/googleapis:20230301
gcr.io/gapic-images/googleapis:20230531
21 changes: 17 additions & 4 deletions third_party/googleapis/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
alias(
name = "build_gen",
actual = "@rules_gapic//bazel:build_file_generator",
genrule(
name = "build_gen",
outs = ["build_gen.sh"],
executable = True,
srcs = glob(["run_build_gen.sh"]),
cmd = """
if test -z \"$(SRCS)\"; then
cat <<EOD > $@
#!/bin/sh
echo build_gen needs to be run internally, not on GitHub repository.
echo Please file an issue on GitHub if you have any questions:
echo https://github.com/googleapis/rules_gapic/issues/new
EOD
else
cp $(SRCS) $@
fi
""",
)

2 changes: 1 addition & 1 deletion third_party/googleapis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ bazel build //google/example/library/v1/...
To build the Java package for one library:

```
bazel build //google/example/library/v1:google-cloud-library-v1-java
bazel build //google/example/library/v1:google-cloud-example-library-v1-java
```

Bazel packages exist in all the libraries for Java, Go, Python, Ruby, Node.js, PHP and C#.
Expand Down
Loading