Skip to content

Commit

Permalink
Update all the things, move the CLI back into this repo, use toolchai…
Browse files Browse the repository at this point in the history
…ns instead of bind
  • Loading branch information
jjudd committed Oct 12, 2024
1 parent e0cb47d commit 251337a
Show file tree
Hide file tree
Showing 41 changed files with 4,447 additions and 896 deletions.
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
31 changes: 26 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,37 @@ jobs:
USE_BAZEL_VERSION: ${{ matrix.bazel_version }}
strategy:
matrix:
os: [ubuntu-22.04]
bazel_version: [bazelbuild/6.5.0, bazelbuild/7.1.1]
os: [ubuntu-24.04]
bazel_version: [bazelbuild/7.3.1]
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
- uses: bazel-contrib/[email protected].1
- uses: bazel-contrib/[email protected].5
with:
bazelisk-version: 1.19.0
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

0 comments on commit 251337a

Please sign in to comment.