-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bazel 8 support for
rules_{gzip,bzip2,xz,zstd}
(#3122)
- Loading branch information
1 parent
f35ea1d
commit 7ee779b
Showing
16 changed files
with
270 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/...") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
- "//..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/...") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
- "//..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/...") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
- "//..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/...") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
- "//..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters