Skip to content

Commit 4673929

Browse files
authored
Initial commit
0 parents  commit 4673929

52 files changed

Lines changed: 3341 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.bazelignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
e2e/

.bazelrc

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
########################
2+
# Import bazelrc presets
3+
import %workspace%/tools/preset.bazelrc
4+
5+
# Don’t want to push a rules author to update their deps if not needed.
6+
# https://bazel.build/reference/command-line-reference#flag--check_direct_dependencies
7+
# https://bazelbuild.slack.com/archives/C014RARENH0/p1691158021917459?thread_ts=1691156601.420349&cid=C014RARENH0
8+
common --config=ruleset
9+
10+
# Bazel settings that apply to this repository.
11+
# Take care to document any settings that you expect users to apply.
12+
# Settings that apply only to CI are in .github/workflows/ci.bazelrc
13+
14+
# Required until this is the default; expected in Bazel 7
15+
common --enable_bzlmod
16+
17+
# Ensure that the MODULE.bazel.lock file is complete and committed.
18+
# This is an important security measure: it ensures that developers on the
19+
# same rule set download dependencies at the same versions with the same bits.
20+
# This setting does not affect modules that depend on this module.
21+
#
22+
# When updating dependencies, use --lockfile_mode=refresh, for example:
23+
# bazel mod tidy --lockfile_mode=refresh
24+
#
25+
# When testing different versions of Bazel, use --lockfile_mode=update or
26+
# --lockfile_mode=off. The lock file format changes over time, and different
27+
# versions of Bazel may expect different syntax. Bazel also implicitly requires
28+
# some modules, and different versions have different dependencies, which
29+
# also affects the contents of the lock file.
30+
common --lockfile_mode=error
31+
32+
# Load any settings specific to the current user.
33+
# .bazelrc.user should appear in .gitignore so that settings are not shared with team members
34+
# This needs to be last statement in this
35+
# config, as the user configuration should be able to overwrite flags from this file.
36+
# See https://docs.bazel.build/versions/master/best-practices.html#bazelrc
37+
# (Note that we use .bazelrc.user so the file appears next to .bazelrc in directory listing,
38+
# rather than user.bazelrc as suggested in the Bazel docs)
39+
try-import %workspace%/.bazelrc.user

.bazelversion

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
7.5.0
2+
# The first line of this file is used by Bazelisk and Bazel to be sure
3+
# the right version of Bazel is used to build and test this repo.
4+
# This also defines which version is used on CI.
5+
#
6+
# Note that you should also run integration_tests against other Bazel
7+
# versions you support.

.bcr/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Bazel Central Registry
2+
3+
When the ruleset is released, we want it to be published to the
4+
Bazel Central Registry automatically:
5+
<https://registry.bazel.build>
6+
7+
This folder contains configuration files to automate the publish step.
8+
See <https://github.com/bazel-contrib/publish-to-bcr/blob/main/templates/README.md>
9+
for authoritative documentation about these files.

.bcr/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# See https://github.com/bazel-contrib/publish-to-bcr#a-note-on-release-automation
2+
# for guidance about whether to uncomment this section:
3+
#
4+
# fixedReleaser:
5+
# login: my_github_handle
6+
# email: me@my.org

.bcr/metadata.template.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"homepage": "https://github.com/myorg/rules_mylang",
3+
"maintainers": [],
4+
"repository": ["github:myorg/rules_mylang"],
5+
"versions": [],
6+
"yanked_versions": {}
7+
}

.bcr/presubmit.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
bcr_test_module:
2+
module_path: "e2e/smoke"
3+
matrix:
4+
platform: ["debian10", "macos", "ubuntu2004", "windows"]
5+
bazel: ["8.x", "7.x", "6.x"]
6+
tasks:
7+
run_tests:
8+
name: "Run test module"
9+
platform: ${{ platform }}
10+
bazel: ${{ bazel }}
11+
test_targets:
12+
- "//..."

.bcr/source.template.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"integrity": "**leave this alone**",
3+
"strip_prefix": "{REPO}-{VERSION}",
4+
"docs_url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/{REPO}-{TAG}.docs.tar.gz",
5+
"url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/{REPO}-{TAG}.tar.gz"
6+
}

.devcontainer/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM mcr.microsoft.com/devcontainers/base:bookworm
2+
3+
# Download bazelisk and place it in $PATH
4+
RUN wget https://github.com/bazelbuild/bazelisk/releases/download/v1.18.0/bazelisk-linux-amd64
5+
RUN chmod +x bazelisk-linux-amd64
6+
RUN mv bazelisk-linux-amd64 /usr/local/bin/bazel
7+
8+
# Install python3 and pip to setup pre-commit
9+
RUN apt update && apt install -y --no-install-recommends \
10+
python3-setuptools \
11+
python3-pip \
12+
python3-dev \
13+
python3-venv
14+
15+
# Install pre-commit
16+
RUN pip install --break-system-packages pre-commit

.devcontainer/devcontainer.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"build": {
3+
// instructs devcontainers to use a Dockerfile
4+
// rather than a pre-defined image
5+
"dockerfile": "Dockerfile"
6+
},
7+
"customizations": {
8+
"vscode": {
9+
"extensions": [
10+
"ms-azuretools.vscode-docker", // docker support
11+
"BazelBuild.vscode-bazel" // bazel support
12+
]
13+
}
14+
},
15+
// sets up pre-commit hooks
16+
"postStartCommand": "pre-commit install"
17+
}

0 commit comments

Comments
 (0)