diff --git a/.github/workflows/groovy-joint-workflow.yml b/.github/workflows/groovy-joint-workflow.yml index 9ae957d5e68..7f3114c65e0 100644 --- a/.github/workflows/groovy-joint-workflow.yml +++ b/.github/workflows/groovy-joint-workflow.yml @@ -20,34 +20,26 @@ name: "Grails Joint Validation Build" on: push: branches: - - master - '[4-9]+.[0-9]+.x' pull_request: branches: - - master - '[4-9]+.[0-9]+.x' permissions: contents: read - jobs: - build: + build_groovy: strategy: fail-fast: true matrix: - os: [ubuntu-18.04] - java: [11.0.6] + os: [ ubuntu-18.04 ] + java: [ 11.0.6 ] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 - name: Set up JDK uses: actions/setup-java@v3 with: distribution: 'adopt' - java-version: ${{ matrix.java }} - - name: env - run: env - - # Select correct Groovy branch for this build: + java-version: 8 - name: Checkout Groovy 3_0_X (Grails 5 and later) run: cd .. && git clone --depth 1 https://github.com/apache/groovy.git -b GROOVY_3_0_X --single-branch if: github.ref == 'refs/heads/6.0.x' || github.base_ref == '6.0.x' || github.ref == 'refs/heads/5.3.x' || github.base_ref == '5.3.x' || github.ref == 'refs/heads/5.2.x' || github.base_ref == '5.2.x' || github.ref == 'refs/heads/5.1.x' || github.base_ref == '5.1.x' || github.ref == 'refs/heads/5.0.x' || github.base_ref == '5.0.x' || github.ref == 'refs/heads/master' || github.base_ref == 'master' @@ -60,13 +52,31 @@ jobs: echo 'CI_GROOVY_VERSION<> $GITHUB_ENV echo "$(cat gradle.properties | grep groovyVersion | cut -d\= -f2 | tr -d '[:space:]' >> $GITHUB_ENV)" >> $GITHUB_ENV echo 'EOF' >> $GITHUB_ENV + - name: Build and install groovy (no docs) + uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2 + run: | + cd ../groovy + ./gradlew install -x groovydoc -x javadoc -x javadocAll -x groovydocAll -x asciidoc -x docGDK + build_grails: + strategy: + fail-fast: true + matrix: + os: [ubuntu-18.04] + java: [11.0.6] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - name: Set up JDK + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: ${{ matrix.java }} + - name: env + run: env - name: echo CI_GROOVY_VERSION run: echo $CI_GROOVY_VERSION - - - name: Build and install groovy (no docs) - run: cd ../groovy && ./gradlew clean install -x groovydoc -x javadoc -x javadocAll -x groovydocAll -x asciidoc -x docGDK --no-build-cache --no-scan --no-daemon - timeout-minutes: 60 - - name: Build Grails - run: ./gradlew clean build test -x groovydoc --no-build-cache --no-scan --no-daemon - timeout-minutes: 60 + id: build_grails + uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2 + with: + arguments: clean build -x groovydoc \ No newline at end of file