Skip to content

Commit

Permalink
Reset GH actions to known working version
Browse files Browse the repository at this point in the history
  • Loading branch information
ysb33r committed Aug 19, 2022
1 parent 10758d3 commit 48eef4e
Showing 1 changed file with 63 additions and 34 deletions.
97 changes: 63 additions & 34 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,56 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
fetch-depth: 1
- uses: ./.github/actions/setup-jdks
java-version: 11
# Cache
- name: Cache .gradle/caches
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle-cache-
- name: Cache .gradle/wrapper
uses: actions/cache@v1
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle-wrapper-
# Licensing
- name: Licensing
uses: gradle/gradle-build-action@v2
uses: eskatos/gradle-command-action@v1
with:
# cache options only count for the first invocation
cache-read-only: ${{ github.ref != 'refs/heads/master' }}
arguments: --console=plain -S license
# Coding style
- name: Coding style
uses: gradle/gradle-build-action@v2
uses: eskatos/gradle-command-action@v1
with:
arguments: --console=plain -S codenarcAll
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v1
# use a short path to avoid exceeding the path limit on Windows... sigh
with:
# Codecov needs fetch-depth > 1
fetch-depth: 2
# use a short path to avoid exceeding the path limit on Windows... sigh
path: 'w'
- uses: ./.github/actions/setup-jdks
- uses: actions/setup-java@v1
with:
java-version: 11
# Cache
- name: Cache .gradle/caches
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle-cache-
- name: Cache .gradle/wrapper
uses: actions/cache@v1
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle-wrapper-
- name: Cache offline repository
uses: actions/cache@v1
with:
Expand All @@ -38,69 +62,74 @@ jobs:
restore-keys: ${{ runner.os }}-offline-repo-
# Build
- name: Build offline repository
uses: gradle/gradle-build-action@v2
uses: eskatos/gradle-command-action@v1
with:
# cache options only count for the first invocation
cache-read-only: ${{ github.ref != 'refs/heads/master' }}
arguments: --console=plain --no-build-cache :testfixtures-offline-repo:buildOfflineRepositories
- name: Build
uses: gradle/gradle-build-action@v2
uses: eskatos/gradle-command-action@v1
with:
arguments: --console=plain --warning-mode=all -s clean assemble
# Test
- name: Test
uses: gradle/gradle-build-action@v2
uses: eskatos/gradle-command-action@v1
with:
arguments: --console=plain --warning-mode=all -s check --no-parallel -Djava.net.preferIPv4Stack=true -x gradleTest --scan
# Documentation
- name: Documentation
uses: gradle/gradle-build-action@v2
# Stop gradlew to avoid locking issues
- name: Cleanup
uses: eskatos/gradle-command-action@v1
with:
build-root-directory: docs
arguments: asciidoctor
arguments: --stop
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
java: [ 8, 11 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
# Codecov needs fetch-depth > 1
fetch-depth: 2
- uses: ./.github/actions/setup-jdks
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
# Cache
- name: Cache .gradle/caches
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle-cache-
- name: Cache .gradle/wrapper
uses: actions/cache@v1
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle-wrapper-
- name: Cache offline repository
uses: actions/cache@v1
with:
path: testfixtures/offline-repo/build/repo
key: ${{ runner.os }}-offline-repo-${{ hashFiles('module-versions.properties') }}
restore-keys: ${{ runner.os }}-offline-repo-
- name: Build offline repository
uses: gradle/gradle-build-action@v2
uses: eskatos/gradle-command-action@v1
with:
# cache options only count for the first invocation
cache-read-only: ${{ github.ref != 'refs/heads/master' }}
arguments: --console=plain --no-build-cache :testfixtures-offline-repo:buildOfflineRepositories
# Build
- name: Build
uses: gradle/gradle-build-action@v2
uses: eskatos/gradle-command-action@v1
with:
arguments: -i -S --console=plain --no-build-cache assemble
# Integration tests
- name: Integration tests (without slides)
uses: gradle/gradle-build-action@v2
uses: eskatos/gradle-command-action@v1
with:
arguments: -i -s --console=plain --no-build-cache test intTest remoteTest -x asciidoctor-gradle-slides-export:intTest -x asciidoctor-gradle-jvm-slides:intTest
- name: Integration tests (slides only)
uses: gradle/gradle-build-action@v2
uses: eskatos/gradle-command-action@v1
with:
arguments: -i -s --console=plain --no-build-cache test asciidoctor-gradle-jvm-slides:intTest asciidoctor-gradle-slides-export:intTest
# Gradle tests
- name: Gradle tests
uses: gradle/gradle-build-action@v2
uses: eskatos/gradle-command-action@v1
with:
arguments: -i -s --console=plain --no-build-cache gradleTest

0 comments on commit 48eef4e

Please sign in to comment.