-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the repo, so it builds with modern Bazel and can be worked on
* Update Bazel to 7.1.1 and use Bazelisk to launch it * Update 3rd party Bazel dependencies * Move to GitHub Actions from Travis * Update to Scala 3 * Update Scala 3rd party dependencies * Update Maven publishing to be like our Play Routes Compiler CLI * Add Bazel formatting and linting with buildifier
- Loading branch information
James Judd
committed
Apr 10, 2024
1 parent
65b8675
commit d711b59
Showing
24 changed files
with
2,090 additions
and
2,179 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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
startup --expand_configs_in_place | ||
|
||
common --noenable_bzlmod | ||
|
||
common:ci --color=yes | ||
|
||
build:ci --verbose_failures | ||
|
File renamed without changes.
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 @@ | ||
bazelbuild/7.1.1 |
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,46 @@ | ||
name: CI | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '*--*' | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v1 | ||
- run: npm install -g @bazel/bazelisk | ||
- run: cat .bazelrc.ci >> .bazelrc | ||
- run: ./scripts/format.sh check | ||
- run: ./test/run_all_tests.sh ci | ||
|
||
publish: | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | ||
needs: build-and-test | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
- run: npm install -g @bazel/bazelisk | ||
- run: cat .bazelrc.ci >> .bazelrc | ||
- name: Parse Tag | ||
run: | | ||
# Tag should be <artifact_id suffix>--<version> | ||
tag=$(awk -F '/' '{print $NF}' <<< $GITHUB_REF) | ||
artifact_id=twirl-compiler-cli_$(awk -F '--' '{print $1}' <<< $tag) | ||
version=$(awk -F '--' '{print $2}' <<< $tag) | ||
echo "COMPILER_CLI_ARTIFACT_ID=$artifact_id" >> $GITHUB_ENV | ||
echo "COMPILER_CLI_VERSION=$version" >> $GITHUB_ENV | ||
- 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: | ||
DEPLOY_MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
DEPLOY_MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier", "buildifier_test") | ||
|
||
buildifier( | ||
name = "buildifier", | ||
) | ||
|
||
buildifier_test( | ||
name = "buildifier_test", | ||
size = "small", | ||
timeout = "short", | ||
lint_mode = "warn", | ||
mode = "check", | ||
no_sandbox = True, | ||
workspace = "//:WORKSPACE", | ||
) |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# twirl_compiler_cli | ||
Command line interface for the Twirl template compiler | ||
|
||
[![Build Status](https://api.travis-ci.com/lucidsoftware/twirl_compiler_cli.svg?branch=master)](https://travis-ci.com/lucidsoftware/twirl_compiler_cli) | ||
[![Build Status](https://github.com/lucidsoftware/twirl_compiler_cli/workflows/CI/badge.svg)](https://github.com/lucidsoftware/twirl_compiler_cli/actions) |
Oops, something went wrong.