diff --git a/.bazelversion b/.bazelversion index 18bb4182..5210382a 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -7.5.0 +8.0.1 \ No newline at end of file diff --git a/.github/workflows/build-tests.yaml b/.github/workflows/build-tests.yaml index b9b69c17..b8bd4a28 100644 --- a/.github/workflows/build-tests.yaml +++ b/.github/workflows/build-tests.yaml @@ -65,6 +65,26 @@ jobs: - run: echo "USE_BAZEL_VERSION=$(cat .bazelversion)" >> $env:GITHUB_ENV if: ${{ startsWith(matrix.cases.os, 'windows') }} + # out of @examples repo build requires WORKSPACE-based external dependency system + - run: bazelisk build --jobs=1 @rules_cuda_examples//basic:all + - run: bazelisk build --jobs=1 @rules_cuda_examples//rdc:all + - run: bazelisk build --jobs=1 @rules_cuda_examples//if_cuda:main + - run: bazelisk build --jobs=1 @rules_cuda_examples//if_cuda:main --enable_cuda=False + # in @examples repo build, bzlmod is enabled by default since Bazel 7 + - run: cd examples && bazelisk build --jobs=1 //basic:all + - run: cd examples && bazelisk build --jobs=1 //rdc:all + - run: cd examples && bazelisk build --jobs=1 //if_cuda:main + - run: cd examples && bazelisk build --jobs=1 //if_cuda:main --enable_cuda=False + - run: bazelisk shutdown + # run some repo integration tests + - run: cd tests/integration && ./test_all.sh + + # Use Bazel 7 + - run: echo "USE_BAZEL_VERSION=7.5.0" >> $GITHUB_ENV + if: ${{ !startsWith(matrix.cases.os, 'windows') }} + - run: echo "USE_BAZEL_VERSION=7.5.0" >> $env:GITHUB_ENV + if: ${{ startsWith(matrix.cases.os, 'windows') }} + # out of @examples repo build requires WORKSPACE-based external dependency system - run: bazelisk build --jobs=1 --noenable_bzlmod @rules_cuda_examples//basic:all - run: bazelisk build --jobs=1 --noenable_bzlmod @rules_cuda_examples//rdc:all diff --git a/BUILD.bazel b/BUILD.bazel index 7a93d97f..e69de29b 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,8 +0,0 @@ -load("@bazel_skylib//:bzl_library.bzl", "bzl_library") - -bzl_library( - name = "bzl_srcs", - srcs = glob(["**/*.bzl"]), - visibility = ["//visibility:public"], - deps = ["//cuda:bzl_srcs"], -) diff --git a/MODULE.bazel b/MODULE.bazel index 25c9943e..508a40b4 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -19,3 +19,9 @@ register_toolchains( "@local_cuda//toolchain/clang:clang-local-toolchain", "@local_cuda//toolchain/disabled:disabled-local-toolchain", ) + +bazel_dep(name = "rules_cuda_examples", dev_dependency = True) +local_path_override( + module_name = "rules_cuda_examples", + path = "./examples", +) diff --git a/docs/BUILD.bazel b/docs/BUILD.bazel index 5a8f6640..456e3005 100644 --- a/docs/BUILD.bazel +++ b/docs/BUILD.bazel @@ -13,7 +13,7 @@ stardoc( input = "user_docs.bzl", deps = [ ":bazel_tools_bzl_srcs", - "@rules_cuda//:bzl_srcs", + "@rules_cuda//cuda:bzl_srcs", ], ) @@ -23,7 +23,7 @@ stardoc( input = "toolchain_config_docs.bzl", deps = [ ":bazel_tools_bzl_srcs", - "@rules_cuda//:bzl_srcs", + "@rules_cuda//cuda:bzl_srcs", ], ) @@ -33,7 +33,7 @@ stardoc( input = "providers_docs.bzl", deps = [ ":bazel_tools_bzl_srcs", - "@rules_cuda//:bzl_srcs", + "@rules_cuda//cuda:bzl_srcs", ], ) @@ -43,7 +43,7 @@ stardoc( input = "developer_docs.bzl", deps = [ ":bazel_tools_bzl_srcs", - "@rules_cuda//:bzl_srcs", + "@rules_cuda//cuda:bzl_srcs", ], ) diff --git a/docs/MODULE.bazel b/docs/MODULE.bazel index 53d99aec..8631a1c0 100644 --- a/docs/MODULE.bazel +++ b/docs/MODULE.bazel @@ -3,6 +3,8 @@ module( version = "0.0.0", compatibility_level = 1, ) +bazel_dep(name = "bazel_skylib", version = "1.4.2") +bazel_dep(name = "platforms", version = "0.0.6") bazel_dep(name = "rules_cuda", version = "0.2.3") local_path_override( diff --git a/docs/WORKSPACE.bzlmod b/docs/WORKSPACE.bzlmod new file mode 100644 index 00000000..e69de29b