Skip to content

Commit

Permalink
Bazel: 6.5.0 -> 8.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kiron1 committed Dec 22, 2024
1 parent 62b230b commit 5974006
Show file tree
Hide file tree
Showing 10 changed files with 1,048 additions and 2,031 deletions.
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,6 @@ common:ci --show_timestamps

build:ci --disk_cache=~/.cache/bazel_build_cache
build:ci --repository_cache=~/.cache/bazel_repo_cache
build:ci --toolchain_resolution_debug=@@bazel_tools//tools/cpp:toolchain_type

try-import %workspace%/user.bazelrc
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.5.0
8.0.0
26 changes: 10 additions & 16 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,23 +112,26 @@ jobs:
bazel
test
--config=ci
--config=clippy
--config=format
--//:version=${{ needs.version.outputs.version }}
--//:rev=${{ needs.version.outputs.rev }}
${{ matrix.buildflags }}
"//..."
--
//...
shell: cmd
if: runner.os == 'Windows'
- name: Run tests
run: >
bazel
test
--config=ci
--config=clippy
--config=format
--//:version=${{ needs.version.outputs.version }}
--//:rev=${{ needs.version.outputs.rev }}
${{ matrix.buildflags }}
"//..."
--
//...
${{ runner.os != 'macOS' && '-//macos/... -//pkg/macos/... -//proxydetox:proxydetoxcli' || '' }}
if: runner.os != 'Windows'

bazel_build:
Expand Down Expand Up @@ -205,16 +208,7 @@ jobs:
- name: Install Linux dependency
run: sudo apt-get install libkrb5-dev
if: startswith(matrix.os, 'ubuntu')
- name: Build package
run: >
bazel build
--config=ci
--config=release
--//:version=${{ needs.version.outputs.version }}
--//:rev=${{ needs.version.outputs.rev }}
${{ matrix.buildflags }}
"//pkg"
- name: Copy package
- name: Make package
run: >
bazel
run
Expand Down Expand Up @@ -253,14 +247,14 @@ jobs:
# see https://github.com/rust-lang/rust-bindgen/issues/1797
- name: Install Windows dependency (LLVM)
uses: KyleMayes/[email protected]
if: startswith(runner.os, 'windows')
if: runner.os == 'Windows'
with:
version: "11.0"
directory: ${{ runner.temp }}/llvm
- name: Set LIBCLANG_PATH
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
shell: pwsh
if: startswith(runner.os, 'windows')
if: runner.os == 'Windows'
- name: Run cargo test
run: cargo test
- name: Build Release Package
Expand Down
104 changes: 79 additions & 25 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ members = [
"proxydetox",
"proxydetoxlib",
"spnego",
"tools",
]
default-members = [
"paceval",
Expand Down
28 changes: 12 additions & 16 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,27 @@ module(
version = "0.0.0",
)

bazel_dep(name = "bazel_skylib", version = "1.5.0")
# Apple
bazel_dep(name = "apple_support", version = "1.17.1", repo_name = "build_bazel_apple_support") # apple_support must come above rules_cc
bazel_dep(name = "rules_apple", version = "3.16.1", repo_name = "build_bazel_rules_apple")
bazel_dep(name = "rules_swift", version = "2.3.1", repo_name = "build_bazel_rules_swift")

bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "rules_cc", version = "0.1.0")
bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "rules_rust", version = "0.54.1")

# Apple
bazel_dep(name = "apple_support", version = "1.16.0", repo_name = "build_bazel_apple_support")
bazel_dep(name = "rules_apple", version = "3.6.0", repo_name = "build_bazel_rules_apple")
bazel_dep(name = "rules_swift", version = "2.1.1", repo_name = "build_bazel_rules_swift")
bazel_dep(name = "rules_rust", version = "0.56.0")

apple_cc_configure = use_extension(
"@build_bazel_apple_support//crosstool:setup.bzl",
"apple_cc_configure_extension",
)
use_repo(apple_cc_configure, "local_config_apple_cc", "local_config_apple_cc_toolchains")

# register_toolchains("@local_config_apple_cc_toolchains//:all")
register_toolchains("@local_config_apple_cc_toolchains//:all")

cc_configure = use_extension("@bazel_tools//tools/cpp:cc_configure.bzl", "cc_configure_extension")
use_repo(cc_configure, "local_config_cc_toolchains")
cc_configure = use_extension("@rules_cc//cc:extensions.bzl", "cc_configure_extension")
use_repo(cc_configure, "local_config_cc", "local_config_cc_toolchains")

register_toolchains("@local_config_cc_toolchains//:all")

Expand Down Expand Up @@ -54,12 +55,7 @@ crate.from_cargo(
"//proxydetox:Cargo.toml",
"//proxydetoxlib:Cargo.toml",
"//spnego:Cargo.toml",
"//tools:Cargo.toml",
],
)
use_repo(crate, "crate_index")
crate.from_cargo(
name = "crate_index_tools",
cargo_lockfile = "//tools:Cargo.lock",
manifests = ["//tools:Cargo.toml"],
)
use_repo(crate, "crate_index_tools")
Loading

0 comments on commit 5974006

Please sign in to comment.