Skip to content

Commit

Permalink
Bazel 8 support for rules_{gzip,bzip2,xz,zstd} (#3122)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattyclarkson authored Nov 6, 2024
1 parent f35ea1d commit 7ee779b
Show file tree
Hide file tree
Showing 16 changed files with 270 additions and 4 deletions.
32 changes: 32 additions & 0 deletions modules/rules_bzip2/1.0.0-beta.5/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
module(
name = "rules_bzip2",
version = "1.0.0-beta.5",
bazel_compatibility = [
">=7.1.0",
],
compatibility_level = 1,
)

bazel_dep(name = "rules_coreutils", version = "1.0.0-beta.7")
bazel_dep(name = "toolchain_utils", version = "1.0.0-beta.17")
bazel_dep(name = "ape", version = "1.0.0-beta.14")
bazel_dep(name = "bzip2", version = "1.0.8.bcr.1", repo_name = "bcr")

bazel_dep(name = "hermetic_cc_toolchain", version = "3.1.0", dev_dependency = True)

export = use_extension("@toolchain_utils//toolchain/export:defs.bzl", "toolchain_export")
use_repo(export, "ape-bzip2")
export.symlink(
name = "bzip2",
target = "@ape-bzip2",
)
use_repo(export, "bzip2")

resolved = use_repo_rule("@toolchain_utils//toolchain/resolved:defs.bzl", "toolchain_resolved")

resolved(
name = "resolved-bzip2",
toolchain_type = "//bzip2/toolchain/bzip2:type",
)

register_toolchains("//bzip2/toolchain/...")
23 changes: 23 additions & 0 deletions modules/rules_bzip2/1.0.0-beta.5/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
bcr_test_module:
module_path: e2e
matrix:
bazel:
- 7.x
- 8.0.0rc2
platform:
- centos7_java11_devtoolset10
- debian10
- debian11
- ubuntu2004
- ubuntu2204
- fedora39
- macos
- macos_arm64
- windows
tasks:
e2e_tests:
name: Run end-to-end Tests
bazel: ${{ bazel }}
platform: ${{ platform }}
test_targets:
- "//..."
5 changes: 5 additions & 0 deletions modules/rules_bzip2/1.0.0-beta.5/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"url": "https://gitlab.arm.com/bazel/rules_bzip2/-/releases/v1.0.0-beta.5/downloads/src.tar.gz",
"integrity": "sha512-X9ffQ7bU3GALuLxBF+cwYCMNd714b5FSfuGbPt27730pLooCZiG+Ix1sy9qcJIYvYO+tXfTEVNrvZNl8GCWXhQ==",
"strip_prefix": "rules_bzip2-v1.0.0-beta.5"
}
3 changes: 2 additions & 1 deletion modules/rules_bzip2/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"versions": [
"1.0.0-beta.1",
"1.0.0-beta.2",
"1.0.0-beta.3"
"1.0.0-beta.3",
"1.0.0-beta.5"
],
"maintainers": [
{
Expand Down
29 changes: 29 additions & 0 deletions modules/rules_gzip/1.0.0-beta.5/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module(
name = "rules_gzip",
version = "1.0.0-beta.5",
bazel_compatibility = [
">=7.1.0",
],
compatibility_level = 1,
)

bazel_dep(name = "toolchain_utils", version = "1.0.0-beta.17")
bazel_dep(name = "rules_coreutils", version = "1.0.0-beta.7")
bazel_dep(name = "ape", version = "1.0.0-beta.14")

export = use_extension("@toolchain_utils//toolchain/export:defs.bzl", "toolchain_export")
use_repo(export, "ape-gzip")
export.symlink(
name = "gzip",
target = "@ape-gzip",
)
use_repo(export, "gzip")

resolved = use_repo_rule("@toolchain_utils//toolchain/resolved:defs.bzl", "toolchain_resolved")

resolved(
name = "resolved-gzip",
toolchain_type = "//gzip/toolchain/gzip:type",
)

register_toolchains("//gzip/toolchain/...")
23 changes: 23 additions & 0 deletions modules/rules_gzip/1.0.0-beta.5/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
bcr_test_module:
module_path: e2e
matrix:
bazel:
- 7.x
- 8.0.0rc2
platform:
- centos7_java11_devtoolset10
- debian10
- debian11
- ubuntu2004
- ubuntu2204
- fedora39
- macos
- macos_arm64
- windows
tasks:
e2e_tests:
name: Run end-to-end Tests
bazel: ${{ bazel }}
platform: ${{ platform }}
test_targets:
- "//..."
5 changes: 5 additions & 0 deletions modules/rules_gzip/1.0.0-beta.5/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"url": "https://gitlab.arm.com/bazel/rules_gzip/-/releases/v1.0.0-beta.5/downloads/src.tar.gz",
"integrity": "sha512-+L8z5gNZVe3rL9IksQIKQGx1cEwKVWhHw9ibYciVBCu9xkCdb55oREtXzv47RZD6+XldWIfMRX5v9GjneNWeRQ==",
"strip_prefix": "rules_gzip-v1.0.0-beta.5"
}
3 changes: 2 additions & 1 deletion modules/rules_gzip/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"versions": [
"1.0.0-beta.1",
"1.0.0-beta.2",
"1.0.0-beta.3"
"1.0.0-beta.3",
"1.0.0-beta.5"
],
"maintainers": [
{
Expand Down
32 changes: 32 additions & 0 deletions modules/rules_xz/1.0.0-beta.5/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
module(
name = "rules_xz",
version = "1.0.0-beta.5",
bazel_compatibility = [
">=7.1.0",
],
compatibility_level = 1,
)

bazel_dep(name = "rules_coreutils", version = "1.0.0-beta.7")
bazel_dep(name = "toolchain_utils", version = "1.0.0-beta.17")
bazel_dep(name = "ape", version = "1.0.0-beta.14")
bazel_dep(name = "xz", version = "5.4.5.bcr.4", repo_name = "bcr")

bazel_dep(name = "hermetic_cc_toolchain", version = "3.1.0", dev_dependency = True)

export = use_extension("@toolchain_utils//toolchain/export:defs.bzl", "toolchain_export")
use_repo(export, "ape-xz")
export.symlink(
name = "xz",
target = "@ape-xz",
)
use_repo(export, "xz")

resolved = use_repo_rule("@toolchain_utils//toolchain/resolved:defs.bzl", "toolchain_resolved")

resolved(
name = "resolved-xz",
toolchain_type = "//xz/toolchain/xz:type",
)

register_toolchains("//xz/toolchain/...")
23 changes: 23 additions & 0 deletions modules/rules_xz/1.0.0-beta.5/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
bcr_test_module:
module_path: e2e
matrix:
bazel:
- 7.x
- 8.0.0rc2
platform:
- centos7_java11_devtoolset10
- debian10
- debian11
- ubuntu2004
- ubuntu2204
- fedora39
- macos
- macos_arm64
- windows
tasks:
e2e_tests:
name: Run end-to-end Tests
bazel: ${{ bazel }}
platform: ${{ platform }}
test_targets:
- "//..."
5 changes: 5 additions & 0 deletions modules/rules_xz/1.0.0-beta.5/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"url": "https://gitlab.arm.com/bazel/rules_xz/-/releases/v1.0.0-beta.5/downloads/src.tar.gz",
"integrity": "sha512-i2Cudw8z7oyfX2ga6w8s4aEAhbD3q9wx4qSAwLjmzye7rsaaOkY1Ofvz4Rlz02dYpyEhPPwPd/TypwPBpe03AQ==",
"strip_prefix": "rules_xz-v1.0.0-beta.5"
}
3 changes: 2 additions & 1 deletion modules/rules_xz/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"versions": [
"1.0.0-beta.1",
"1.0.0-beta.2",
"1.0.0-beta.3"
"1.0.0-beta.3",
"1.0.0-beta.5"
],
"maintainers": [
{
Expand Down
57 changes: 57 additions & 0 deletions modules/rules_zstd/1.0.0-beta.6/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
module(
name = "rules_zstd",
version = "1.0.0-beta.6",
bazel_compatibility = [
">=7.1.0",
],
compatibility_level = 1,
)

bazel_dep(name = "bazel_skylib", version = "1.5.0")
bazel_dep(name = "aspect_bazel_lib", version = "2.7.0")
bazel_dep(name = "toolchain_utils", version = "1.0.0-beta.17")
bazel_dep(name = "ape", version = "1.0.0-beta.14")
bazel_dep(name = "zstd", version = "1.5.6", repo_name = "zstandard")
bazel_dep(name = "download_utils", version = "1.0.0-beta.4")

bazel_dep(name = "hermetic_cc_toolchain", version = "3.1.0", dev_dependency = True)

download_archive = use_repo_rule("@download_utils//download/archive:defs.bzl", "download_archive")

download_archive(
name = "superconfigure",
srcs = ["bin/zstd"],
integrity = "sha256-M2r7xysRZysvprIT1Gpuaygy34B1fws+OBvMsp3vRbA=",
urls = ["https://github.com/ahgamut/superconfigure/releases/download/z0.0.55/compress.zip"],
)

export = use_extension("@toolchain_utils//toolchain/export:defs.bzl", "toolchain_export")
use_repo(export, "ape-zstd")
export.symlink(
name = "zstd",
target = "@ape-zstd",
)
use_repo(export, "zstd")

resolved = use_repo_rule("@toolchain_utils//toolchain/resolved:defs.bzl", "toolchain_resolved")

resolved(
name = "resolved-zstd",
toolchain_type = "//zstd/toolchain/zstd:type",
)

# Higher preference to `ape` toolchain
# https://github.com/ahgamut/superconfigure/issues/51
register_toolchains(
"//zstd/toolchain/zstd:superconfigure-amd64-freebsd",
"//zstd/toolchain/zstd:superconfigure-amd64-linux",
"//zstd/toolchain/zstd:superconfigure-amd64-macos",
"//zstd/toolchain/zstd:superconfigure-amd64-netbsd",
"//zstd/toolchain/zstd:superconfigure-amd64-openbsd",
"//zstd/toolchain/zstd:superconfigure-amd64-windows",
"//zstd/toolchain/zstd:superconfigure-arm64-freebsd",
"//zstd/toolchain/zstd:superconfigure-arm64-linux",
"//zstd/toolchain/zstd:superconfigure-arm64-macos",
)

register_toolchains("//zstd/toolchain/...")
23 changes: 23 additions & 0 deletions modules/rules_zstd/1.0.0-beta.6/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
bcr_test_module:
module_path: e2e
matrix:
bazel:
- 7.x
- 8.0.0rc2
platform:
- centos7_java11_devtoolset10
- debian10
- debian11
- ubuntu2004
- ubuntu2204
- fedora39
- macos
- macos_arm64
- windows
tasks:
e2e_tests:
name: Run end-to-end Tests
bazel: ${{ bazel }}
platform: ${{ platform }}
test_targets:
- "//..."
5 changes: 5 additions & 0 deletions modules/rules_zstd/1.0.0-beta.6/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"url": "https://gitlab.arm.com/bazel/rules_zstd/-/releases/v1.0.0-beta.6/downloads/src.tar.gz",
"integrity": "sha512-bVbH8LqB7n/zJ0joiDfbIW0t41Cw/RebGouviNxSN6TQ+LHfGx8cViXJ7nkom7YwJ7lMKFrpRUbs/vuT6r0cIA==",
"strip_prefix": "rules_zstd-v1.0.0-beta.6"
}
3 changes: 2 additions & 1 deletion modules/rules_zstd/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"1.0.0-beta.1",
"1.0.0-beta.2",
"1.0.0-beta.3",
"1.0.0-beta.4"
"1.0.0-beta.4",
"1.0.0-beta.6"
],
"maintainers": [
{
Expand Down

0 comments on commit 7ee779b

Please sign in to comment.