disable builds and uploads

This repository is no longer being used so we disable the builds and
uploads of artifacts. We still need to update the WORKSPACE file to not
use a locally configured c++ toolchain so that the builder does not
fail.

Change-Id: I660a0bfc92919d65ffe785c72c41e99d0bb12d92
Reviewed-on: https://fuchsia-review.googlesource.com/c/drivers/misc/google/backlight/+/907927
Fuchsia-Auto-Submit: Chase Latta <chaselatta@google.com>
Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
Reviewed-by: Jiaming Li <lijiaming@google.com>
diff --git a/.bazelrc b/.bazelrc
index 8282d38..1228d5d 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -1,10 +1,7 @@
-build --strategy=FuchsiaPmPublish=local
-build --flag_alias=publish_to=@rules_fuchsia//fuchsia:package_repo
-build:fuchsia_x64 --crosstool_top=@fuchsia_clang//:toolchain
-build:fuchsia_x64 --cpu=x86_64
-build:fuchsia_x64 --host_crosstool_top=@bazel_tools//tools/cpp:toolchain
-build:fuchsia_x64 --copt=--debug --strip=never
-build:fuchsia_arm64 --crosstool_top=@fuchsia_clang//:toolchain
-build:fuchsia_arm64 --cpu=aarch64
-build:fuchsia_arm64 --host_crosstool_top=@bazel_tools//tools/cpp:toolchain
-build:fuchsia_arm64 --copt=--debug --strip=never
\ No newline at end of file
+# Copyright 2023 The Fuchsia Authors. All rights reserved
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file
+
+# Leave this line at the top of this file. It will pull in various useful defaults
+# Any changes after this line will take precedence
+try-import %workspace%/third_party/fuchsia-infra-bazel-rules/config/common_config.bazelrc
diff --git a/.gitmodules b/.gitmodules
index bc9de44..442e940 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -2,9 +2,6 @@
 	path = third_party/googletest
 	url = https://fuchsia.googlesource.com/third_party/github.com/google/googletest
 	branch = sandbox/fuchsia_bazel_sdk
-[submodule "third_party/sdk-integration"]
-	path = third_party/sdk-integration
-	url = https://fuchsia.googlesource.com/sdk-integration
 [submodule "third_party/fuchsia-infra-bazel-rules"]
 	path = third_party/fuchsia-infra-bazel-rules
 	url = https://fuchsia.googlesource.com/fuchsia-infra-bazel-rules
diff --git a/BUILD.bazel b/BUILD.bazel
index b6b8cad..7a3e3ff 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -10,11 +10,12 @@
 fuchsia_builder_group(
     name = "infra",
     build_only = [
-        "//driver:pkg",
-        "//driver:test_pkg",
+        # This driver is no longer being used so we turn off builds and uploads
+        # "//driver:pkg",
+        # "//driver:test_pkg",
     ],
     cipd_uploads = [
-        "//driver:artifact_cipd_release",
-        "//driver:debug_symbol_cipd_release",
+        # "//driver:artifact_cipd_release",
+        # "//driver:debug_symbol_cipd_release",
     ],
 )
diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel
index e03eb67..ac5e419 100644
--- a/WORKSPACE.bazel
+++ b/WORKSPACE.bazel
@@ -16,43 +16,52 @@
 
 bazel_skylib_workspace()
 
-load("@bazel_skylib//lib:versions.bzl", "versions")
-
-versions.check(minimum_bazel_version = "5.1.0")
-
-local_repository(
-    name = "rules_fuchsia",
-    path = "third_party/sdk-integration/bazel_rules_fuchsia",
-)
-
 local_repository(
     name = "fuchsia_infra",
     path = "third_party/fuchsia-infra-bazel-rules",
 )
 
