From bde91e5bbbcd14893503483650428b23d1fc46b8 Mon Sep 17 00:00:00 2001 From: lizhimins <707364882@qq.com> Date: Tue, 14 Oct 2025 15:49:17 +0800 Subject: [PATCH] fix bazel Change-Id: I10bdd484933da40c7af016f239f446d5c0a3a591 --- .bazelrc | 5 ++++- .github/workflows/main.yml | 8 ++++---- deps.bzl | 9 +++++---- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.bazelrc b/.bazelrc index 21901dc..3c06b64 100644 --- a/.bazelrc +++ b/.bazelrc @@ -24,4 +24,7 @@ build --action_env=CC build --action_env=CXX build --action_env=LD_LIBRARY_PATH build --action_env=LLVM_CONFIG -build --action_env=PATH \ No newline at end of file +build --action_env=PATH + +build --cxxopt='-std=c++17' +build:host --cxxopt='-std=c++17' \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index feb9f2d..6673c8e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,13 +24,13 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 - + - name: Setup Bazel run: | sudo apt-get -qq install npm sudo npm install -g @bazel/bazelisk - - name: Use Bazel + - name: Bazel Help if: matrix.os != 'windows' run: bazel -h - - name: Compile All Targets - run: bazel build //... + - name: Build with Bazel + run: bazel build //... -s \ No newline at end of file diff --git a/deps.bzl b/deps.bzl index 0345afa..37e0520 100644 --- a/deps.bzl +++ b/deps.bzl @@ -38,8 +38,9 @@ def github_archive(name, org, repo, ref, sha256): name = name, strip_prefix = repo + "-" + stripRef, urls = [ - "https://mirror.bazel.build/github.com/%s/%s/archive/%s.tar.gz" % (org, repo, ref), - "https://github.com/%s/%s/archive/%s.tar.gz" % (org, repo, ref), + # "https://mirror.bazel.build/github.com/%s/%s/archive/%s.tar.gz" % (org, repo, ref), + # "https://github.com/%s/%s/archive/%s.tar.gz" % (org, repo, ref), + "https://github.com/%s/%s/archive/refs/tags/%s.tar.gz" % (org, repo, ref) ], sha256 = sha256, ) @@ -48,6 +49,6 @@ def io_grpc_grpc_java(**kwargs): """grpc java plugin and jars """ name = "io_grpc_grpc_java" - ref = get_ref(name, "8eff2630828a7ec6f4980b5b46f30f875070a4e4", kwargs) # v1.19.0 and changes up to PR #5456 - sha256 = get_sha256(name, "f0e17fb16a404ba473429144481221e2c970c65596f65129002af3c73dcfe141", kwargs) + ref = get_ref(name, "v1.45.0", kwargs) # v1.19.0 and changes up to PR #5456 + sha256 = get_sha256(name, "83a3e094be70978cd843778a3214268714e077343fd9a5baacad31dd420304c3", kwargs) github_archive(name, "grpc", "grpc-java", ref, sha256) \ No newline at end of file