mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 05:50:53 +03:00
GitHub Actions: cache buildSrc/build to speed up Gradle builds by ~40 seconds
Some checks failed
CI / build (push) Has been cancelled
Error Prone / error-prone (push) Has been cancelled
Fonts / Fonts (inter) (push) Has been cancelled
Fonts / Fonts (jetbrains-mono) (push) Has been cancelled
Fonts / Fonts (roboto) (push) Has been cancelled
Fonts / Fonts (roboto-mono) (push) Has been cancelled
Native Libraries / Natives (macos-latest) (push) Has been cancelled
Native Libraries / Natives (ubuntu-24.04-arm) (push) Has been cancelled
Native Libraries / Natives (ubuntu-latest) (push) Has been cancelled
Native Libraries / Natives (windows-latest) (push) Has been cancelled
CI / release (push) Has been cancelled
Some checks failed
CI / build (push) Has been cancelled
Error Prone / error-prone (push) Has been cancelled
Fonts / Fonts (inter) (push) Has been cancelled
Fonts / Fonts (jetbrains-mono) (push) Has been cancelled
Fonts / Fonts (roboto) (push) Has been cancelled
Fonts / Fonts (roboto-mono) (push) Has been cancelled
Native Libraries / Natives (macos-latest) (push) Has been cancelled
Native Libraries / Natives (ubuntu-24.04-arm) (push) Has been cancelled
Native Libraries / Natives (ubuntu-latest) (push) Has been cancelled
Native Libraries / Natives (windows-latest) (push) Has been cancelled
CI / release (push) Has been cancelled
This commit is contained in:
@@ -7,6 +7,11 @@ charset = latin1
|
|||||||
indent_style = tab
|
indent_style = tab
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
|
[{*.yaml,*.yml}]
|
||||||
|
end_of_line = lf
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
[*.java]
|
[*.java]
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
ij_continuation_indent_size = 4
|
ij_continuation_indent_size = 4
|
||||||
|
|||||||
32
.github/actions/cache-gradle/action.yml
vendored
Normal file
32
.github/actions/cache-gradle/action.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# https://docs.github.com/en/actions/tutorials/create-actions/create-a-composite-action#creating-a-composite-action-within-the-same-repository
|
||||||
|
|
||||||
|
# cache uses two files:
|
||||||
|
#
|
||||||
|
# - gradle-wrapper-<os>-<arch>-<hash>:
|
||||||
|
# contains the Gradle wrapper/distribution (~/.gradle/wrapper)
|
||||||
|
# and is updated when the Gradle version changed
|
||||||
|
# - gradle-caches-<os>-<arch>-<hash>:
|
||||||
|
# contains the Gradle caches (~/.gradle/caches), buildSrc/build and buildSrc/.gradle
|
||||||
|
# and is updated when Gradle related files were changed
|
||||||
|
# buildSrc/.gradle is needed so that buildSrc tasks are UP-TO-DATE
|
||||||
|
|
||||||
|
name: 'Cache Gradle'
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Cache '.gradle/wrapper'
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
key: gradle-wrapper-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles( 'gradle/wrapper/gradle-wrapper.properties' ) }}
|
||||||
|
path: |
|
||||||
|
~/.gradle/wrapper
|
||||||
|
|
||||||
|
- name: Cache '.gradle/caches' and 'buildSrc/build'
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
key: gradle-caches-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles( '**/*.gradle*', 'gradle/**', 'gradle.properties', 'buildSrc/src/**' ) }}
|
||||||
|
path: |
|
||||||
|
~/.gradle/caches
|
||||||
|
buildSrc/build
|
||||||
|
buildSrc/.gradle
|
||||||
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
@@ -14,6 +14,7 @@ on:
|
|||||||
- '.*'
|
- '.*'
|
||||||
- '**/.settings/**'
|
- '**/.settings/**'
|
||||||
- 'flatlaf-core/svg/**'
|
- 'flatlaf-core/svg/**'
|
||||||
|
- 'flatlaf-natives/**'
|
||||||
- 'flatlaf-testing/dumps/**'
|
- 'flatlaf-testing/dumps/**'
|
||||||
- 'flatlaf-testing/misc/**'
|
- 'flatlaf-testing/misc/**'
|
||||||
- 'images/**'
|
- 'images/**'
|
||||||
@@ -32,7 +33,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
java-version: 21
|
java-version: 21
|
||||||
distribution: temurin # pre-installed on ubuntu-latest
|
distribution: temurin # pre-installed on ubuntu-latest
|
||||||
cache: gradle
|
|
||||||
|
- name: Cache Gradle
|
||||||
|
uses: ./.github/actions/cache-gradle
|
||||||
|
|
||||||
|
|
||||||
# test against
|
# test against
|
||||||
@@ -100,7 +103,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
java-version: 21
|
java-version: 21
|
||||||
distribution: temurin # pre-installed on ubuntu-latest
|
distribution: temurin # pre-installed on ubuntu-latest
|
||||||
cache: gradle
|
|
||||||
|
- name: Cache Gradle
|
||||||
|
uses: ./.github/actions/cache-gradle
|
||||||
|
|
||||||
- name: Release a new stable version to Maven Central
|
- name: Release a new stable version to Maven Central
|
||||||
run: ./gradlew publishToSonatype closeSonatypeStagingRepository :flatlaf-demo:build :flatlaf-theme-editor:build -PskipFonts -Prelease -Dorg.gradle.parallel=false
|
run: ./gradlew publishToSonatype closeSonatypeStagingRepository :flatlaf-demo:build :flatlaf-theme-editor:build -PskipFonts -Prelease -Dorg.gradle.parallel=false
|
||||||
|
|||||||
5
.github/workflows/error-prone.yml
vendored
5
.github/workflows/error-prone.yml
vendored
@@ -14,6 +14,7 @@ on:
|
|||||||
- '.*'
|
- '.*'
|
||||||
- '**/.settings/**'
|
- '**/.settings/**'
|
||||||
- 'flatlaf-core/svg/**'
|
- 'flatlaf-core/svg/**'
|
||||||
|
- 'flatlaf-natives/**'
|
||||||
- 'flatlaf-testing/dumps/**'
|
- 'flatlaf-testing/dumps/**'
|
||||||
- 'flatlaf-testing/misc/**'
|
- 'flatlaf-testing/misc/**'
|
||||||
- 'images/**'
|
- 'images/**'
|
||||||
@@ -31,7 +32,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
java-version: 21
|
java-version: 21
|
||||||
distribution: temurin # pre-installed on ubuntu-latest
|
distribution: temurin # pre-installed on ubuntu-latest
|
||||||
cache: gradle
|
|
||||||
|
- name: Cache Gradle
|
||||||
|
uses: ./.github/actions/cache-gradle
|
||||||
|
|
||||||
- name: Check with Error Prone
|
- name: Check with Error Prone
|
||||||
run: ./gradlew errorprone
|
run: ./gradlew errorprone
|
||||||
|
|||||||
4
.github/workflows/fonts.yml
vendored
4
.github/workflows/fonts.yml
vendored
@@ -39,7 +39,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
java-version: 21
|
java-version: 21
|
||||||
distribution: temurin # pre-installed on ubuntu-latest
|
distribution: temurin # pre-installed on ubuntu-latest
|
||||||
cache: gradle
|
|
||||||
|
- name: Cache Gradle
|
||||||
|
uses: ./.github/actions/cache-gradle
|
||||||
|
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: ./gradlew :flatlaf-fonts-${{ matrix.font }}:build
|
run: ./gradlew :flatlaf-fonts-${{ matrix.font }}:build
|
||||||
|
|||||||
4
.github/workflows/natives.yml
vendored
4
.github/workflows/natives.yml
vendored
@@ -63,7 +63,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
java-version: 21
|
java-version: 21
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
cache: gradle
|
|
||||||
|
- name: Cache Gradle
|
||||||
|
uses: ./.github/actions/cache-gradle
|
||||||
|
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
# --no-daemon is necessary on Windows otherwise caching Gradle would fail with:
|
# --no-daemon is necessary on Windows otherwise caching Gradle would fail with:
|
||||||
|
|||||||
4
.github/workflows/pr-snapshots.yml
vendored
4
.github/workflows/pr-snapshots.yml
vendored
@@ -26,7 +26,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
java-version: 21
|
java-version: 21
|
||||||
distribution: temurin # pre-installed on ubuntu-latest
|
distribution: temurin # pre-installed on ubuntu-latest
|
||||||
cache: gradle
|
|
||||||
|
- name: Cache Gradle
|
||||||
|
uses: ./.github/actions/cache-gradle
|
||||||
|
|
||||||
- name: Publish PR snapshot to Sonatype Central
|
- name: Publish PR snapshot to Sonatype Central
|
||||||
run: >
|
run: >
|
||||||
|
|||||||
Reference in New Issue
Block a user