Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Coursier cache #74

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/binary-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ on:
type: string
required: false
default: ''
ignore-job-coursier-cache:
type: boolean
required: false
default: true
extra-coursier-cache-key:
type: string
required: false
default: ''
run-scheduled-in-forks:
type: boolean
required: false
Expand All @@ -39,6 +47,10 @@ jobs:
- name: Coursier Cache
id: coursier-cache
uses: coursier/cache-action@v6
with:
ignoreJob: ${{ inputs.ignore-job-coursier-cache }}
ignoreMatrix: true
extraKey: ${{ inputs.extra-coursier-cache-key }}

- name: Install Adoptium Temurin OpenJDK
uses: coursier/setup-action@v1
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/cmd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@ on:
type: string
required: false
default: ""
ignore-job-coursier-cache:
type: boolean
required: false
default: true
ignore-matrix-coursier-cache:
type: boolean
required: false
default: true
extra-coursier-cache-key:
type: string
required: false
default: ''
run-scheduled-in-forks:
type: boolean
required: false
Expand Down Expand Up @@ -106,6 +118,10 @@ jobs:
- name: Coursier Cache
id: coursier-cache
uses: coursier/cache-action@v6
with:
ignoreJob: ${{ inputs.ignore-job-coursier-cache }}
ignoreMatrix: ${{ inputs.ignore-matrix-coursier-cache }}
extraKey: ${{ inputs.extra-coursier-cache-key }}

- name: Gradle Cache
uses: burrunan/gradle-cache-action@v1
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ on:
type: string
required: false
default: ''
ignore-job-coursier-cache:
type: boolean
required: false
default: true
extra-coursier-cache-key:
type: string
required: false
default: ''
cmd:
type: string
required: false
Expand All @@ -40,6 +48,10 @@ jobs:
- name: Coursier Cache
id: coursier-cache
uses: coursier/cache-action@v6
with:
ignoreJob: ${{ inputs.ignore-job-coursier-cache }}
ignoreMatrix: true
extraKey: ${{ inputs.extra-coursier-cache-key }}

