forked from uber/hermetic_cc_toolchain
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enabling auto-publishing to BCR (uber#109)
This adds the template files so that the Publish to BCR app can publish new releases of this repo to Bazel Central Repository as Bazel modules.
- Loading branch information
Showing
13 changed files
with
1,219 additions
and
0 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 @@ | ||
examples |
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,20 @@ | ||
{ | ||
"homepage": "https://github.com/uber/hermetic_cc_toolchain", | ||
"maintainers": [ | ||
{ | ||
"email": "[email protected]", | ||
"github": "sywhang", | ||
"name": "Sung Yoon Whang" | ||
}, | ||
{ | ||
"email": "[email protected]", | ||
"github": "linzhp", | ||
"name": "Zhongpeng Lin" | ||
} | ||
], | ||
"repository": [ | ||
"github:uber/hermetic_cc_toolchain" | ||
], | ||
"versions": [], | ||
"yanked_versions": {} | ||
} |
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,10 @@ | ||
bcr_test_module: | ||
module_path: "examples/bzlmod" | ||
matrix: | ||
platform: ["debian11", "macos", "macos_arm64", "ubuntu2004_arm64"] | ||
tasks: | ||
run_tests: | ||
name: "Run test module" | ||
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 @@ | ||
{ | ||
"integrity": "", | ||
"strip_prefix": "", | ||
"url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/{REPO}-{TAG}.tar.gz" | ||
} |
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 |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
/bazel-out | ||
/bazel-testlogs | ||
/bazel-x | ||
/examples/bzlmod/bazel-* |
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,11 @@ | ||
common --enable_bzlmod | ||
test --sandbox_default_allow_network=false | ||
test --test_output=errors | ||
|
||
build --verbose_failures | ||
build --worker_sandboxing | ||
|
||
build --experimental_reuse_sandbox_directories | ||
build --incompatible_enable_cc_toolchain_resolution | ||
build --action_env BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 | ||
build --experimental_output_directory_naming_scheme=diff_against_baseline |
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 @@ | ||
# Copyright 2023 Uber Technologies, Inc. | ||
# Licensed under the MIT License | ||
|
||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test") | ||
load("@hermetic_cc_toolchain//rules:platform.bzl", "platform_binary", "platform_test") | ||
|
||
go_library( | ||
name = "cgo_lib", | ||
srcs = ["cgo.go"], | ||
cgo = True, | ||
importpath = "github.com/uber/hermetic_cc_toolchain/test/bzlmod", | ||
visibility = ["//visibility:private"], | ||
) | ||
|
||
go_test( | ||
name = "cgo_test", | ||
srcs = ["cgo_test.go"], | ||
embed = [":cgo_lib"], | ||
) | ||
|
||
go_binary( | ||
name = "cgo", | ||
embed = [":cgo_lib"], | ||
gc_linkopts = select({ | ||
"@platforms//os:macos": [ | ||
"-w", # https://github.com/ziglang/zig/issues/15439 | ||
"-buildmode=pie", # https://github.com/ziglang/zig/issues/15438 | ||
], | ||
"//conditions:default": [], | ||
}), | ||
visibility = ["//visibility:public"], | ||
) |
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,31 @@ | ||
module( | ||
name = "hermetic_cc_toolchain_bcr_tests", | ||
version = "0.1.0", | ||
) | ||
|
||
bazel_dep( | ||
name = "hermetic_cc_toolchain", | ||
version = "", | ||
) | ||
local_path_override( | ||
module_name = "hermetic_cc_toolchain", | ||
path = "../..", | ||
) | ||
|
||
toolchains = use_extension("@hermetic_cc_toolchain//toolchain:ext.bzl", "toolchains") | ||
use_repo(toolchains, "zig_sdk") | ||
|
||
register_toolchains( | ||
"@zig_sdk//toolchain:linux_amd64_gnu.2.31", | ||
"@zig_sdk//toolchain:linux_arm64_gnu.2.31", | ||
"@zig_sdk//toolchain:darwin_amd64", | ||
"@zig_sdk//toolchain:darwin_arm64", | ||
"@zig_sdk//toolchain:windows_amd64", | ||
"@zig_sdk//toolchain:windows_arm64", | ||
) | ||
|
||
bazel_dep( | ||
name = "rules_go", | ||
version = "0.41.0", | ||
repo_name = "io_bazel_rules_go", | ||
) |
Oops, something went wrong.