Skip to content

Commit

Permalink
Implement rules archive release artifact in github action. (#1501)
Browse files Browse the repository at this point in the history
* Implement rules archive release artifact in github action.

* Remove distro package and dependencies
  • Loading branch information
UebelAndre committed Aug 8, 2022
1 parent 4e5fac5 commit 76360dd
Show file tree
Hide file tree
Showing 48 changed files with 3 additions and 519 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@ jobs:
run: |
# Update urls and sha256 values
bazel ${BAZEL_STARTUP_FLAGS[@]} run //crate_universe/tools/urls_generator -- --artifacts-dir="${ARTIFACTS_DIR}" --url-prefix="${URL_PREFIX}"
# Publish to a known location
bazel ${BAZEL_STARTUP_FLAGS[@]} run //distro:publish -- ${{ github.workspace }}/.github
bazel clean
# Build an archive of the repo contents
tar -czf ${{ github.workspace }}/.github/rules_rust.tar.gz --exclude=".git" --exclude=".github" --exclude="examples" -C ${{ github.workspace }} .
# Save the sha256 checksum of the distro archive to the environment
sha256="$(shasum --algorithm 256 ${{ github.workspace }}/.github/rules_rust.tar.gz | awk '{ print $1 }')"
echo "ARCHIVE_SHA256=${sha256}" >> $GITHUB_ENV
Expand Down
19 changes: 0 additions & 19 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,6 @@ bzl_library(
visibility = ["//visibility:public"],
)

filegroup(
name = "distro",
srcs = glob(["*.bzl"]) + [
"//bindgen:distro",
"//cargo:distro",
"//crate_universe:distro",
"//proto:distro",
"//rust:distro",
"//tools:distro",
"//util:distro",
"//wasm_bindgen:distro",
"BUILD.bazel",
"README.md",
"LICENSE.txt",
"WORKSPACE.bazel",
],
visibility = ["//:__subpackages__"],
)

# This setting may be changed from the command line to generate machine readable errors.
error_format(
name = "error_format",
Expand Down
13 changes: 0 additions & 13 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,3 @@ http_archive(
#
# load("@bazelci_rules//:rbe_repo.bzl", "rbe_preconfig")
# rbe_preconfig(name = "buildkite_config", toolchain = "ubuntu1604-bazel-java8")

http_archive(
name = "rules_pkg",
sha256 = "62eeb544ff1ef41d786e329e1536c1d541bb9bcad27ae984d57f18f314018e66",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.6.0/rules_pkg-0.6.0.tar.gz",
"https://github.com/bazelbuild/rules_pkg/releases/download/0.6.0/rules_pkg-0.6.0.tar.gz",
],
)

load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")

rules_pkg_dependencies()
12 changes: 0 additions & 12 deletions bindgen/3rdparty/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,3 @@ bzl_library(
],
visibility = ["//bindgen:__pkg__"],
)

filegroup(
name = "distro",
srcs = glob([
"*.bzl",
"*.bazel",
]) + [
"//bindgen/3rdparty/crates:srcs",
"Cargo.Bazel.lock",
],
visibility = ["//bindgen:__pkg__"],
)
9 changes: 0 additions & 9 deletions bindgen/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@ bzl_library(
],
)

filegroup(
name = "distro",
srcs = glob(["*.bzl"]) + [
"//bindgen/3rdparty:distro",
"BUILD.bazel",
],
visibility = ["//:__subpackages__"],
)

rust_bindgen_toolchain(
name = "default_bindgen_toolchain_impl",
bindgen = "//bindgen/3rdparty:bindgen",
Expand Down
11 changes: 0 additions & 11 deletions cargo/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,3 @@ bzl_library(
srcs = glob(["**/*.bzl"]),
deps = ["//cargo/private:bzl_lib"],
)

filegroup(
name = "distro",
srcs = glob(["*.bzl"]) + [
"//cargo/bootstrap:distro",
"//cargo/cargo_build_script_runner:distro",
"//cargo/private:distro",
"BUILD.bazel",
],
visibility = ["//:__subpackages__"],
)
9 changes: 0 additions & 9 deletions cargo/bootstrap/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,3 @@ rust_binary(
"RULES_RUST_CARGO_BOOTSTRAP_BINARY": "$(rootpath bootstrap_installer.rs)",
},
)

filegroup(
name = "distro",
srcs = [
"BUILD.bazel",
"bootstrap_installer.rs",
],
visibility = ["//:__subpackages__"],
)
8 changes: 0 additions & 8 deletions cargo/cargo_build_script_runner/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,3 @@ rust_test(
edition = "2018",
deps = [":cargo_build_script_runner"],
)

filegroup(
name = "distro",
srcs = glob(["*.rs"]) + [
"BUILD.bazel",
],
visibility = ["//:__subpackages__"],
)
8 changes: 0 additions & 8 deletions cargo/private/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,3 @@ bzl_library(
srcs = glob(["**/*.bzl"]),
visibility = ["//:__subpackages__"],
)

filegroup(
name = "distro",
srcs = glob(["*.bzl"]) + [
"BUILD.bazel",
],
visibility = ["//:__subpackages__"],
)
12 changes: 0 additions & 12 deletions crate_universe/3rdparty/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,6 @@ crates_vendor(
vendor_path = "crates",
)

filegroup(
name = "distro",
srcs = glob([
"*.bzl",
"*.bazel",
]) + [
"Cargo.Bazel.lock",
"cargo-bazel-lock.json",
"//crate_universe/3rdparty/crates:srcs",
],
)

