Skip to content

Commit

Permalink
Merge branch 'main' into cargo_bazel_bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
matts1 authored Aug 2, 2023
2 parents f4804b4 + 2107720 commit c707868
Show file tree
Hide file tree
Showing 1,726 changed files with 92,018 additions and 36,399 deletions.
24 changes: 20 additions & 4 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ aspects_flags: &aspects_flags
- "--config=rustfmt"
- "--config=clippy"
min_rust_version_shell_commands: &min_rust_version_shell_commands
- sed -i 's|^rust_register_toolchains(|rust_register_toolchains(versions = ["1.59.0"],\n|' WORKSPACE.bazel
- sed -i 's|^rust_register_toolchains(|rust_register_toolchains(versions = ["1.62.0"],\n|' WORKSPACE.bazel
nightly_flags: &nightly_flags
- "--//rust/toolchain/channel=nightly"
nightly_aspects_flags: &nightly_aspects_flags
Expand Down Expand Up @@ -42,6 +42,10 @@ coverage_validation_post_shell_commands: &coverage_validation_post_shell_command
; 1>&2 cat bazel-out/_coverage/_coverage_report.dat \
; exit 1 \
; }
split_coverage_postprocessing_shell_commands: &split_coverage_postprocessing_shell_commands
- echo "coverage --experimental_fetch_all_coverage_outputs" >> user.bazelrc
- echo "coverage --experimental_split_coverage_postprocessing" >> user.bazelrc
- echo "build --//rust/settings:experimental_use_coverage_metadata_files" >> user.bazelrc
tasks:
ubuntu2004:
build_targets: *default_linux_targets
Expand Down Expand Up @@ -69,6 +73,18 @@ tasks:
windows:
build_targets: *default_windows_targets
test_targets: *default_windows_targets
ubuntu2004_split_coverage_postprocessing:
name: Split Coverage Postprocessing
platform: ubuntu2004
shell_commands: *split_coverage_postprocessing_shell_commands
coverage_targets: *default_linux_targets
post_shell_commands: *coverage_validation_post_shell_commands
macos_split_coverage_postprocessing:
name: Split Coverage Postprocessing
platform: macos
shell_commands: *split_coverage_postprocessing_shell_commands
coverage_targets: *default_macos_targets
post_shell_commands: *coverage_validation_post_shell_commands
ubuntu2004_opt:
name: Opt Mode
platform: ubuntu2004
Expand Down Expand Up @@ -205,15 +221,15 @@ tasks:
ubuntu1804:
name: "Min Bazel Version"
# If updating the minimum bazel version, please also update /docs/index.md
bazel: "5.2.0"
bazel: "6.0.0"
platform: ubuntu1804
build_targets: *default_linux_targets
test_targets: *default_linux_targets
coverage_targets: *default_linux_targets
post_shell_commands: *coverage_validation_post_shell_commands
ubuntu1804_with_aspects:
name: "Min Bazel Version With Aspects"
bazel: "5.2.0"
bazel: "6.0.0"
platform: ubuntu1804
build_targets: *default_linux_targets
test_targets: *default_linux_targets
Expand Down Expand Up @@ -580,7 +596,7 @@ tasks:
- "--apple_platform_type=ios"
test_targets:
- "//..."
# TODO: https://github.com/bazelbuild/rules_rust/issues/1892
# TODO: https://github.com/bazelbuild/rules_rust/issues/2075
# zig_cross_compiling:
# name: Zig cross compiling test
# platform: ubuntu2004
Expand Down
4 changes: 4 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ build:windows --enable_runfiles
# https://bazel.build/reference/command-line-reference#flag--combined_report
coverage --combined_report=lcov

# Avoid fully cached builds reporting no coverage and failing CI
# https://bazel.build/reference/command-line-reference#flag--experimental_fetch_all_coverage_outputs
coverage --experimental_fetch_all_coverage_outputs

###############################################################################
## Unique configuration groups
###############################################################################
Expand Down
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
BasedOnStyle: Google
IndentWidth: 4
...
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ examples/crate_universe_unnamed/vendor_remote_manifests/crates/** linguist-gener
examples/crate_universe_unnamed/vendor_remote_pkgs/crates/** linguist-generated
examples/sys/basic/3rdparty/crates/** linguist-generated
examples/sys/complex/3rdparty/crates/** linguist-generated
proto/3rdparty/crates/** linguist-generated
proto/prost/private/3rdparty/crates/** linguist-generated
proto/protobuf/3rdparty/crates/** linguist-generated
tools/rust_analyzer/3rdparty/crates/** linguist-generated
util/import/3rdparty/crates/** linguist-generated
wasm_bindgen/3rdparty/crates/** linguist-generated
21 changes: 21 additions & 0 deletions .github/workflows/formatting.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Formatting

on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize

jobs:
clang-format-checking:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: DoozyX/[email protected]
with:
source: '.'
extensions: 'h,c,cc,proto'
clangFormatVersion: 14
25 changes: 21 additions & 4 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,26 @@ load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencie

crate_universe_dependencies(bootstrap = True)

load("@rules_rust//proto:repositories.bzl", "rust_proto_repositories")
# buildifier: disable=bzl-visibility
load("@rules_rust//proto/prost/private:repositories.bzl", "rust_prost_dependencies", "rust_prost_register_toolchains")

rust_proto_repositories()
rust_prost_dependencies()

load("@rules_rust//proto:transitive_repositories.bzl", "rust_proto_transitive_repositories")
rust_prost_register_toolchains()

rust_proto_transitive_repositories()
load("@rules_rust//proto/prost:transitive_repositories.bzl", "rust_prost_transitive_repositories")

rust_prost_transitive_repositories()

load("@rules_rust//proto/protobuf:repositories.bzl", "rust_proto_protobuf_dependencies", "rust_proto_protobuf_register_toolchains")

rust_proto_protobuf_dependencies()

rust_proto_protobuf_register_toolchains()

load("@rules_rust//proto/protobuf:transitive_repositories.bzl", "rust_proto_protobuf_transitive_repositories")

rust_proto_protobuf_transitive_repositories()

load("@rules_rust//bindgen:repositories.bzl", "rust_bindgen_dependencies", "rust_bindgen_register_toolchains")

Expand Down Expand Up @@ -48,6 +61,10 @@ load("//test:deps.bzl", "rules_rust_test_deps")

rules_rust_test_deps()

load("//test:deps_transitive.bzl", "rules_rust_test_deps_transitive")

rules_rust_test_deps_transitive()

# --- end stardoc

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
Expand Down
35 changes: 35 additions & 0 deletions bindgen/3rdparty/crates/BUILD.aho-corasick-1.0.2.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions bindgen/3rdparty/crates/BUILD.annotate-snippets-0.9.1.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions bindgen/3rdparty/crates/BUILD.anstream-0.3.2.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions bindgen/3rdparty/crates/BUILD.anstyle-1.0.0.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions bindgen/3rdparty/crates/BUILD.anstyle-parse-0.2.0.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c707868

Please sign in to comment.