Skip to content

Commit

Permalink
Bazel7 (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjreiniger authored May 7, 2024
1 parent 3a34351 commit cc330da
Show file tree
Hide file tree
Showing 9 changed files with 4,237 additions and 1,402 deletions.
3 changes: 3 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import .bazelrc-cc
import .bazelrc-java
import .bazelrc-buildbuddy

build --test_env=LD_LIBRARY_PATH=.
build --test_env=DYLD_LIBRARY_PATH=.

# Roborio
build:roborio --platforms=@rules_bzlmodrio_toolchains//platforms/roborio
build:roborio --build_tag_filters=-no-roborio
Expand Down
2 changes: 1 addition & 1 deletion .bazelrc-cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ build:windows_arm --copt=/wd5105
build:windows_arm --cxxopt=/wd4146
build:windows_arm --cxxopt=/wd4267
build:windows_arm --cxxopt=/wd4244
build:windows_arm --cpu=x64_arm64_windows
build:windows_arm --cpu=arm64_windows

# Linux
build:linux --copt=-Wall
Expand Down
5 changes: 4 additions & 1 deletion .bazelrc-java
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# build --javacopt=-Werror
build --javacopt=-Xlint:all,-processing

common --java_language_version=17
build --java_language_version=17
build --java_runtime_version=remotejdk_17
build --tool_java_language_version=11
build --tool_java_runtime_version=remotejdk_11
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.5.0
7.1.1
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
# Build standard, native
- { name: "windows - native", os: windows-2022, command: "build", config: "--config=windows", bazel_options: "", }
- { name: "ubuntu - native", os: ubuntu-22.04, command: "build", config: "--config=linux", bazel_options: "", }
- { name: "macos - native", os: macos-12, command: "build", config: "--config=macos", bazel_options: "", }
- { name: "macos - native", os: macos-14, command: "build", config: "--config=macos", bazel_options: "", }

# Build bzlmod, native
- { name: "windows - bzlmod native", os: windows-2022, command: "build", config: "--enable_bzlmod --config=windows", bazel_options: "", }
- { name: "ubuntu - bzlmod native", os: ubuntu-22.04, command: "build", config: "--enable_bzlmod --config=linux", bazel_options: "", }
- { name: "macos - bzlmod native", os: macos-12, command: "build", config: "--enable_bzlmod --config=macos", bazel_options: "", }
- { name: "macos - bzlmod native", os: macos-14, command: "build", config: "--enable_bzlmod --config=macos", bazel_options: "", }

name: "Build - ${{ matrix.name }}"
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
sudo sh -c "echo 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-14 main' >> /etc/apt/sources.list.d/proposed-repositories.list"
sudo apt-get update -q
sudo apt-get install -y clang-format-14
- run: bazel run @rules_wpiformat//wpiformat -- -f .
- run: bazel run --noenable_bzlmod @rules_wpiformat//wpiformat -- -f .
if: github.ref != 'refs/heads/main'

- name: Check Output
Expand Down
4 changes: 2 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ module(
compatibility_level = 1,
)

bazel_dep(name = "rules_java", version = "6.4.0")
bazel_dep(name = "rules_jvm_external", version = "5.3")
bazel_dep(name = "rules_java", version = "7.5.0")
bazel_dep(name = "rules_jvm_external", version = "6.1")
bazel_dep(name = "rules_proto", version = "5.3.0-21.7")

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
Expand Down
5,605 changes: 4,214 additions & 1,391 deletions MODULE.bazel.lock

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions dependencies/load_rule_dependencies.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ def load_spotless_rule_dependencies():
maybe(
http_archive,
name = "rules_jvm_external",
sha256 = "d31e369b854322ca5098ea12c69d7175ded971435e55c18dd9dd5f29cc5249ac",
strip_prefix = "rules_jvm_external-5.3",
url = "https://github.com/bazelbuild/rules_jvm_external/releases/download/5.3/rules_jvm_external-5.3.tar.gz",
sha256 = "08ea921df02ffe9924123b0686dc04fd0ff875710bfadb7ad42badb931b0fd50",
strip_prefix = "rules_jvm_external-6.1",
url = "https://github.com/bazelbuild/rules_jvm_external/releases/download/6.1/rules_jvm_external-6.1.tar.gz",
)
maybe(
http_archive,
name = "rules_java",
sha256 = "4da3761f6855ad916568e2bfe86213ba6d2637f56b8360538a7fb6125abf6518",
url = "https://github.com/bazelbuild/rules_java/releases/download/7.5.0/rules_java-7.5.0.tar.gz",
)

maybe(
Expand Down

0 comments on commit cc330da

Please sign in to comment.