-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [GIT] initial BCR infra * [GIT] fix release prep
- Loading branch information
Showing
8 changed files
with
123 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,9 @@ | ||
# Bazel Central Registry | ||
|
||
When the ruleset is released, we want it to be published to the | ||
Bazel Central Registry automatically: | ||
<https://registry.bazel.build> | ||
|
||
This folder contains configuration files to automate the publish step. | ||
See <https://github.com/bazel-contrib/publish-to-bcr/blob/main/templates/README.md> | ||
for authoritative documentation about these files. |
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,6 @@ | ||
# See https://github.com/bazel-contrib/publish-to-bcr#a-note-on-release-automation | ||
# for guidance about whether to uncomment this section: | ||
# | ||
# fixedReleaser: | ||
# login: my_github_handle | ||
# email: me@my.org |
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,12 @@ | ||
{ | ||
"homepage": "https://github.com/hexdae/bazel_arm_toolchains", | ||
"maintainers": { | ||
"name": "Davide Asnaghi", | ||
"github": "hexdae" | ||
}, | ||
"repository": [ | ||
"github:hexdae/bazel_arm_toolchains" | ||
], | ||
"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,12 @@ | ||
bcr_test_module: | ||
module_path: "examples/bzlmod" | ||
matrix: | ||
platform: ["debian10", "macos", "ubuntu2004"] | ||
bazel: ["7.x", "6.x"] | ||
tasks: | ||
run_tests: | ||
name: "Run test module" | ||
platform: ${{ platform }} | ||
bazel: ${{ bazel }} | ||
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": "**leave this alone**", | ||
"strip_prefix": "{REPO}-{VERSION}", | ||
"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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# In code review, collapse generated files | ||
MODULE.bazel.lock linguist-generated=true | ||
|
||
################################# | ||
# Configuration for 'git archive' | ||
# See https://git-scm.com/docs/git-archive#ATTRIBUTES | ||
|
||
# Don't include examples in the distribution artifact, to reduce size. | ||
# You may want to add additional exclusions for folders or files that users don't need. | ||
examples export-ignore |
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,15 @@ | ||
# Cut a release whenever a new tag is pushed to the repo. | ||
# You should use an annotated tag, like `git tag -a v1.2.3` | ||
# and put the release notes into the commit message for the tag. | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
release: | ||
uses: bazel-contrib/.github/.github/workflows/release_ruleset.yaml@v6 | ||
with: | ||
release_files: bazel-arm-none-eabi-*.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit -o nounset -o pipefail | ||
|
||
# Set by GH actions, see | ||
# https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables | ||
TAG=${GITHUB_REF_NAME} | ||
# The prefix is chosen to match what GitHub generates for source archives | ||
# This guarantees that users can easily switch from a released artifact to a source archive | ||
# with minimal differences in their code (e.g. strip_prefix remains the same) | ||
PREFIX="bazel-arm-none-eabi-${TAG:1}" | ||
ARCHIVE="bazel-arm-none-eabi-$TAG.tar.gz" | ||
|
||
# NB: configuration for 'git archive' is in /.gitattributes | ||
git archive --format=tar --prefix=${PREFIX}/ ${TAG} | gzip > $ARCHIVE | ||
SHA=$(shasum -a 256 $ARCHIVE | awk '{print $1}') | ||
|
||
cat << EOF | ||
## Using Bzlmod with Bazel 6 or greater | ||
1. (Bazel 6 only) Enable with \`common --enable_bzlmod\` in \`.bazelrc\`. | ||
2. Add to your \`MODULE.bazel\` file: | ||
\`\`\`starlark | ||
bazel_dep(name = "arm_gnu_toolchain", version = "${TAG:1}") | ||
# Toolchains: arm-none-eabi | ||
arm_toolchain = use_extension("@arm_gnu_toolchain//:extensions.bzl", "arm_toolchain") | ||
arm_toolchain.arm_none_eabi(version = "13.2.1") | ||
use_repo( | ||
arm_toolchain, | ||
"arm_none_eabi", | ||
"arm_none_eabi_darwin_arm64", | ||
"arm_none_eabi_darwin_x86_64", | ||
"arm_none_eabi_linux_aarch64", | ||
"arm_none_eabi_linux_x86_64", | ||
"arm_none_eabi_windows_x86_64", | ||
) | ||
register_toolchains("@arm_none_eabi//toolchain:all") | ||
# Toolchains: arm-none-linux-gnueabihf | ||
arm_toolchain.arm_none_linux_gnueabihf(version = "13.2.1") | ||
use_repo( | ||
arm_toolchain, | ||
"arm_none_linux_gnueabihf", | ||
"arm_none_linux_gnueabihf_linux_aarch64", | ||
"arm_none_linux_gnueabihf_linux_x86_64", | ||
"arm_none_linux_gnueabihf_windows_x86_64", | ||
) | ||
register_toolchains("@arm_none_linux_gnueabihf//toolchain:all") | ||
\`\`\` | ||
EOF |