-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 179ce0f
Showing
38 changed files
with
781 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,3 @@ | ||
common --enable_bzlmod | ||
|
||
common --lockfile_mode=off |
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 @@ | ||
7.0.0 |
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,3 @@ | ||
fixedReleaser: | ||
login: mark-thm | ||
email: 123787712+mark-thm@users.noreply.github.com |
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,18 @@ | ||
{ | ||
"homepage": "https://github.com/theoremlp/rules_uv", | ||
"maintainers": [ | ||
{ | ||
"email": "123787712+mark-thm@users.noreply.github.com", | ||
"github": "mark-thm", | ||
"name": "Mark Elliot" | ||
}, | ||
{ | ||
"email": "bazel-maintainers@theoremlp.com", | ||
"github": "theoremlp", | ||
"name": "Theorem Bazel Maintainers" | ||
} | ||
], | ||
"repository": ["github:theoremlp/rules_uv"], | ||
"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,15 @@ | ||
matrix: | ||
platform: | ||
- debian10 | ||
- ubuntu2004 | ||
- macos | ||
- macos_arm64 | ||
bazel: | ||
- 7.x | ||
tasks: | ||
verify_targets: | ||
name: Verify build targets | ||
platform: ${{ platform }} | ||
bazel: ${{ bazel }} | ||
build_targets: | ||
- "@rules_uv//..." |
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}-{VERSION}.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 | ||
docs/*.md 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,18 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
":dependencyDashboard", | ||
":semanticPrefixFixDepsChoreOthers", | ||
"group:monorepos", | ||
"group:recommended", | ||
"replacements:all", | ||
"workarounds:all" | ||
], | ||
"packageRules": [ | ||
{ | ||
"matchFiles": ["MODULE.bazel"], | ||
"enabled": false | ||
} | ||
] | ||
} | ||
|
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,18 @@ | ||
# This file contains Bazel settings to apply on CI only. | ||
# It is referenced with a --bazelrc option in the call to bazel in ci.yaml | ||
|
||
# Debug where options came from | ||
build --announce_rc | ||
|
||
# This directory is configured in GitHub actions to be persisted between runs. | ||
# We do not enable the repository cache to cache downloaded external artifacts | ||
# as these are generally faster to download again than to fetch them from the | ||
# GitHub actions cache. | ||
build --disk_cache=~/.cache/bazel | ||
|
||
# Don't rely on test logs being easily accessible from the test runner, | ||
# though it makes the log noisier. | ||
test --test_output=errors | ||
|
||
# Allows tests to run bazelisk-in-bazel, since this is the cache folder used | ||
test --test_env=XDG_CACHE_HOME |
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,28 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
test: | ||
uses: bazel-contrib/.github/.github/workflows/bazel.yaml@v5 | ||
with: | ||
folders: | | ||
[ | ||
".", | ||
"examples/typical", | ||
] | ||
# we only support Bazel 7, and only with bzlmod enabled | ||
exclude: | | ||
[ | ||
{"bzlmodEnabled": false}, | ||
{"bazelversion": "5.4.0"}, | ||
{"bazelversion": "6.4.0"}, | ||
] | ||
# this ruleset only supports linux and macos | ||
exclude_windows: true |
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,14 @@ | ||
name: Release | ||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
release: | ||
uses: bazel-contrib/.github/.github/workflows/release_ruleset.yaml@v5 | ||
permissions: | ||
contents: write | ||
with: | ||
release_files: rules_uv-*.tar.gz | ||
prerelease: false |
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,30 @@ | ||
#!/usr/bin/env bash | ||
|
||
# invoked by release workflow | ||
# (via https://github.com/bazel-contrib/.github/blob/master/.github/workflows/release_ruleset.yaml) | ||
|
||
set -o errexit -o nounset -o pipefail | ||
|
||
RULES_NAME="rules_uv" | ||
TAG="${GITHUB_REF_NAME}" | ||
PREFIX="${RULES_NAME}-${TAG:1}" | ||
ARCHIVE="${RULES_NAME}-${TAG:1}.tar.gz" | ||
|
||
# embed version in MODULE.bazel | ||
perl -pi -e "s/version = \"0\.0\.0\",/version = \"${TAG:1}\",/g" MODULE.bazel | ||
|
||
stash_name=`git stash create`; | ||
git archive --format=tar --prefix=${PREFIX}/ "${stash_name}" | gzip > $ARCHIVE | ||
|
||
SHA=$(shasum -a 256 $ARCHIVE | awk '{print $1}') | ||
|
||
cat << EOF | ||
## Using Bzlmod with Bazel 7 | ||
1. Enable with \`common --enable_bzlmod\` in \`.bazelrc\`. | ||
2. Add to your \`MODULE.bazel\` file: | ||
\`\`\`starlark | ||
bazel_dep(name = "${RULES_NAME}", version = "${TAG:1}") | ||
\`\`\` | ||
EOF |
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 @@ | ||
bazel-bin/ | ||
bazel-out/ | ||
bazel-testlogs/ | ||
bazel-* | ||
|
||
venv/ |
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,22 @@ | ||
load("@buildifier_prebuilt//:rules.bzl", "buildifier", "buildifier_test") | ||
|
||
exports_files([ | ||
"MODULE.bazel", | ||
]) | ||
|
||
buildifier( | ||
name = "buildifier.fix", | ||
exclude_patterns = ["./.git/*"], | ||
lint_mode = "fix", | ||
mode = "fix", | ||
visibility = ["//thm/buildtools/fix:__pkg__"], | ||
) | ||
|
||
buildifier_test( | ||
name = "buildifier.test", | ||
exclude_patterns = ["./.git/*"], | ||
lint_mode = "warn", | ||
mode = "diff", | ||
no_sandbox = True, | ||
workspace = "//:MODULE.bazel", | ||
) |
Oops, something went wrong.