From 1cc51759d99ddb3c641b04013124806fa7f8158a Mon Sep 17 00:00:00 2001 From: Derek Bailey Date: Tue, 21 Jan 2025 17:01:15 -0800 Subject: [PATCH] Add bazel ci --- .bazelrc | 4 +++- .github/workflows/build.yml | 15 +++++++++++++++ MODULE.bazel | 4 ++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.bazelrc b/.bazelrc index 813fce99ff2..47509ad5fad 100644 --- a/.bazelrc +++ b/.bazelrc @@ -9,4 +9,6 @@ common --action_env=JAVA_HOME=../bazel_tools/jdk # Workaround "Error: need --enable_runfiles on Windows for to support rules_js" common:windows --enable_runfiles # Swift is not required on Windows -common:windows --deleted_packages=swift \ No newline at end of file +common:windows --deleted_packages=swift +# Ignore warnings in external dependencies +build --per_file_copt=external/.*@-Wno-everything --host_per_file_copt=external/.*@-Wno-everything \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 61a29dd9a72..47d36965b26 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -575,6 +575,21 @@ jobs: working-directory: tests/nim run: python3 testnim.py + bazel: + name: Bazel + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v3 + - name: bazel build + run: > + bazel build + //:flatc + //:flatbuffers + - name: bazel test + run: > + bazel test + //tests:flatbuffers_test + release-digests: if: startsWith(github.ref, 'refs/tags/') needs: [build-linux, build-windows, build-mac-intel, build-mac-universal] diff --git a/MODULE.bazel b/MODULE.bazel index bbb238a0065..d7be01e2120 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -48,6 +48,10 @@ bazel_dep( version = "1.18.0", repo_name = "build_bazel_rules_swift", ) +bazel_dep( + name = "bazel_skylib", + version = "1.7.1", +) npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") npm.npm_translate_lock(