+load("@fuchsia_infra//:workspace.bzl", "fuchsia_infra_workspace")
+load("@fuchsia_infra//cipd:defs.bzl", "cipd_repository", "cipd_tool_repository")
+load("@fuchsia_infra//infra:host_toolchains.bzl", "configure_fuchsia_clang_host_toolchain")
+
+fuchsia_infra_workspace()
+
+cipd_tool_repository(
+    name = "cipd_tool",
+)
+
+cipd_repository(
+    name = "fuchsia_sdk",
+    cipd_bin = "@cipd_tool//:cipd",
+    ensure_file = "//manifests:bazel_sdk.ensure",
+)
+
 load(
-    "@rules_fuchsia//fuchsia:deps.bzl",
-    "fuchsia_clang_repository",
-    "fuchsia_sdk_repository",
+    "@fuchsia_sdk//fuchsia:deps.bzl",
     "rules_fuchsia_deps",
 )
 
 rules_fuchsia_deps()
 
-fuchsia_sdk_repository(
-    name = "fuchsia_sdk",
-    use_experimental = True,
-)
-
 register_toolchains("@fuchsia_sdk//:fuchsia_toolchain_sdk")
 
+load(
+    "@fuchsia_sdk//fuchsia:clang.bzl",
+    "fuchsia_clang_repository",
+)
+
 fuchsia_clang_repository(
     name = "fuchsia_clang",
+    cipd_bin = "@cipd_tool//:cipd",
+    cipd_ensure_file = "//manifests:clang.ensure",
+    sdk_root_label = "@fuchsia_sdk",
 )
 
 load("@fuchsia_clang//:defs.bzl", "register_clang_toolchains")
 
 register_clang_toolchains()
+configure_fuchsia_clang_host_toolchain(name = "host_clang_toolchain")
 
 # gTest.
 local_repository(
diff --git a/driver/BUILD.bazel b/driver/BUILD.bazel
index a7e0d8e..f59bfd4 100644
--- a/driver/BUILD.bazel
+++ b/driver/BUILD.bazel
@@ -1,5 +1,5 @@
 load(
-    "@rules_fuchsia//fuchsia:defs.bzl",
+    "@fuchsia_sdk//fuchsia:defs.bzl",
     "fuchsia_cc_test",
     "fuchsia_component_manifest",
     "fuchsia_driver_bind_bytecode",
@@ -121,6 +121,7 @@
     deps = [
         ":pkg",
     ],
+    pkg_name = "fuchsia/drivers/backlight/x64",
     visibility = ["//visibility:public"],
 )
 
@@ -129,5 +130,6 @@
     deps = [
         ":pkg",
     ],
+    pkg_name = "fuchsia/drivers/backlight/debug-symbols-x64",
     visibility = ["//visibility:public"],
 )
