Skip to content

Commit

Permalink
fix(ci): fix bzlmod issues and enable on ci (#658) (#659)
Browse files Browse the repository at this point in the history
  • Loading branch information
kormide authored Nov 15, 2023
1 parent d2d303a commit 7dbb96e
Show file tree
Hide file tree
Showing 34 changed files with 208 additions and 116 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ jobs:
--bazelrc=${{ github.workspace }}/.github/workflows/ci.bazelrc \
--bazelrc=${{ github.workspace }}/.aspect/bazelrc/bazel${BAZEL_VERSION::1}.bazelrc \
--bazelrc=.bazelrc \
test --config=${{ matrix.config }} //...
test --config=${{ matrix.config }} //... \
${{ steps.set_bzlmod_flag.outputs.bzlmod_flag }}
env:
# Bazelisk will download bazel to here
XDG_CACHE_HOME: ~/.cache/bazel-repo
Expand All @@ -208,8 +209,8 @@ jobs:
--bazelrc=${{ github.workspace }}/.github/workflows/ci.bazelrc `
--bazelrc=${{ github.workspace }}/.aspect/bazelrc/bazel$BAZEL_MAJOR_VERSION.bazelrc `
--bazelrc=.bazelrc `
${{ steps.set_bzlmod_flag.outputs.bzlmod_flag }} `
test --config=${{ matrix.config }} //...
test --config=${{ matrix.config }} //... `
${{ steps.set_bzlmod_flag.outputs.bzlmod_flag }}
env:
# Bazelisk will download bazel to here
XDG_CACHE_HOME: ~/.cache/bazel-repo
Expand All @@ -218,7 +219,7 @@ jobs:
# Don't run integration tests on Windows since they are bash scripts and Windows runs Powershell
if: ${{ matrix.folder == '.' && matrix.os != 'windows-latest' }}
# Find all shell scripts within e2e, echo the filename, execute, fail on error
run: find e2e/*.sh -maxdepth 1 -type f -exec sh -c 'echo "\n\n------------------------------- $0 -------------------------------" && "$0" || kill $PPID' \{\} \;
run: find e2e/*.sh -maxdepth 1 -type f -exec sh -c 'echo "\n\n------------------------------- $0 -------------------------------" && BZLMOD_FLAG=${{ steps.set_bzlmod_flag.outputs.bzlmod_flag }} "$0" || kill $PPID' \{\} \;

- name: verify bcr patches
if: matrix.bzlmodEnabled && matrix.os == 'ubuntu-latest'
Expand Down
12 changes: 9 additions & 3 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ load("//lib:yq.bzl", "yq")

gazelle_binary(
name = "gazelle_bin",
languages = DEFAULT_LANGUAGES + [
"@bazel_skylib_gazelle_plugin//bzl",
],
languages = select({
# TODO: under bzlmod we get go linking errors when adding
# the skylib gazelle plugin.
# https://github.com/bazelbuild/rules_go/issues/1877
"@aspect_bazel_lib//lib:bzlmod": DEFAULT_LANGUAGES,
"//conditions:default": DEFAULT_LANGUAGES + [
"@bazel_skylib_gazelle_plugin//bzl",
],
}),
)

gazelle(
Expand Down
4 changes: 4 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ load(":internal_deps.bzl", "bazel_lib_internal_deps")
# Fetch deps needed only locally for development
bazel_lib_internal_deps()

load("@io_bazel_stardoc//:setup.bzl", "stardoc_repositories")

stardoc_repositories()

load("//lib:repositories.bzl", "aspect_bazel_lib_dependencies")

aspect_bazel_lib_dependencies(override_local_config_platform = True)
Expand Down
2 changes: 1 addition & 1 deletion docs/copy_to_bin.md

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

28 changes: 14 additions & 14 deletions docs/copy_to_directory.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/directory_path.md

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

4 changes: 2 additions & 2 deletions docs/expand_make_vars.md

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

16 changes: 8 additions & 8 deletions docs/expand_template.md

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

4 changes: 2 additions & 2 deletions docs/host_repo.md

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

6 changes: 3 additions & 3 deletions docs/jq.md

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

6 changes: 3 additions & 3 deletions docs/output_files.md

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

44 changes: 22 additions & 22 deletions docs/paths.md

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

6 changes: 3 additions & 3 deletions docs/repo_utils.md

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

Loading

0 comments on commit 7dbb96e

Please sign in to comment.