Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
cloudshiftchris committed Jul 31, 2024
1 parent dd00fdf commit ac3766b
Showing 2 changed files with 37 additions and 65 deletions.
70 changes: 5 additions & 65 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,74 +1,14 @@
name: 'Build'
on:
push: { }

permissions:
contents: 'write'
contents: read

jobs:
build-first:
runs-on: 'ubuntu-latest'
steps:
# https://github.com/hmarr/debug-action
- uses: 'hmarr/debug-action@v3'

# https://github.com/actions/checkout
- name: 'checkout'
uses: 'actions/checkout@v4'

# https://github.com/actions/setup-java
- name: 'Set up JDK'
uses: 'actions/setup-java@v4'
with:
java-version: '21'
distribution: 'temurin'

# https://github.com/gradle/actions/tree/main/setup-gradle
- name: 'Set up Gradle'
uses: 'gradle/actions/setup-gradle@6c9e5473141d9a428221ea9a229a025d7bf331d4' # v4.0.0-beta.1
with:
validate-wrappers: true

# https://github.com/gradle/actions/tree/main/dependency-submission
# - name: "Generate and submit dependency graph"
# uses: 'gradle/actions/setup-gradle@6c9e5473141d9a428221ea9a229a025d7bf331d4' # v4.0.0-beta.1
# env:
# dependency-graph-report-dir: "${{ github.workspace }}/build/dependency-graph-reports"
# dependency-graph-exclude-projects: "^:(build-logic|buildSrc|.*[Tt]test.*)"
# dependency-graph-exclude-configurations: ".*[Tt]est.*Classpath"

- name: 'Build'
run: './gradlew build --info --scan --stacktrace --no-build-cache --build-file build.gradle.kts'
uses: ./.github/workflows/run-gradle.yml

build-second:
runs-on: 'ubuntu-latest'
needs: [ 'build-first' ]
steps:
# https://github.com/hmarr/debug-action
- uses: 'hmarr/debug-action@v3'

# https://github.com/actions/checkout
- name: 'checkout'
uses: 'actions/checkout@v4'

# https://github.com/actions/setup-java
- name: 'Set up JDK'
uses: 'actions/setup-java@v4'
with:
java-version: '21'
distribution: 'temurin'

# https://github.com/gradle/actions/tree/main/setup-gradle
- name: 'Set up Gradle'
uses: 'gradle/actions/setup-gradle@6c9e5473141d9a428221ea9a229a025d7bf331d4' # v4.0.0-beta.1
with:
validate-wrappers: true

# https://github.com/gradle/actions/tree/main/dependency-submission
# - name: "Generate and submit dependency graph"
# uses: 'gradle/actions/setup-gradle@6c9e5473141d9a428221ea9a229a025d7bf331d4' # v4.0.0-beta.1
# env:
# dependency-graph-report-dir: "${{ github.workspace }}/build/dependency-graph-reports"
# dependency-graph-exclude-projects: "^:(build-logic|buildSrc|.*[Tt]test.*)"
# dependency-graph-exclude-configurations: ".*[Tt]est.*Classpath"

- name: 'Build'
run: './gradlew build --info --scan --stacktrace --no-build-cache --build-file build-second.gradle.kts'
uses: ./.github/workflows/run-gradle.yml
32 changes: 32 additions & 0 deletions .github/workflows/run-gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Gradle Task
run-name: "Gradle Task ${{ inputs.task }}, ${{ inputs.runs-on }}, ${{ inputs.ref }}"

on:
workflow_call: {}

permissions:
contents: read

jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: 'hmarr/debug-action@v3'

- name: Checkout the repo
uses: actions/checkout@v4

- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "21"

- name: Setup Gradle
uses: "gradle/actions/setup-gradle@6c9e5473141d9a428221ea9a229a025d7bf331d4" # v4.0.0-beta.1
with:
gradle-home-cache-cleanup: true

- name: Run Gradle
run: ./gradlew build --scan --stacktrace
shell: bash

0 comments on commit ac3766b

Please sign in to comment.