diff --git a/manifests/BUILD.bazel b/manifests/BUILD.bazel
new file mode 100644
index 0000000..1bbe1b8
--- /dev/null
+++ b/manifests/BUILD.bazel
@@ -0,0 +1,10 @@
+# Copyright 2023 The Fuchsia Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+exports_files(
+    glob([
+        "*.ensure",
+        "*.resolved",
+    ]),
+)
diff --git a/manifests/bazel_sdk.ensure b/manifests/bazel_sdk.ensure
new file mode 100644
index 0000000..7a7cb18
--- /dev/null
+++ b/manifests/bazel_sdk.ensure
@@ -0,0 +1,4 @@
+$ResolvedVersions bazel_sdk.resolved
+$VerifiedPlatform linux-amd64 mac-amd64
+fuchsia/sdk/core/fuchsia-bazel-rules/${os=linux}-${arch} version:14.20230825.3.1
+fuchsia/sdk/core/fuchsia-bazel-rules/${os=mac}-amd64 version:14.20230825.3.1
diff --git a/manifests/bazel_sdk.resolved b/manifests/bazel_sdk.resolved
new file mode 100644
index 0000000..c1ae053
--- /dev/null
+++ b/manifests/bazel_sdk.resolved
@@ -0,0 +1,10 @@
+# This file is auto-generated by 'cipd ensure-file-resolve'.
+# Do not modify manually. All changes will be overwritten.
+
+fuchsia/sdk/core/fuchsia-bazel-rules/linux-amd64
+	version:14.20230825.3.1
+	-8e0YUn0dXZzKSPmEJLVtzk2lijh1zC9A1kny0WwWEsC
+
+fuchsia/sdk/core/fuchsia-bazel-rules/mac-amd64
+	version:14.20230825.3.1
+	d16iCfvEDT919buOe054wlxk0gATLK_GescQCMhrlaEC
diff --git a/manifests/clang.ensure b/manifests/clang.ensure
new file mode 100644
index 0000000..7948d5c
--- /dev/null
+++ b/manifests/clang.ensure
@@ -0,0 +1,4 @@
+$ResolvedVersions clang.resolved
+$VerifiedPlatform linux-amd64 linux-arm64 mac-amd64 windows-amd64
+fuchsia/third_party/clang/${os=linux}-${arch} git_revision:020d2fb7711d70e296f19d83565f8d93d2cfda71
+fuchsia/third_party/clang/${os=mac,windows}-amd64 git_revision:020d2fb7711d70e296f19d83565f8d93d2cfda71
diff --git a/manifests/clang.resolved b/manifests/clang.resolved
new file mode 100644
index 0000000..ebc04ab
--- /dev/null
+++ b/manifests/clang.resolved
@@ -0,0 +1,18 @@
+# This file is auto-generated by 'cipd ensure-file-resolve'.
+# Do not modify manually. All changes will be overwritten.
+
+fuchsia/third_party/clang/linux-amd64
+	git_revision:020d2fb7711d70e296f19d83565f8d93d2cfda71
+	8GgFsbo_UN7dwHkm4deOaZOCzhjeFnRNWYvGejpK0csC
+
+fuchsia/third_party/clang/linux-arm64
+	git_revision:020d2fb7711d70e296f19d83565f8d93d2cfda71
+	magCqaEyxKWsVF5NWlWMbANN4kbU3MjrkGOrjSlx_k8C
+
+fuchsia/third_party/clang/mac-amd64
+	git_revision:020d2fb7711d70e296f19d83565f8d93d2cfda71
+	cQg24HbE0o9RkNuSKF1Gq4kuvYodtnGCxXnJwFy3bXsC
+
+fuchsia/third_party/clang/windows-amd64
+	git_revision:020d2fb7711d70e296f19d83565f8d93d2cfda71
+	4TSVd8X2QqiDuOMJ3lnrlsnum-I5QfAPraVYGKMlNZ8C
diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh
index 8aea27a..d3a684a 120000
--- a/scripts/bootstrap.sh
+++ b/scripts/bootstrap.sh
@@ -1 +1 @@
-../third_party/sdk-integration/bazel_rules_fuchsia/scripts/bootstrap.sh
\ No newline at end of file
+../third_party/fuchsia-infra-bazel-rules/scripts/bootstrap.sh
\ No newline at end of file
diff --git a/third_party/fuchsia-infra-bazel-rules b/third_party/fuchsia-infra-bazel-rules
index bad405a..d2a04e2 160000
--- a/third_party/fuchsia-infra-bazel-rules
+++ b/third_party/fuchsia-infra-bazel-rules
@@ -1 +1 @@
-Subproject commit bad405a4e7a6c1396282d19d151c1b47bebc88ac
+Subproject commit d2a04e20e4ad6ece319720bf2f9016227c7a36fe
diff --git a/third_party/googletest b/third_party/googletest
index 0b56cbe..89865ac 160000
--- a/third_party/googletest
+++ b/third_party/googletest
@@ -1 +1 @@
-Subproject commit 0b56cbec076adbb75d22e3d9f75e99ad063d1ac3
+Subproject commit 89865ac025955f3c761c2d730a9081a78593cf83
diff --git a/third_party/sdk-integration b/third_party/sdk-integration
deleted file mode 160000
index ba6dc9d..0000000
--- a/third_party/sdk-integration
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit ba6dc9de5313e621d31cb365d2c2bb9a3ff37a1f