Skip to content

Commit

Permalink
Update groovy-joint-workflow.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
puneetbehl committed Aug 12, 2023
1 parent c56c556 commit 3fc52f3
Showing 1 changed file with 29 additions and 19 deletions.
48 changes: 29 additions & 19 deletions .github/workflows/groovy-joint-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -60,13 +52,31 @@ jobs:
echo 'CI_GROOVY_VERSION<<EOF' >> $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

0 comments on commit 3fc52f3

Please sign in to comment.