Skip to content

Commit

Permalink
ci: adding bazel-7-bzlmod test
Browse files Browse the repository at this point in the history
Closing the loop
  • Loading branch information
manuelnaranjo committed Jul 14, 2024
1 parent 713aaad commit cdaf0ae
Show file tree
Hide file tree
Showing 8 changed files with 489 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,18 @@ jobs:
repository-cache: true
bazelrc: import %workspace%/../../.github/workflows/ci.bazelrc
- run: cd e2e/bazel-7 && bazel build //...

build-e2e-bazel-7-bzlmod:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bazel-contrib/[email protected]
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: ${{ github.workflow }}
# Share repository cache between workflows.
repository-cache: true
bazelrc: import %workspace%/../../.github/workflows/ci.bazelrc
- run: cd e2e/bazel-7-bzlmod && bazel build //...
1 change: 1 addition & 0 deletions e2e/bazel-6-bzlmod/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ local_path_override(
)

bazel_dep(name = "rules_pkg", version = "0.10.1", dev_dependency = True)
bazel_dep(name = "bazel_skylib", version = "1.7.1")
16 changes: 16 additions & 0 deletions e2e/bazel-7-bzlmod/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Import Aspect bazelrc presets

import %workspace%/../../.aspect/bazelrc/bazel6.bazelrc
import %workspace%/../../.aspect/bazelrc/convenience.bazelrc
import %workspace%/../../.aspect/bazelrc/correctness.bazelrc
import %workspace%/../../.aspect/bazelrc/debug.bazelrc
import %workspace%/../../.aspect/bazelrc/performance.bazelrc

# Specific project flags go here if we have some
common --enable_bzlmod

# Load any settings & overrides specific to the current user from `.bazelrc.user`.
# This file should appear in `.gitignore` so that settings are not shared with team members. This
# should be last statement in this config so the user configuration is able to overwrite flags from
# this file. See https://bazel.build/configure/best-practices#bazelrc-file.
try-import %workspace%/.bazelrc.user
1 change: 1 addition & 0 deletions e2e/bazel-7-bzlmod/.bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.x
36 changes: 36 additions & 0 deletions e2e/bazel-7-bzlmod/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
load("@bazeldnf//bazeldnf:defs.bzl", "bazeldnf", "rpmtree", "tar2files")
load("@rules_pkg//pkg:tar.bzl", "pkg_tar")

bazeldnf(
name = "bazeldnf",
)

rpmtree(
name = "something",
rpms = [
"@libvirt-libs-6.1.0-2.fc32.x86_64.rpm//rpm",
"@libvirt-devel-6.1.0-2.fc32.x86_64.rpm//rpm",
],
)

tar2files(
name = "something_libs",
files = {
"/usr/lib64": [
"libvirt.so.0",
"libvirt.so.0.6001.0",
],
},
tar = ":something",
visibility = ["//visibility:public"],
)

pkg_tar(
name = "whatever",
deps = [":something"],
)

cc_library(
name = "bar",
srcs = ["//:something_libs/usr/lib64"],
)
14 changes: 14 additions & 0 deletions e2e/bazel-7-bzlmod/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"bazelndf test repo with bazel 7"

module(
name = "bazel-7-bzlmod",
)

bazel_dep(name = "bazeldnf", version = "0.0.0")
local_path_override(
module_name = "bazeldnf",
path = "../..",
)

bazel_dep(name = "rules_pkg", version = "0.10.1", dev_dependency = True)
bazel_dep(name = "bazel_skylib", version = "1.7.1")
402 changes: 402 additions & 0 deletions e2e/bazel-7-bzlmod/MODULE.bazel.lock

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions e2e/bazel-7-bzlmod/WORKSPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# dependencies for integration tests
load("@bazeldnf//:test_deps.bzl", "bazeldnf_test_dependencies")

bazeldnf_test_dependencies()

0 comments on commit cdaf0ae

Please sign in to comment.