Skip to content

Commit

Permalink
Improve compile times (#896)
Browse files Browse the repository at this point in the history
* Remove unnecessary proc macros

* Update maxmind

* Remove protoc dependency

This removes protobuf-src as a dependency and default feature in favor of committing the generated rust files instead. On my machine this took a clean release build from ~80s to ~60s. To me it feels like the builds are still far slower than they should be but this is a good easy win.

* Update generated

* Replace chrono with time

* Rename ServiceClient::connect -> connect_to_endpoint

If protobufs are generated without transport (and thus no ::connect method) the previous naming would cause infinite recursion rather than a compile time failure

* Readd copied protobufs

Apparently git didn't like me removing submodules and changing the contents of the folders at the same time

* Remove commented out code

* Oops

* Validate protobufs in CI

* Format

* Oops

* Cancel on push

* Sigh, double timeout

* Fix tarball extraction

* Double again

* Sigh

* Sigh x2

* Install protoc because ubuntu is the worst

* Sigh

Guess cloudbuild doesn't set this

* Unzip shenanigans

* uhm what

* ...

* just bump everything

* Remove comments

* Update proto-gen version

* Remove v prefix

* Ugh

* ...

* Ignore flaky test for now

* Fix agones
  • Loading branch information
Jake-Shadle authored Mar 1, 2024
1 parent d22a444 commit 1711b49
Show file tree
Hide file tree
Showing 162 changed files with 16,313 additions and 637 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# GitHub action that runs https://github.com/adRise/update-pr-branch on each push to
# `main`. `update-pr-branch` will pick the oldest PR (by creation date) that is approved
# with auto-merge enabled and update it to the latest `main`, forming a best-effort queue
# of approved PRs.

name: Validate protobufs

on:
push:
branches:
- "main"
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
validate:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- run: cargo run -p proto-gen -- validate
9 changes: 0 additions & 9 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
[submodule "proto/data-plane-api"]
path = proto/data-plane-api
url = https://github.com/envoyproxy/data-plane-api.git
[submodule "proto/udpa"]
path = proto/udpa
url = https://github.com/cncf/xds.git
[submodule "proto/protoc-gen-validate"]
path = proto/protoc-gen-validate
url = https://github.com/envoyproxy/protoc-gen-validate.git
[submodule "proto/googleapis"]
path = proto/googleapis
url = https://github.com/googleapis/googleapis.git
Loading

0 comments on commit 1711b49

Please sign in to comment.