diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 79cf4f0..508528b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -43,5 +43,10 @@ jobs: repository-cache: true - name: Run tests shell: bash - run: | - make check BAZEL=bazelisk + # Work around https://github.com/bazel-contrib/rules_go/issues/4154 and + # https://github.com/bazel-contrib/bazel-gazelle/issues/1393. See + # https://github.com/bazel-contrib/rules_go/issues/4154#issuecomment-2433739889. + run: >- + make check + BAZEL=bazelisk + BAZELFLAGS='--@rules_go//go/config:pure --define=gotags=purego' diff --git a/MODULE.bazel b/MODULE.bazel index 9ca5799..a8e93ec 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -19,6 +19,17 @@ bazel_dep(name = "gazelle", version = "0.41.0") go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps") go_deps.from_file(go_mod = "go.mod") + +# Work around https://github.com/bazel-contrib/rules_go/issues/4154 and +# https://github.com/bazel-contrib/bazel-gazelle/issues/1393. See +# https://github.com/bazel-contrib/rules_go/issues/4154#issuecomment-2433739889. +go_deps.gazelle_override( + directives = [ + "gazelle:build_tags purego", + "gazelle:exclude **/*_amd64*", + ], + path = "github.com/cloudflare/circl", +) use_repo( go_deps, "com_github_bazelbuild_buildtools",