Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update all the things, move the CLI back into this repo, use toolchains instead of bind, and support new Bazel worker options #45

Merged
merged 2 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@ startup --expand_configs_in_place

common:ci --color=yes

# At least until https://github.com/lucidsoftware/rules_scala/pull/40 is merged
common --incompatible_java_common_parameters=false
build --strategy=worker,sandboxed,local
build --verbose_failures

build --incompatible_strict_action_env
build --experimental_worker_multiplex_sandboxing
build --experimental_worker_cancellation
build --worker_sandboxing

build --java_language_version="21"
build --java_runtime_version="remotejdk_21"
build --tool_java_language_version="21"
build --tool_java_runtime_version="remotejdk_21"

build:ci --verbose_failures
build:ci --sandbox_debug
build:ci --spawn_strategy=standalone
build:ci --genrule_strategy=standalone
Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bazelbuild/6.3.2
bazelbuild/7.3.1
33 changes: 29 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,37 @@ jobs:
USE_BAZEL_VERSION: ${{ matrix.bazel_version }}
strategy:
matrix:
os: [ubuntu-20.04]
bazel_version: [bazelbuild/5.4.0, bazelbuild/6.3.2]
os: [ubuntu-24.04]
bazel_version: [bazelbuild/7.3.1]
steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]
- uses: actions/[email protected]
- uses: bazel-contrib/[email protected]
with:
bazelisk-version: 1.20.0
- run: cat .bazelrc.ci >> .bazelrc
- run: ./scripts/lint.sh
- run: ./scripts/format.sh check
- run: ./test/run_all_tests.sh ci
- run: ./scripts/gen-docs.sh && git diff --exit-code docs/
- run: bazel shutdown

publish:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
needs: build-and-test
runs-on: ubuntu-24.04
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
- uses: bazel-contrib/[email protected]
with:
bazelisk-version: 1.20.0
- run: cat .bazelrc.ci >> .bazelrc
- name: Import gpg keys
run: echo "$PGP_SECRET" | base64 --decode | gpg --import
env:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
- name: Publish to Maven
run: ./scripts/publish.sh
env:
MAVEN_USER: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
25 changes: 23 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier")
load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier", "buildifier_test")
load(
"@rules_java//toolchains:default_java_toolchain.bzl",
"DEFAULT_TOOLCHAIN_CONFIGURATION",
"default_java_toolchain",
)

buildifier(name = "buildifier")
default_java_toolchain(
name = "repository_default_toolchain_21",
configuration = DEFAULT_TOOLCHAIN_CONFIGURATION,
java_runtime = "@rules_java//toolchains:remotejdk_21",
javac_supports_worker_multiplex_sandboxing = True,
source_version = "21",
target_version = "21",
)

buildifier(
name = "buildifier",
)

buildifier_test(
name = "buildifier_check",
mode = "check",
)
6 changes: 6 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
###############################################################################
# Bazel now uses Bzlmod by default to manage external dependencies.
# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel.
#
# For more details, please check https://github.com/bazelbuild/bazel/issues/18958
###############################################################################
110 changes: 110 additions & 0 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading