-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
109 changed files
with
767 additions
and
468 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Publish Docs | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version to publish' | ||
required: true | ||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '11' | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GH_TOKEN }} | ||
ref: v${{ github.event.inputs.version }} | ||
- name: Publish Documentation | ||
id: docs | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: docs | ||
env: | ||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | ||
- name: Publish to Github Pages | ||
if: success() | ||
uses: micronaut-projects/github-pages-deploy-action@grails | ||
env: | ||
BETA: ${{ contains(github.event.inputs.version, 'M') }} | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
BRANCH: gh-pages | ||
FOLDER: build/docs | ||
VERSION: ${{ github.event.inputs.version }} | ||
COMMIT_EMAIL: ${{ env.GIT_USER_EMAIL }} | ||
COMMIT_NAME: ${{ env.GIT_USER_NAME }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,33 +2,24 @@ name: Java CI | |
on: | ||
push: | ||
branches: | ||
- master | ||
- '[3-9]+.[0-9]+.x' | ||
pull_request: | ||
branches: | ||
- master | ||
- '[3-9]+.[0-9]+.x' | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
WORKSPACE: ${{ github.workspace }} | ||
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8 | ||
permissions: | ||
contents: readw | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'adopt' | ||
java-version: 17 | ||
- name: Run Tests | ||
if: github.event_name == 'pull_request' | ||
id: tests | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: check | ||
java-version: '17' | ||
- name: Run Build | ||
if: github.event_name == 'push' | ||
id: build | ||
uses: gradle/gradle-build-action@v2 | ||
env: | ||
|
@@ -37,8 +28,26 @@ jobs: | |
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | ||
with: | ||
arguments: build | ||
- name: Upload Distribution | ||
if: success() && matrix.java == '11' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: grails-gsp-SNAPSHOT.zip | ||
path: ./**/build/libs/* | ||
publish: | ||
if: github.event_name == 'push' | ||
needs: build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '11' | ||
- name: Publish to repo.grails.org | ||
if: steps.build.outcome == 'success' && github.event_name == 'push' && matrix.java == '11' | ||
uses: gradle/gradle-build-action@v2 | ||
env: | ||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
|
@@ -48,15 +57,21 @@ jobs: | |
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} | ||
with: | ||
arguments: publish | ||
- name: Publish Test Report | ||
if: steps.build.outcome == 'failure' || steps.tests.outcome == 'failure' | ||
uses: scacap/action-surefire-report@v1 | ||
docs: | ||
if: github.event_name == 'push' | ||
needs: build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
report_paths: '**/build/test-results/test/TEST-*.xml' | ||
distribution: 'adopt' | ||
java-version: '17' | ||
- name: Build Docs | ||
id: docs | ||
if: steps.build.outcome == 'success' && github.event_name == 'push' && matrix.java == '11' | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: docs | ||
|
@@ -65,12 +80,12 @@ jobs: | |
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | ||
- name: Publish to Github Pages | ||
if: steps.docs.outcome == 'success' && github.event_name == 'push' && matrix.java == '11' | ||
uses: micronaut-projects/github-pages-deploy-action@master | ||
if: steps.docs.outcome == 'success' | ||
uses: grails/github-pages-deploy-action@v2 | ||
env: | ||
TARGET_REPOSITORY: ${{ github.repository }} | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
BRANCH: gh-pages | ||
FOLDER: build/docs | ||
COMMIT_EMAIL: [email protected] | ||
COMMIT_NAME: Puneet Behl | ||
COMMIT_NAME: Puneet Behl |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
name: "Grails Joint Validation Build" | ||
# GROOVY_2_5_X == Grails 4.0.x | ||
# GROOVY_3_0_X == grails master | ||
# Groovy master branch does not map to any due to changed package names. | ||
on: | ||
push: | ||
branches: | ||
- '[6-9]+.[1-9]+.x' | ||
pull_request: | ||
branches: | ||
- '[6-9]+.[1-9]+.x' | ||
workflow_dispatch: | ||
permissions: | ||
contents: read | ||
env: | ||
CI_GROOVY_VERSION: | ||
jobs: | ||
build_groovy: | ||
strategy: | ||
fail-fast: true | ||
runs-on: ubuntu-latest | ||
outputs: | ||
groovyVersion: ${{ steps.groovy-version.outputs.value }} | ||
steps: | ||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '11.0.6' | ||
- name: Cache local Maven repository & Groovy | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/groovy | ||
~/.m2/repository | ||
key: cache-local-groovy-maven-${{ github.sha }} | ||
- name: Checkout Groovy 3_0_X (Grails 5 and later) | ||
if: startsWith(github.ref, 'refs/heads/6.') || startsWith(github.base_ref, '6.') || startsWith(github.ref, 'refs/heads/5.') || startsWith(github.base_ref, '5.') | ||
run: cd .. && git clone --depth 1 https://github.com/apache/groovy.git -b GROOVY_3_0_X --single-branch | ||
- name: Set CI_GROOVY_VERSION for Grails | ||
id: groovy-version | ||
run: | | ||
cd ../groovy | ||
echo "CI_GROOVY_VERSION=$(cat gradle.properties | grep groovyVersion | cut -d\= -f2 | tr -d '[:space:]')" >> $GITHUB_ENV | ||
echo "value=$(cat gradle.properties | grep groovyVersion | cut -d\= -f2 | tr -d '[:space:]')" >> $GITHUB_OUTPUT | ||
- name: Prepare GE Set-up Configuration | ||
id: ge_conf | ||
run: | | ||
echo "VALUE<<EOF" >> $GITHUB_OUTPUT | ||
echo "plugins { " >> $GITHUB_OUTPUT | ||
echo " id 'com.gradle.enterprise' version '3.15.1'" >> $GITHUB_OUTPUT | ||
echo " id 'com.gradle.common-custom-user-data-gradle-plugin' version '1.11.3'" >> $GITHUB_OUTPUT | ||
echo "}" >> $GITHUB_OUTPUT | ||
echo "" >> $GITHUB_OUTPUT | ||
echo "gradleEnterprise {" >> $GITHUB_OUTPUT | ||
echo " server = 'https://ge.grails.org'" >> $GITHUB_OUTPUT | ||
echo " buildScan {" >> $GITHUB_OUTPUT | ||
echo " publishAlways()" >> $GITHUB_OUTPUT | ||
echo " publishIfAuthenticated()" >> $GITHUB_OUTPUT | ||
echo " uploadInBackground = System.getenv('CI') == null" >> $GITHUB_OUTPUT | ||
echo " capture {" >> $GITHUB_OUTPUT | ||
echo " taskInputFiles = true" >> $GITHUB_OUTPUT | ||
echo " }" >> $GITHUB_OUTPUT | ||
echo " }" >> $GITHUB_OUTPUT | ||
echo "}" >> $GITHUB_OUTPUT | ||
echo "" >> $GITHUB_OUTPUT | ||
echo "buildCache {" >> $GITHUB_OUTPUT | ||
echo " local { enabled = System.getenv('CI') != 'true' }" >> $GITHUB_OUTPUT | ||
echo " remote(HttpBuildCache) {" >> $GITHUB_OUTPUT | ||
echo " push = System.getenv('CI') == 'true'" >> $GITHUB_OUTPUT | ||
echo " enabled = true" >> $GITHUB_OUTPUT | ||
echo " url = 'https://ge.grails.org/cache/'" >> $GITHUB_OUTPUT | ||
echo " credentials {" >> $GITHUB_OUTPUT | ||
echo " username = System.getenv('GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER')" >> $GITHUB_OUTPUT | ||
echo " password = System.getenv('GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY')" >> $GITHUB_OUTPUT | ||
echo " }" >> $GITHUB_OUTPUT | ||
echo " }" >> $GITHUB_OUTPUT | ||
echo "}" >> $GITHUB_OUTPUT | ||
echo "" >> $GITHUB_OUTPUT | ||
echo "EOF" >> $GITHUB_OUTPUT | ||
- name: Gradle Enterprise Set-up | ||
run: | | ||
cd ../groovy | ||
# Delete exiting plugins and build-scan from settings.gradle file | ||
sed -i '21,31d' settings.gradle | ||
# Add Gradle Enterprise set-up related configuration after line no 20 in settings.gradle | ||
echo "${{ steps.ge_conf.outputs.value}}" | sed -i -e "20r /dev/stdin" settings.gradle | ||
- name: Build and install groovy (no docs) | ||
uses: gradle/gradle-build-action@v2 | ||
env: | ||
GRADLE_SCANS_ACCEPT: yes | ||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | ||
with: | ||
build-root-directory: ../groovy | ||
arguments: | | ||
install | ||
-x groovydoc | ||
-x javadoc | ||
-x javadocAll | ||
-x groovydocAll | ||
-x asciidoc | ||
-x docGDK | ||
build_gsp: | ||
needs: [build_groovy] | ||
strategy: | ||
fail-fast: true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '11' | ||
- name: Cache local Maven repository & Groovy | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/groovy | ||
~/.m2/repository | ||
key: cache-local-groovy-maven-${{ github.sha }} | ||
- name: Set CI_GROOVY_VERSION for Grails | ||
run: | | ||
echo "CI_GROOVY_VERSION=${{needs.build_groovy.outputs.groovyVersion}}" >> $GITHUB_ENV | ||
- name: Build GSP | ||
id: build_gsp | ||
uses: gradle/gradle-build-action@v2 | ||
env: | ||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | ||
with: | ||
arguments: | | ||
build | ||
-x groovydoc |
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
Oops, something went wrong.