Add a workaround to unbreak the gen_maven_artifact invocation. #586
Workflow file for this run
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
# This workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: continuous-integration | |
env: | |
USE_BAZEL_VERSION: '6.2.0' | |
USE_JAVA_DISTRIBUTION: 'zulu' | |
USE_JAVA_VERSION: '11' | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
concurrency: | |
# On main branch, we don't want any jobs cancelled so the sha is used to name the group | |
# On PR branches, we cancel the job if new commits are pushed | |
# More info: https://stackoverflow.com/a/68422069/253468 | |
group: ${{ (github.ref == 'refs/heads/master') && format('ci-main-{0}', github.sha) || format('ci-main-{0}', github.ref) }} | |
cancel-in-progress: true | |
jobs: | |
maven-test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
java: [11, 17, 21] | |
# Additionally add macos & windows with a single recent JDK | |
include: | |
- os: macos-latest | |
java: 17 | |
# Windows has some line-ending issues right now. | |
#- os: windows-latest | |
# java: 17 | |
fail-fast: false | |
max-parallel: 4 | |
name: Test using Maven with JDK ${{ matrix.java }} on ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ./.github/actions/maven-test | |
# Note: We can't fold this into the matrix because it changes the `steps`, | |
# and `steps` can't reference matrix vars. :-( | |
bazel-test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
java: [11, 17, 21] | |
# Additionally add macos & windows with a single recent JDK | |
include: | |
- os: macos-latest | |
java: 17 | |
# Windows has some line-ending & "//..."-escaping issues (for build //...) right now. | |
#- os: windows-latest | |
# java: 17 | |
fail-fast: false | |
max-parallel: 4 | |
name: Test using Bazel with JDK ${{ matrix.java }} on ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ./.github/actions/bazel-test | |
bazel-build: | |
runs-on: ubuntu-latest | |
name: Bazel Build | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ./.github/actions/bazel-build | |
local-artifact-tests: | |
runs-on: ubuntu-latest | |
needs: [bazel-build] | |
name: Local Artifact Tests | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ./.github/actions/local-artifact-tests | |
publish: | |
runs-on: ubuntu-latest | |
needs: [maven-test, bazel-test, bazel-build, local-artifact-tests] | |
if: github.event_name == 'push' && github.repository == 'google/guice' && github.ref == 'refs/heads/master' | |
name: Publish Javadoc and Snapshot | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ./.github/actions/publish-snapshot | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} |