Produce conformance test artifacts #883
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
name: Build | |
# Requires: | |
# | |
# * A repository variable named REFERENCE_CHECKER_REPO with the name of the reference checker repo | |
# within this fork of JSpecify. | |
on: [push, pull_request] | |
defaults: | |
run: | |
shell: bash --noprofile --norc -e -o pipefail -x {0} | |
jobs: | |
build: | |
name: JDK ${{ matrix.java_version }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java_version: [11, 17, 18, 19] | |
experimental: [false] | |
continue-on-error: ${{ matrix.experimental }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: gradle/wrapper-validation-action@v1 | |
- name: Set up JDK ${{ matrix.java_version }} | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: ${{ matrix.java_version }} | |
cache: gradle | |
- run: | | |
./gradlew spotlessCheck build publishToMavenLocal --no-daemon | |
reference-checker-tests: | |
name: Run Reference Checker Tests | |
runs-on: ubuntu-latest | |
env: | |
reference_checker_repo: ${{ vars.reference_checker_repo || 'jspecify-reference-checker' }} | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v3 | |
with: | |
path: jspecify | |
- name: Check out the reference checker | |
uses: actions/checkout@v3 | |
with: | |
repository: ${{ github.repository_owner }}/${{ env.reference_checker_repo }} | |
path: ${{ env.reference_checker_repo }} | |
- name: Set up Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Run Conformance Tests | |
if: github.base_ref == 'main' # only PRs onto main | |
continue-on-error: true | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: conformanceTest conformanceTestOnSamples | |
build-root-directory: ${{ env.reference_checker_repo }} | |
- name: Run Samples Tests | |
# only PRs onto samples-google-prototype | |
if: github.base_ref == 'samples-google-prototype' | |
continue-on-error: true | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: jspecifySamplesTest | |
build-root-directory: ${{ env.reference_checker_repo }} |