- name: Gradle Cache
uses: burrunan/gradle-cache-action@v1
Expand Down
63 changes: 35 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,24 @@ Every matrix dimension will be access by environment variable like `MATRIX_$(upp

**Parameters**:

| Parameter | Since | Required | Default | Description |
|------------------------|-------|--------------------|---------|-------------------------------------------------|
| ref | 2.0.0 | :heavy_minus_sign: | '' | Branch, tag or SHA for checkout |
| cmd | 2.0.0 | :exclamation: | - | Running command |
| java | 2.0.0 | :heavy_minus_sign: | 11 | _AdoptJDK_ version (space/comma delimited list) |
| java-index | 3.3.1 | :heavy_minus_sign: | '' | URL to JVM index source file |
| scala | 2.0.0 | :heavy_minus_sign: | '' | _Scala_ version (space/comma delimited list) |
| add-dimensions | 2.0.0 | :heavy_minus_sign: | '' | Other matrix dimensions (json object) |
| include | 2.0.0 | :heavy_minus_sign: | [] | Matrix include's (json object array) |
| exclude | 2.0.0 | :heavy_minus_sign: | [] | Matrix exclude's (json object array) |
| cache-key | 2.0.0 | :heavy_minus_sign: | '' | Key of custom cache |
| cache-path | 2.0.0 | :heavy_minus_sign: | '' | Path of custom cache |
| env | 2.0.0 | :heavy_minus_sign: | '' | Custom ENV vars |
| run-scheduled-in-forks | 3.1.1 | :heavy_minus_sign: | false | Run by schedule in fork |
| gradle-build-root | 3.3.0 | :heavy_minus_sign: | '' | Directory for Gradle builds |
| Parameter | Since | Required | Default | Description |
|------------------------------|-------|--------------------|---------|-------------------------------------------------|
| ref | 2.0.0 | :heavy_minus_sign: | '' | Branch, tag or SHA for checkout |
| cmd | 2.0.0 | :exclamation: | - | Running command |
| java | 2.0.0 | :heavy_minus_sign: | 11 | _AdoptJDK_ version (space/comma delimited list) |
| java-index | 3.3.1 | :heavy_minus_sign: | '' | URL to JVM index source file |
| scala | 2.0.0 | :heavy_minus_sign: | '' | _Scala_ version (space/comma delimited list) |
| add-dimensions | 2.0.0 | :heavy_minus_sign: | '' | Other matrix dimensions (json object) |
| include | 2.0.0 | :heavy_minus_sign: | [] | Matrix include's (json object array) |
| exclude | 2.0.0 | :heavy_minus_sign: | [] | Matrix exclude's (json object array) |
| cache-key | 2.0.0 | :heavy_minus_sign: | '' | Key of custom cache |
| cache-path | 2.0.0 | :heavy_minus_sign: | '' | Path of custom cache |
| env | 2.0.0 | :heavy_minus_sign: | '' | Custom ENV vars |
| run-scheduled-in-forks | 3.1.1 | :heavy_minus_sign: | false | Run by schedule in fork |
| gradle-build-root | 3.3.0 | :heavy_minus_sign: | '' | Directory for Gradle builds |
| ignore-job-coursier-cache | 3.4.0 | :heavy_minus_sign: | true | `ignoreJob` parameter for Coursier Cache |
| ignore-matrix-coursier-cache | 3.4.0 | :heavy_minus_sign: | true | `ignoreMatrix` parameter for Coursier Cache |
| extra-coursier-cache-key | 3.4.0 | :heavy_minus_sign: | '' | `extraKey` parameter for Coursier Cache |


**How to use**:
Expand Down Expand Up @@ -91,13 +94,15 @@ This workflow is used for publishing snapshots artifacts to [Sonatype Snapshots]

**Parameters**:

| Parameter | Since | Required | Default | Description |
|-------------------|-------|--------------------|----------------|---------------------------------|
| ref | 2.0.0 | :heavy_minus_sign: | '' | Branch, tag or SHA for checkout |
| java | 1.0.0 | :heavy_minus_sign: | 11 | _AdoptJDK_ version |
| java-index | 3.3.1 | :heavy_minus_sign: | '' | URL to JVM index source file |
| cmd | 3.3.0 | :heavy_minus_sign: | sbt ci-release | Running command |
| gradle-build-root | 3.3.0 | :heavy_minus_sign: | '' | Directory for Gradle builds |
| Parameter | Since | Required | Default | Description |
|---------------------------|-------|--------------------|----------------|------------------------------------------|
| ref | 2.0.0 | :heavy_minus_sign: | '' | Branch, tag or SHA for checkout |
| java | 1.0.0 | :heavy_minus_sign: | 11 | _AdoptJDK_ version |
| java-index | 3.3.1 | :heavy_minus_sign: | '' | URL to JVM index source file |
| cmd | 3.3.0 | :heavy_minus_sign: | sbt ci-release | Running command |
| gradle-build-root | 3.3.0 | :heavy_minus_sign: | '' | Directory for Gradle builds |
| ignore-job-coursier-cache | 3.4.0 | :heavy_minus_sign: | true | `ignoreJob` parameter for Coursier Cache |
| extra-coursier-cache-key | 3.4.0 | :heavy_minus_sign: | '' | `extraKey` parameter for Coursier Cache |

**How to use**:

Expand All @@ -121,12 +126,14 @@ This workflow is used for validate binary compatibility the current version.

**Parameters**:

| Parameter | Since | Required | Default | Description |
|------------------------|-------|--------------------|---------|---------------------------------|
| ref | 2.0.0 | :heavy_minus_sign: | '' | Branch, tag or SHA for checkout |
| java | 1.0.0 | :heavy_minus_sign: | 11 | _AdoptJDK_ version |
| java-index | 3.3.1 | :heavy_minus_sign: | '' | URL to JVM index source file |
| run-scheduled-in-forks | 3.1.1 | :heavy_minus_sign: | false | Run by schedule in fork |
| Parameter | Since | Required | Default | Description |
|---------------------------|-------|--------------------|---------|------------------------------------------|
| ref | 2.0.0 | :heavy_minus_sign: | '' | Branch, tag or SHA for checkout |
| java | 1.0.0 | :heavy_minus_sign: | 11 | _AdoptJDK_ version |
| java-index | 3.3.1 | :heavy_minus_sign: | '' | URL to JVM index source file |
| run-scheduled-in-forks | 3.1.1 | :heavy_minus_sign: | false | Run by schedule in fork |
| ignore-job-coursier-cache | 3.4.0 | :heavy_minus_sign: | true | `ignoreJob` parameter for Coursier Cache |
| extra-coursier-cache-key | 3.4.0 | :heavy_minus_sign: | '' | `extraKey` parameter for Coursier Cache |

**How to use**:

Expand Down