filegroup(
name = "bzl_srcs",
srcs = glob(["*.bzl"]) + [
Expand Down
15 changes: 0 additions & 15 deletions crate_universe/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,6 @@ exports_files(
visibility = ["//visibility:public"],
)

filegroup(
name = "distro",
srcs = glob(["*.bzl"]) + [
":rust_srcs",
"//crate_universe/3rdparty:distro",
"//crate_universe/private:distro",
"//crate_universe/tools:distro",
"BUILD.bazel",
"Cargo.lock",
"Cargo.toml",
"README.md",
],
visibility = ["//:__subpackages__"],
)

filegroup(
name = "bzl_srcs",
srcs = glob(["*.bzl"]) + [
Expand Down
8 changes: 0 additions & 8 deletions crate_universe/private/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,3 @@ filegroup(
name = "bzl_srcs",
srcs = glob(["*.bzl"]),
)

filegroup(
name = "distro",
srcs = glob(["*.bzl"]) + [
"BUILD.bazel",
"//crate_universe/private/vendor:distro",
],
)
8 changes: 0 additions & 8 deletions crate_universe/private/vendor/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
load("//crate_universe/private:vendor_utils.bzl", "crates_vendor_deps_targets")

crates_vendor_deps_targets()

filegroup(
name = "distro",
srcs = glob(["*.bzl"]) + [
"BUILD.bazel",
],
visibility = ["//crate_universe/private:__subpackages__"],
)
10 changes: 0 additions & 10 deletions crate_universe/tools/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
filegroup(
name = "distro",
srcs = [
"BUILD.bazel",
"//crate_universe/tools/cross_installer:distro",
"//crate_universe/tools/urls_generator:distro",
],
visibility = ["//crate_universe:__subpackages__"],
)

filegroup(
name = "bzl_srcs",
srcs = [
Expand Down
12 changes: 0 additions & 12 deletions crate_universe/tools/cross_installer/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,6 @@ rust_binary(

cross_binary(name = "cross")

filegroup(
name = "distro",
srcs = glob([
"**/*.rs",
"**/*.toml",
]) + [
"BUILD.bazel",
"cross_installer_deps.bzl",
],
visibility = ["//crate_universe/tools:__pkg__"],
)

filegroup(
name = "bzl_srcs",
srcs = glob(["**/*.bzl"]),
Expand Down
11 changes: 0 additions & 11 deletions crate_universe/tools/urls_generator/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@ exports_files(
visibility = ["//visibility:public"],
)

filegroup(
name = "distro",
srcs = glob([
"**/*.rs",
]) + [
"BUILD.bazel",
"Cargo.toml",
],
visibility = ["//crate_universe/tools:__pkg__"],
)

rust_binary(
name = "urls_generator",
srcs = glob(["src/**/*.rs"]),
Expand Down
33 changes: 0 additions & 33 deletions distro/BUILD.bazel

This file was deleted.

10 changes: 0 additions & 10 deletions distro/publisher.sh

This file was deleted.

13 changes: 0 additions & 13 deletions proto/3rdparty/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,3 @@ bzl_library(
],
visibility = ["//proto:__pkg__"],
)

filegroup(
name = "distro",
srcs = glob([
"*.bzl",
"*.bazel",
]) + [
"//proto/3rdparty/patches:distro",
"//proto/3rdparty/crates:srcs",
"Cargo.Bazel.lock",
],
visibility = ["//proto:__pkg__"],
)
11 changes: 0 additions & 11 deletions proto/3rdparty/patches/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,3 @@ package(default_visibility = ["//visibility:public"])
exports_files([
"com_google_protobuf-v3.10.0-bzl_visibility.patch",
])

filegroup(
name = "distro",
srcs = [
"BUILD.bazel",
"README.md",
] + glob([
"*.patch",
]),
visibility = ["//:__subpackages__"],
)
13 changes: 0 additions & 13 deletions proto/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,6 @@ alias(
actual = "//proto/3rdparty/crates:grpc-compiler__protoc-gen-rust-grpc",
)

filegroup(
name = "distro",
srcs = glob([
"*.bzl",
"*.rs",
]) + [
"//proto/raze:distro",
"//proto/3rdparty:distro",
"BUILD.bazel",
],
visibility = ["//:__subpackages__"],
)

toolchain_type(
name = "toolchain_type",
)
Expand Down
6 changes: 0 additions & 6 deletions proto/raze/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,3 @@ alias(
"manual",
],
)

filegroup(
name = "distro",
srcs = ["BUILD.bazel"],
visibility = ["//proto:__pkg__"],
)
13 changes: 0 additions & 13 deletions rust/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,3 @@ bzl_library(
"//rust/settings:bzl_lib",
],
)

filegroup(
name = "distro",
srcs = glob(["*.bzl"]) + [
"//rust/platform:distro",
"//rust/private:distro",
"//rust/settings:distro",
"//rust/rust_analyzer:distro",
"//rust/toolchain:distro",
"BUILD.bazel",
],
visibility = ["//:__subpackages__"],
)
11 changes: 0 additions & 11 deletions rust/platform/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,3 @@ bzl_library(
srcs = glob(["**/*.bzl"]),
visibility = ["//rust:__subpackages__"],
)

filegroup(
name = "distro",
srcs = glob(["*.bzl"]) + [
"//rust/platform/channel:distro",
"//rust/platform/cpu:distro",
"//rust/platform/os:distro",
"BUILD.bazel",
],
visibility = ["//:__subpackages__"],
)
Loading

0 comments on commit 76360dd

Please sign in to comment.