Repository navigation
add new language features #59
Workflow file for this run
This file contains hidden or 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 and Test | |
| on: | |
| push: | |
| branches: main | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Build with Gradle | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| # all the LTS versions | |
| java: [ '8', '11', '17', '21' ] | |
| fail-fast: false | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| - name: Check code formatting | |
| # older versions are incompatible with our spotless version | |
| if: matrix.java == '17' || matrix.java == '21' | |
| run: ./gradlew spotlessCheck --no-daemon | |
| - name: Build and test with JDK ${{ matrix.java }} | |
| run: ./gradlew build --no-daemon -PjavaToolchain=${{ matrix.java }} | |
| env: | |
| GRADLE_OPTS: -Dorg.gradle.java.installations.auto-download=true | |
| e2e: | |
| name: Assemble and compile the e2e corpus | |
| # macOS rather than Ubuntu for one reason: Homebrew is preinstalled and | |
| # carries current NSIS versions, where Debian's packages lag. Bootstrapping | |
| # Homebrew on Ubuntu would get the same makensis but spends a minute or two | |
| # on setup first. | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| # makensis is the oracle the corpus asserts against; without it run.sh skips. | |
| # Homebrew tracks the current release rather than pinning one, so record the | |
| # version: a red run caused by an NSIS upgrade should be distinguishable | |
| # from one caused by a change here. | |
| - name: Install NSIS | |
| run: | | |
| brew install makensis | |
| makensis -VERSION | |
| # One JDK only: the assembled .nsi does not vary by toolchain, so running | |
| # the corpus across the matrix would just spend CI minutes on makensis. | |
| # E2E_REQUIRE_MAKENSIS turns the skip path into a failure - in CI a missing | |
| # compiler is a broken workflow, not a reason to pass. | |
| - name: Run the e2e corpus | |
| run: ./e2e/run.sh | |
| env: | |
| E2E_REQUIRE_MAKENSIS: 1 | |
| GRADLE_OPTS: -Dorg.gradle.java.installations.auto-download=true |