Compare commits

...

274 Commits

Author SHA1 Message Date
Daz DeBoer
0bdd871935 Pin version in ci-combine-bot-prs.yml 2024-12-17 18:26:12 -07:00
daz
34d6b69184 Use latest DV plugin version in docs 2024-12-17 18:13:21 -07:00
Daz DeBoer
21ecf4fc5b Use latest dependency-graph plugin (#489) 2024-12-17 18:10:51 -07:00
bigdaz
d9b1f176ee [bot] Update dist directory 2024-12-18 01:00:47 +00:00
Daz DeBoer
5c7e362ae3 Remove deprecation warning from init-script (#491) 2024-12-17 17:59:42 -07:00
github-actions[bot]
4213e7826a Update known wrapper checksums (#488)
Automatically generated pull request to update the known wrapper
checksums.

In case of conflicts, manually run the workflow from the [Actions
tab](https://github.com/gradle/actions/actions/workflows/update-checksums-file.yml),
the changes will then be force-pushed onto this pull request branch.
Do not manually update the pull request branch; those changes might get
overwritten.

> [!IMPORTANT]  
> GitHub workflows have not been executed for this pull request yet.
Before merging, close and then directly reopen this pull request to
trigger the workflows.

Co-authored-by: bigdaz <179734+bigdaz@users.noreply.github.com>
2024-12-17 17:59:00 -07:00
Daz DeBoer
59d7e81070 Attempt to limit failures in wrapper-validation tests (#490)
- Reduce requests involved in checksums.retryTest
- Reduce requests involved in validate test
- Fetch checksum values in batches
2024-12-17 17:58:41 -07:00
dependabot[bot]
bc78598590 Bump github/codeql-action in the github-actions group across 1 directory
Bumps the github-actions group with 1 update in the / directory: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 3.27.7 to 3.27.9
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](babb554ede...df409f7d92)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-17 11:46:27 -07:00
dependabot[bot]
9934046c6d Bump the gradle group across 1 directory with 2 updates
Bumps the gradle group with 2 updates in the /.github/workflow-samples/kotlin-dsl directory: [com.google.guava:guava](https://github.com/google/guava) and [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5).


Updates `com.google.guava:guava` from 33.3.1-jre to 33.4.0-jre
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

Updates `org.junit.jupiter:junit-jupiter` from 5.11.3 to 5.11.4
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.3...r5.11.4)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: gradle
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: gradle
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-17 11:45:30 -07:00
bigdaz
3839b20885 [bot] Update dist directory 2024-12-13 16:04:31 +00:00
bigdaz
b8ed6d0a14 Update known wrapper checksums 2024-12-13 09:03:22 -07:00
bot-githubaction
eda5a3331f Bump references to Develocity Gradle plugin from 3.18.2 to 3.19 2024-12-13 09:02:59 -07:00
daz
e0281833fa Fix unit test to deal with new Gradle releases 2024-12-13 08:56:11 -07:00
Daz DeBoer
b8d9a58677 Document wrapper-validation with Git LFS 2024-12-12 12:04:12 -07:00
bot-githubaction
ec885c4918 Bump Gradle Wrapper from 8.10.2 to 8.11.1.
Release notes of Gradle 8.11.1 can be found here:
https://docs.gradle.org/8.11.1/release-notes.html

Signed-off-by: bot-githubaction <bot-githubaction@gradle.com>
2024-12-12 09:23:31 -07:00
bigdaz
8be3454330 [bot] Update dist directory 2024-12-11 19:34:07 +00:00
Daz DeBoer
f25f0d469f Dependency updates (#480) 2024-12-11 12:32:44 -07:00
daz
69215f1c52 Restrict permissions for combine-prs job 2024-12-11 12:31:33 -07:00
Daz DeBoer
df34468a37 Bump com.fasterxml.jackson.dataformat:jackson-dataformat-smile from 2.18.1 to 2.18.2 in /sources/test/init-scripts in the gradle group across 1 directory (#478)
Bumps the gradle group with 1 update in the /sources/test/init-scripts
directory:
[com.fasterxml.jackson.dataformat:jackson-dataformat-smile](https://github.com/FasterXML/jackson-dataformats-binary).

Updates `com.fasterxml.jackson.dataformat:jackson-dataformat-smile` from
2.18.1 to 2.18.2
<details>
<summary>Commits</summary>
<ul>
<li><a
href="147bc6024b"><code>147bc60</code></a>
[maven-release-plugin] prepare release
jackson-dataformats-binary-2.18.2</li>
<li><a
href="92648ab980"><code>92648ab</code></a>
Prep for 2.18.2</li>
<li><a
href="d31d695767"><code>d31d695</code></a>
Merge branch '2.17' into 2.18</li>
<li><a
href="a7232c691a"><code>a7232c6</code></a>
Back to snapshot dep</li>
<li><a
href="b362d85402"><code>b362d85</code></a>
[maven-release-plugin] prepare for next development iteration</li>
<li><a
href="d817f53ab6"><code>d817f53</code></a>
[maven-release-plugin] prepare release
jackson-dataformats-binary-2.17.3</li>
<li><a
href="d88c088671"><code>d88c088</code></a>
Prep for 2.17.3</li>
<li><a
href="fa5abd6573"><code>fa5abd6</code></a>
Back to snapshot dep</li>
<li><a
href="d048e2fd91"><code>d048e2f</code></a>
[maven-release-plugin] prepare for next development iteration</li>
<li>See full diff in <a
href="https://github.com/FasterXML/jackson-dataformats-binary/compare/jackson-dataformats-binary-2.18.1...jackson-dataformats-binary-2.18.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.fasterxml.jackson.dataformat:jackson-dataformat-smile&package-manager=gradle&previous-version=2.18.1&new-version=2.18.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>
2024-12-11 12:23:14 -07:00
Daz DeBoer
f984dd99ad Update develocity-injection init script to v1.1 (#471)
Updates the develocity-injection init script to the latest reference
script content
from https://github.com/gradle/develocity-ci-injection.
2024-12-11 12:22:42 -07:00
daz
aef30aae52 Tidy up patch file 2024-12-11 12:16:54 -07:00
Daz DeBoer
4c8d89b23d Update @actions/cache4.0.0 and patch (#479)
I have updated the version of actions/cache to 4.0.0 and updated the
patch file.
2024-12-11 11:10:21 -07:00
daz
088ea2ca03 Update NPM dependencies 2024-12-11 11:06:56 -07:00
dependabot[bot]
94bb6cf7ce Bump com.fasterxml.jackson.dataformat:jackson-dataformat-smile
Bumps the gradle group with 1 update in the /sources/test/init-scripts directory: [com.fasterxml.jackson.dataformat:jackson-dataformat-smile](https://github.com/FasterXML/jackson-dataformats-binary).


Updates `com.fasterxml.jackson.dataformat:jackson-dataformat-smile` from 2.18.1 to 2.18.2
- [Commits](https://github.com/FasterXML/jackson-dataformats-binary/compare/jackson-dataformats-binary-2.18.1...jackson-dataformats-binary-2.18.2)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.dataformat:jackson-dataformat-smile
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: gradle
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-11 17:55:02 +00:00
Yuki Mima
ed3e5e5c8a Merge branch 'main' into update-cacheV4 2024-12-12 02:53:44 +09:00
Daz DeBoer
ef2fae3749 Bump the github-actions group across 1 directory with 2 updates (#474)
Bumps the github-actions group with 2 updates in the / directory:
[tj-actions/changed-files](https://github.com/tj-actions/changed-files)
and [github/codeql-action](https://github.com/github/codeql-action).

Updates `tj-actions/changed-files` from 45.0.4 to 45.0.5
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tj-actions/changed-files/releases">tj-actions/changed-files's
releases</a>.</em></p>
<blockquote>
<h2>v45.0.5</h2>
<h2>What's Changed</h2>
<ul>
<li>Upgraded to v45.0.4 by <a
href="https://github.com/tj-actions-bot"><code>@​tj-actions-bot</code></a>
in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/2344">tj-actions/changed-files#2344</a></li>
<li>chore(deps): lock file maintenance by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/2345">tj-actions/changed-files#2345</a></li>
<li>chore(deps): update dependency <code>@​vercel/ncc</code> to v0.38.3
by <a href="https://github.com/renovate"><code>@​renovate</code></a> in
<a
href="https://redirect.github.com/tj-actions/changed-files/pull/2348">tj-actions/changed-files#2348</a></li>
<li>chore(deps): lock file maintenance by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/2349">tj-actions/changed-files#2349</a></li>
<li>chore(deps): update dependency <code>@​types/node</code> to v22.9.1
by <a href="https://github.com/renovate"><code>@​renovate</code></a> in
<a
href="https://redirect.github.com/tj-actions/changed-files/pull/2352">tj-actions/changed-files#2352</a></li>
<li>chore(deps): bump yaml from 2.6.0 to 2.6.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/2353">tj-actions/changed-files#2353</a></li>
<li>chore(deps-dev): bump eslint-plugin-github from 5.0.2 to 5.1.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/2356">tj-actions/changed-files#2356</a></li>
<li>chore(deps): update dependency typescript to v5.7.2 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/2357">tj-actions/changed-files#2357</a></li>
<li>chore(deps): update dependency <code>@​types/node</code> to v22.9.2
by <a href="https://github.com/renovate"><code>@​renovate</code></a> in
<a
href="https://redirect.github.com/tj-actions/changed-files/pull/2358">tj-actions/changed-files#2358</a></li>
<li>chore(deps): update dependency <code>@​types/node</code> to v22.9.3
by <a href="https://github.com/renovate"><code>@​renovate</code></a> in
<a
href="https://redirect.github.com/tj-actions/changed-files/pull/2359">tj-actions/changed-files#2359</a></li>
<li>chore(deps): lock file maintenance by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/2360">tj-actions/changed-files#2360</a></li>
<li>chore(deps): update dependency <code>@​types/node</code> to v22.9.4
by <a href="https://github.com/renovate"><code>@​renovate</code></a> in
<a
href="https://redirect.github.com/tj-actions/changed-files/pull/2361">tj-actions/changed-files#2361</a></li>
<li>chore(deps): update dependency <code>@​types/node</code> to v22.10.0
by <a href="https://github.com/renovate"><code>@​renovate</code></a> in
<a
href="https://redirect.github.com/tj-actions/changed-files/pull/2364">tj-actions/changed-files#2364</a></li>
<li>chore(deps): update dependency prettier to v3.4.0 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/2365">tj-actions/changed-files#2365</a></li>
<li>chore(deps): update dependency prettier to v3.4.1 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/2366">tj-actions/changed-files#2366</a></li>
<li>chore(deps): update dependency eslint-plugin-github to v5.1.3 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/2367">tj-actions/changed-files#2367</a></li>
<li>chore(deps): update dependency <code>@​types/node</code> to v22.10.1
by <a href="https://github.com/renovate"><code>@​renovate</code></a> in
<a
href="https://redirect.github.com/tj-actions/changed-files/pull/2368">tj-actions/changed-files#2368</a></li>
<li>chore(deps): lock file maintenance by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/2369">tj-actions/changed-files#2369</a></li>
<li>chore(deps): update dependency prettier to v3.4.2 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/2370">tj-actions/changed-files#2370</a></li>
<li>chore(deps): update dependency eslint-plugin-github to v5.1.4 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/2372">tj-actions/changed-files#2372</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/tj-actions/changed-files/compare/v45...v45.0.5">https://github.com/tj-actions/changed-files/compare/v45...v45.0.5</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tj-actions/changed-files/blob/main/HISTORY.md">tj-actions/changed-files's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h1><a
href="https://github.com/tj-actions/changed-files/compare/v45.0.4...v45.0.5">45.0.5</a>
- (2024-12-05)</h1>
<h2><!-- raw HTML omitted -->⚙️ Miscellaneous Tasks</h2>
<ul>
<li><strong>deps:</strong> Update dependency eslint-plugin-github to
v5.1.4 (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2372">#2372</a>)
(<a
href="bab30c2299">bab30c2</a>)
- (renovate[bot])</li>
<li><strong>deps:</strong> Update dependency prettier to v3.4.2 (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2370">#2370</a>)
(<a
href="657a3f914f">657a3f9</a>)
- (renovate[bot])</li>
<li><strong>deps:</strong> Lock file maintenance (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2369">#2369</a>)
(<a
href="05f0aba931">05f0aba</a>)
- (renovate[bot])</li>
<li><strong>deps:</strong> Update dependency <code>@​types/node</code>
to v22.10.1 (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2368">#2368</a>)
(<a
href="462396174f">4623961</a>)
- (renovate[bot])</li>
<li><strong>deps:</strong> Update dependency eslint-plugin-github to
v5.1.3 (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2367">#2367</a>)
(<a
href="c19a7eb771">c19a7eb</a>)
- (renovate[bot])</li>
<li><strong>deps:</strong> Update dependency prettier to v3.4.1 (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2366">#2366</a>)
(<a
href="c288441a7d">c288441</a>)
- (renovate[bot])</li>
<li><strong>deps:</strong> Update dependency prettier to v3.4.0 (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2365">#2365</a>)
(<a
href="1d6ea46cac">1d6ea46</a>)
- (renovate[bot])</li>
<li><strong>deps:</strong> Update dependency <code>@​types/node</code>
to v22.10.0 (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2364">#2364</a>)
(<a
href="02b41f5ff9">02b41f5</a>)
- (renovate[bot])</li>
<li><strong>deps:</strong> Update dependency <code>@​types/node</code>
to v22.9.4 (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2361">#2361</a>)
(<a
href="b4a4dcabce">b4a4dca</a>)
- (renovate[bot])</li>
<li><strong>deps:</strong> Lock file maintenance (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2360">#2360</a>)
(<a
href="602aacf949">602aacf</a>)
- (renovate[bot])</li>
<li><strong>deps:</strong> Update dependency <code>@​types/node</code>
to v22.9.3 (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2359">#2359</a>)
(<a
href="51290e039a">51290e0</a>)
- (renovate[bot])</li>
<li><strong>deps:</strong> Update dependency <code>@​types/node</code>
to v22.9.2 (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2358">#2358</a>)
(<a
href="b4badd8cce">b4badd8</a>)
- (renovate[bot])</li>
<li><strong>deps:</strong> Update dependency typescript to v5.7.2 (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2357">#2357</a>)
(<a
href="652b4c06e8">652b4c0</a>)
- (renovate[bot])</li>
<li><strong>deps-dev:</strong> Bump eslint-plugin-github from 5.0.2 to
5.1.1 (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2356">#2356</a>)
(<a
href="0b7a421316">0b7a421</a>)
- (dependabot[bot])</li>
<li><strong>deps:</strong> Bump yaml from 2.6.0 to 2.6.1 (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2353">#2353</a>)
(<a
href="b26581aca1">b26581a</a>)
- (dependabot[bot])</li>
<li><strong>deps:</strong> Update dependency <code>@​types/node</code>
to v22.9.1 (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2352">#2352</a>)
(<a
href="43e6b45c5d">43e6b45</a>)
- (renovate[bot])</li>
<li><strong>deps:</strong> Lock file maintenance (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2349">#2349</a>)
(<a
href="fe1bc0e3d3">fe1bc0e</a>)
- (renovate[bot])</li>
<li><strong>deps:</strong> Update dependency <code>@​vercel/ncc</code>
to v0.38.3 (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2348">#2348</a>)
(<a
href="d7917c6584">d7917c6</a>)
- (renovate[bot])</li>
<li><strong>deps:</strong> Lock file maintenance (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2345">#2345</a>)
(<a
href="3f646a3549">3f646a3</a>)
- (renovate[bot])</li>
</ul>
<h2><!-- raw HTML omitted -->⬆️ Upgrades</h2>
<ul>
<li>Upgraded to v45.0.4 (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2344">#2344</a>)</li>
</ul>
<p>Co-authored-by: jackton1 <a
href="mailto:17484350+jackton1@users.noreply.github.com">17484350+jackton1@users.noreply.github.com</a>
(<a
href="6809677b7a">6809677</a>)
- (tj-actions[bot])</p>
<h1><a
href="https://github.com/tj-actions/changed-files/compare/v45.0.3...v45.0.4">45.0.4</a>
- (2024-11-05)</h1>
<h2><!-- raw HTML omitted -->🚀 Features</h2>
<ul>
<li>Prevent ignore files warning (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2318">#2318</a>)
(<a
href="1f772e919b">1f772e9</a>)
- (Tonye Jack)</li>
</ul>
<h2><!-- raw HTML omitted -->🐛 Bug Fixes</h2>
<ul>
<li><strong>deps:</strong> Update dependency <code>@​actions/core</code>
to v1.11.1 (<a
href="4d0aab94b6">4d0aab9</a>)
- (renovate[bot])</li>
</ul>
<h2><!-- raw HTML omitted --> Add</h2>
<ul>
<li>Added missing changes and modified dist assets.
(<a
href="9d7201ded6">9d7201d</a>)
- (GitHub Action)</li>
<li>Added missing changes and modified dist assets.
(<a
href="0104c75ccc">0104c75</a>)
- (GitHub Action)</li>
</ul>
<h2><!-- raw HTML omitted -->📝 Other</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="bab30c2299"><code>bab30c2</code></a>
chore(deps): update dependency eslint-plugin-github to v5.1.4 (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2372">#2372</a>)</li>
<li><a
href="657a3f914f"><code>657a3f9</code></a>
chore(deps): update dependency prettier to v3.4.2 (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2370">#2370</a>)</li>
<li><a
href="05f0aba931"><code>05f0aba</code></a>
chore(deps): lock file maintenance (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2369">#2369</a>)</li>
<li><a
href="462396174f"><code>4623961</code></a>
chore(deps): update dependency <code>@​types/node</code> to v22.10.1 (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2368">#2368</a>)</li>
<li><a
href="c19a7eb771"><code>c19a7eb</code></a>
chore(deps): update dependency eslint-plugin-github to v5.1.3 (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2367">#2367</a>)</li>
<li><a
href="c288441a7d"><code>c288441</code></a>
chore(deps): update dependency prettier to v3.4.1 (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2366">#2366</a>)</li>
<li><a
href="1d6ea46cac"><code>1d6ea46</code></a>
chore(deps): update dependency prettier to v3.4.0 (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2365">#2365</a>)</li>
<li><a
href="02b41f5ff9"><code>02b41f5</code></a>
chore(deps): update dependency <code>@​types/node</code> to v22.10.0 (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2364">#2364</a>)</li>
<li><a
href="b4a4dcabce"><code>b4a4dca</code></a>
chore(deps): update dependency <code>@​types/node</code> to v22.9.4 (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2361">#2361</a>)</li>
<li><a
href="602aacf949"><code>602aacf</code></a>
chore(deps): lock file maintenance (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/2360">#2360</a>)</li>
<li>Additional commits viewable in <a
href="4edd678ac3...bab30c2299">compare
view</a></li>
</ul>
</details>
<br />

Updates `github/codeql-action` from 3.27.4 to 3.27.7
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/github/codeql-action/releases">github/codeql-action's
releases</a>.</em></p>
<blockquote>
<h2>v3.27.7</h2>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<p>Note that the only difference between <code>v2</code> and
<code>v3</code> of the CodeQL Action is the node version they support,
with <code>v3</code> running on node 20 while we continue to release
<code>v2</code> to support running on node 16. For example
<code>3.22.11</code> was the first <code>v3</code> release and is
functionally identical to <code>2.22.11</code>. This approach ensures an
easy way to track exactly which features are included in different
versions, indicated by the minor and patch version numbers.</p>
<h2>3.27.7 - 10 Dec 2024</h2>
<ul>
<li>We are rolling out a change in December 2024 that will extract the
CodeQL bundle directly to the toolcache to improve performance. <a
href="https://redirect.github.com/github/codeql-action/pull/2631">#2631</a></li>
<li>Update default CodeQL bundle version to 2.20.0. <a
href="https://redirect.github.com/github/codeql-action/pull/2636">#2636</a></li>
</ul>
<p>See the full <a
href="https://github.com/github/codeql-action/blob/v3.27.7/CHANGELOG.md">CHANGELOG.md</a>
for more information.</p>
<h2>v3.27.6</h2>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<p>Note that the only difference between <code>v2</code> and
<code>v3</code> of the CodeQL Action is the node version they support,
with <code>v3</code> running on node 20 while we continue to release
<code>v2</code> to support running on node 16. For example
<code>3.22.11</code> was the first <code>v3</code> release and is
functionally identical to <code>2.22.11</code>. This approach ensures an
easy way to track exactly which features are included in different
versions, indicated by the minor and patch version numbers.</p>
<h2>3.27.6 - 03 Dec 2024</h2>
<ul>
<li>Update default CodeQL bundle version to 2.19.4. <a
href="https://redirect.github.com/github/codeql-action/pull/2626">#2626</a></li>
</ul>
<p>See the full <a
href="https://github.com/github/codeql-action/blob/v3.27.6/CHANGELOG.md">CHANGELOG.md</a>
for more information.</p>
<h2>v3.27.5</h2>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<p>Note that the only difference between <code>v2</code> and
<code>v3</code> of the CodeQL Action is the node version they support,
with <code>v3</code> running on node 20 while we continue to release
<code>v2</code> to support running on node 16. For example
<code>3.22.11</code> was the first <code>v3</code> release and is
functionally identical to <code>2.22.11</code>. This approach ensures an
easy way to track exactly which features are included in different
versions, indicated by the minor and patch version numbers.</p>
<h2>3.27.5 - 19 Nov 2024</h2>
<p>No user facing changes.</p>
<p>See the full <a
href="https://github.com/github/codeql-action/blob/v3.27.5/CHANGELOG.md">CHANGELOG.md</a>
for more information.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/github/codeql-action/blob/main/CHANGELOG.md">github/codeql-action's
changelog</a>.</em></p>
<blockquote>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<p>Note that the only difference between <code>v2</code> and
<code>v3</code> of the CodeQL Action is the node version they support,
with <code>v3</code> running on node 20 while we continue to release
<code>v2</code> to support running on node 16. For example
<code>3.22.11</code> was the first <code>v3</code> release and is
functionally identical to <code>2.22.11</code>. This approach ensures an
easy way to track exactly which features are included in different
versions, indicated by the minor and patch version numbers.</p>
<h2>[UNRELEASED]</h2>
<p>No user facing changes.</p>
<h2>3.27.7 - 10 Dec 2024</h2>
<ul>
<li>We are rolling out a change in December 2024 that will extract the
CodeQL bundle directly to the toolcache to improve performance. <a
href="https://redirect.github.com/github/codeql-action/pull/2631">#2631</a></li>
<li>Update default CodeQL bundle version to 2.20.0. <a
href="https://redirect.github.com/github/codeql-action/pull/2636">#2636</a></li>
</ul>
<h2>3.27.6 - 03 Dec 2024</h2>
<ul>
<li>Update default CodeQL bundle version to 2.19.4. <a
href="https://redirect.github.com/github/codeql-action/pull/2626">#2626</a></li>
</ul>
<h2>3.27.5 - 19 Nov 2024</h2>
<p>No user facing changes.</p>
<h2>3.27.4 - 14 Nov 2024</h2>
<p>No user facing changes.</p>
<h2>3.27.3 - 12 Nov 2024</h2>
<p>No user facing changes.</p>
<h2>3.27.2 - 12 Nov 2024</h2>
<ul>
<li>Fixed an issue where setting up the CodeQL tools would sometimes
fail with the message &quot;Invalid value 'undefined' for header
'authorization'&quot;. <a
href="https://redirect.github.com/github/codeql-action/pull/2590">#2590</a></li>
</ul>
<h2>3.27.1 - 08 Nov 2024</h2>
<ul>
<li>The CodeQL Action now downloads bundles compressed using Zstandard
on GitHub Enterprise Server when using Linux or macOS runners. This
speeds up the installation of the CodeQL tools. This feature is already
available to GitHub.com users. <a
href="https://redirect.github.com/github/codeql-action/pull/2573">#2573</a></li>
<li>Update default CodeQL bundle version to 2.19.3. <a
href="https://redirect.github.com/github/codeql-action/pull/2576">#2576</a></li>
</ul>
<h2>3.27.0 - 22 Oct 2024</h2>
<ul>
<li>Bump the minimum CodeQL bundle version to 2.14.6. <a
href="https://redirect.github.com/github/codeql-action/pull/2549">#2549</a></li>
<li>Fix an issue where the <code>upload-sarif</code> Action would fail
with &quot;upload-sarif post-action step failed: Input required and not
supplied: token&quot; when called in a composite Action that had a
different set of inputs to the ones expected by the
<code>upload-sarif</code> Action. <a
href="https://redirect.github.com/github/codeql-action/pull/2557">#2557</a></li>
<li>Update default CodeQL bundle version to 2.19.2. <a
href="https://redirect.github.com/github/codeql-action/pull/2552">#2552</a></li>
</ul>
<h2>3.26.13 - 14 Oct 2024</h2>
<p>No user facing changes.</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="babb554ede"><code>babb554</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/2640">#2640</a>
from github/update-v3.27.7-89757925c</li>
<li><a
href="0a5a1c0d75"><code>0a5a1c0</code></a>
Update changelog for v3.27.7</li>
<li><a
href="89757925c7"><code>8975792</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/2637">#2637</a>
from github/dependabot/npm_and_yarn/npm-3bf4e64efa</li>
<li><a
href="d853bec339"><code>d853bec</code></a>
Update checked-in dependencies</li>
<li><a
href="aab34601c1"><code>aab3460</code></a>
Bump the npm group with 4 updates</li>
<li><a
href="0d3e640d0c"><code>0d3e640</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/2636">#2636</a>
from github/update-bundle/codeql-bundle-v2.20.0</li>
<li><a
href="b13515409a"><code>b135154</code></a>
Merge branch 'main' into update-bundle/codeql-bundle-v2.20.0</li>
<li><a
href="3d09005851"><code>3d09005</code></a>
Add changelog note</li>
<li><a
href="8ba1205033"><code>8ba1205</code></a>
Update default bundle to codeql-bundle-v2.20.0</li>
<li><a
href="6f9e628e6f"><code>6f9e628</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/2634">#2634</a>
from github/angelapwen/stop-using-artifact-flag</li>
<li>Additional commits viewable in <a
href="ea9e4e3799...babb554ede">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>
2024-12-11 10:51:13 -07:00
daz
97d952f5cd Update tests for changed init-script logging 2024-12-11 10:49:42 -07:00
amyu
c4b167c4e2 Merge branch 'main' of github.com:amyu/actions into update-cacheV4 2024-12-12 02:24:01 +09:00
amyu
7e2474009a update actions/cache4.0.0 and migrate patch 2024-12-12 02:23:20 +09:00
Bot Githubaction
d0ca1a2b26 Update develocity-injection init script to v1.1
Updates the develocity-injection init script to the latest reference script content
from https://github.com/gradle/develocity-ci-injection.
2024-12-11 10:21:37 -07:00
bigdaz
37bb14cb36 [bot] Update dist directory 2024-12-11 17:17:35 +00:00
Daz DeBoer
06e95bfb12 Merge branch 'main' into dependabot/github_actions/github-actions-e9dd73a904 2024-12-11 10:17:04 -07:00
Daz DeBoer
6089ee95bf Update to Gradle 8.11.1 (#477) 2024-12-11 10:16:28 -07:00
Daz DeBoer
b80eee1bc3 Remove schedule for combine-prs until it's working properley 2024-12-11 10:05:44 -07:00
daz
51109c9e9e Update to Gradle 8.11.1 2024-12-11 10:04:45 -07:00
bigdaz
bb85ec9597 [bot] Update dist directory 2024-12-11 16:52:45 +00:00
Daz DeBoer
e9e94d8112 Update known wrapper checksums (#462)
Automatically generated pull request to update the known wrapper
checksums.

In case of conflicts, manually run the workflow from the [Actions
tab](https://github.com/gradle/actions/actions/workflows/update-checksums-file.yml),
the changes will then be force-pushed onto this pull request branch.
Do not manually update the pull request branch; those changes might get
overwritten.

> [!IMPORTANT]  
> GitHub workflows have not been executed for this pull request yet.
Before merging, close and then directly reopen this pull request to
trigger the workflows.

Co-authored-by: bigdaz <179734+bigdaz@users.noreply.github.com>
2024-12-11 09:51:41 -07:00
daz
686515ed83 Fix combine PRs workflow 2024-12-11 09:47:11 -07:00
Daz DeBoer
fc2804f7b6 Add workflow to combine wrapperbot PRs (#476) 2024-12-11 09:08:25 -07:00
daz
ce25fde741 Add workflow to combine wrapperbot PRs 2024-12-11 09:07:09 -07:00
dependabot[bot]
1c71d2134f Bump the github-actions group across 1 directory with 2 updates
Bumps the github-actions group with 2 updates in the / directory: [tj-actions/changed-files](https://github.com/tj-actions/changed-files) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `tj-actions/changed-files` from 45.0.4 to 45.0.5
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](4edd678ac3...bab30c2299)

Updates `github/codeql-action` from 3.27.4 to 3.27.7
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](ea9e4e3799...babb554ede)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-11 14:52:10 +00:00
Daz DeBoer
35af9b8791 Simplify Dependabot config using 'directories' 2024-12-11 07:50:05 -07:00
Daz DeBoer
375738a38b Add link to GitHub docs 2024-12-10 10:50:29 -07:00
Sebastian Dyroff
00781cbaae Fix typo in documentation 2024-12-09 08:41:16 -07:00
bigdaz
2894ab49ef Update known wrapper checksums 2024-11-23 05:31:40 +00:00
dependabot[bot]
4ba34e96c5 Bump gradle/actions from 4.2.0 to 4.2.1 in the github-actions group
Bumps the github-actions group with 1 update: [gradle/actions](https://github.com/gradle/actions).


Updates `gradle/actions` from 4.2.0 to 4.2.1
- [Release notes](https://github.com/gradle/actions/releases)
- [Commits](473878a77f...cc4fc85e6b)

---
updated-dependencies:
- dependency-name: gradle/actions
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-19 09:53:32 -07:00
dependabot[bot]
e29bc6725a Bump cross-spawn in /sources
Bumps  and [cross-spawn](https://github.com/moxystudio/node-cross-spawn). These dependencies needed to be updated together.

Updates `cross-spawn` from 7.0.3 to 7.0.6
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

Updates `cross-spawn` from 6.0.5 to 7.0.6
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-19 09:53:22 -07:00
dependabot[bot]
cc4fc85e6b Bump @vercel/ncc in /sources in the npm-dependencies group
Bumps the npm-dependencies group in /sources with 1 update: [@vercel/ncc](https://github.com/vercel/ncc).


Updates `@vercel/ncc` from 0.38.2 to 0.38.3
- [Release notes](https://github.com/vercel/ncc/releases)
- [Commits](https://github.com/vercel/ncc/compare/0.38.2...0.38.3)

---
updated-dependencies:
- dependency-name: "@vercel/ncc"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-18 10:36:18 -07:00
dependabot[bot]
e6a814661a Bump the github-actions group with 3 updates
Bumps the github-actions group with 3 updates: [actions/checkout](https://github.com/actions/checkout), [github/codeql-action](https://github.com/github/codeql-action) and [actions/upload-artifact](https://github.com/actions/upload-artifact).


Updates `actions/checkout` from 4.1.7 to 4.2.2
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.1.7...11bd71901bbe5b1630ceea73d27597364c9af683)

Updates `github/codeql-action` from 3.26.6 to 3.27.4
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3.26.6...ea9e4e37992a54ee68a9622e985e60c8e8f12d9f)

Updates `actions/upload-artifact` from 4.4.0 to 4.4.3
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](50769540e7...b4b15b8c7c)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-18 10:35:58 -07:00
daz
e55599fc4d Adapt build-result-capture script for GE plugin 3.17+
The build-result-capture.init.gradle script was making some assumptions about
extensions and plugin application that do not apply with the newest GE plugin.

Fixes #449
2024-11-17 07:26:28 -07:00
bigdaz
d85b0068a7 [bot] Update dist directory 2024-11-16 20:53:42 +00:00
Daz DeBoer
a09a3104fe Develocity injection fixes (#448) 2024-11-16 13:52:38 -07:00
daz
333e9d9750 Do not ignore input parameters when build-scan-publish is enabled
Fixes #447
2024-11-15 14:35:41 -07:00
daz
2aa49bf6a9 Set the correct env var for develocity-ccud-plugin-version
Fixes #446
2024-11-15 14:31:56 -07:00
daz
9ab6ee6757 Bump to version 2.0.2 of CCUDGP 2024-11-15 14:10:13 -07:00
Daz DeBoer
fb5165dcd4 Add note about cache-encryption-key being required 2024-11-14 21:09:29 -07:00
daz
0e27ea7e6c Improve local development script
- Avoid running `npm install` on every execution
- Add a separate `install` task that runs `npm clean-install`
2024-11-14 17:00:58 -07:00
daz
f4845d289c Use npm clean-install 2024-11-14 16:36:23 -07:00
bigdaz
094f2191c5 [bot] Update dist directory 2024-11-14 22:45:12 +00:00
Daz DeBoer
83709b49fe Fix checksum test by reducing network calls (#444)
This test was originally starting with an empty set of checksums,
leading to the download of a checksum for every released and snapshot
version. This resulted in in sporadic test failures.

We now start with a known set of checksums and ensure that those that
are missing are downloaded. This involved some refactoring and
improvement in the way snapshot checksums are processed.
2024-11-14 15:44:07 -07:00
Daz DeBoer
5f21a9bb99 Bump Gradle from 8.10.2 to 8.11 (#443)
Co-authored-by: bot-githubaction <bot-githubaction@gradle.com>
2024-11-14 13:48:42 -07:00
Daz DeBoer
52ee405746 Run CodeQL on all commits 2024-11-14 13:44:22 -07:00
Daz DeBoer
7f20d0bf71 Pin versions for GitHub Actions (#442) 2024-11-14 13:24:19 -07:00
daz
b6bc8c2f17 Pin gradle/actions versions 2024-11-14 13:05:02 -07:00
daz
b12c3a65f2 Pin version of 3rd party actions 2024-11-14 12:35:29 -07:00
daz
d191577859 Pin actions/setup-node@v4 2024-11-14 12:23:02 -07:00
daz
e726a12472 Pin actions/setup-java@v4 2024-11-14 12:21:03 -07:00
daz
d30cc9ecf2 Pin actions/checkout@v4 2024-11-14 12:19:48 -07:00
daz
d0efa7b0e7 Avoid duplicate actions/setup-java 2024-11-14 12:12:54 -07:00
daz
8422a6a674 Avoid running workflow on forks 2024-11-14 11:44:20 -07:00
daz
19ff74e0a6 Revert "Disable uploading OSSF scorecard to GitHub Security"
This reverts commit 1e2142185e.
2024-11-14 11:31:03 -07:00
bigdaz
e03a1f068e [bot] Update dist directory 2024-11-14 16:27:59 +00:00
bot-githubaction
084b95f65a Bump references to Develocity Gradle plugin from 3.18.1 to 3.18.2 2024-11-14 09:26:53 -07:00
Daz DeBoer
1e2142185e Disable uploading OSSF scorecard to GitHub Security 2024-11-13 19:11:45 -07:00
Daz DeBoer
07e0f1c008 Limit token permissions in GitHub workflows (#440)
See
ea7e27ed41/docs/checks.md (token-permissions)
2024-11-13 19:01:45 -07:00
daz
af45dcfe3c Add wrapper-validation workflow
Although we run `setup-gradle` with all/most wrapper files, this global
workflow will ensure that all wrapper files in the repo are valid.
(This should help with the OSSF scorecard)
2024-11-13 18:46:57 -07:00
daz
d8b3a9fb11 Rename OSSF scorecard workflow 2024-11-13 18:46:51 -07:00
nitrocode
9e8f2bcf56 docs: add badge 2024-11-13 16:37:41 -07:00
nitrocode
5ac3e361a2 ci: add scorecard 2024-11-13 16:37:41 -07:00
bigdaz
4a0951b3dc [bot] Update dist directory 2024-11-12 18:29:16 +00:00
daz
48353a25ca Do not fail wrapper-validation on filename with illegal characters 2024-11-12 11:28:09 -07:00
bigdaz
473878a77f [bot] Update dist directory 2024-11-12 03:55:37 +00:00
daz
f22ac61fd1 Use Gradle 8.11 as the minimum version for cache-cleanup
The cache-cleanup API has changed, so the init-script that worked with
Gradle 8.9 no longer works with 8.11.
We now provision and use Gradle 8.11 for cache cleanup.

This provides a band-aid fix for #417 but that issue will still impact
any build configured to run with Gradle > 8.11
2024-11-11 20:54:29 -07:00
daz
4ec844e551 npm audit fix 2024-11-11 20:54:29 -07:00
bigdaz
24ca383271 [bot] Update dist directory 2024-11-11 19:51:02 +00:00
Daz DeBoer
4ca2d5d749 Dependency updates (#429) 2024-11-11 12:49:55 -07:00
daz
f31476bde2 Update test for real-world data
This test assumed that at least one 'snapshot' wrapper checksum was unique,
and not contained in the set of wrapper checksums for released distributions.
This is no longer the case, so the assumption has been modified.
2024-11-11 12:18:11 -07:00
bigdaz
c345cfbe93 Update known wrapper checksums 2024-11-11 12:18:11 -07:00
dependabot[bot]
b526f6673b Bump com.fasterxml.jackson.dataformat:jackson-dataformat-smile
Bumps [com.fasterxml.jackson.dataformat:jackson-dataformat-smile](https://github.com/FasterXML/jackson-dataformats-binary) from 2.18.0 to 2.18.1.
- [Commits](https://github.com/FasterXML/jackson-dataformats-binary/compare/jackson-dataformats-binary-2.18.0...jackson-dataformats-binary-2.18.1)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.dataformat:jackson-dataformat-smile
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-11 12:18:11 -07:00
daz
93415e6645 Update patch for actions/cache 3.3.0 2024-11-11 12:18:11 -07:00
dependabot[bot]
6bc218d5d0 Bump the npm-dependencies group across 1 directory with 4 updates
Bumps the npm-dependencies group with 4 updates in the /sources directory: [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache), [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) and [nock](https://github.com/nock/nock).


Updates `@actions/cache` from 3.2.4 to 3.3.0
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/cache)

Updates `@types/node` from 20.17.3 to 20.17.6
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `eslint-plugin-jest` from 28.8.3 to 28.9.0
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v28.8.3...v28.9.0)

Updates `nock` from 13.5.5 to 13.5.6
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v13.5.5...v13.5.6)

---
updated-dependencies:
- dependency-name: "@actions/cache"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: nock
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-11 11:34:26 -07:00
Daniel Shuy
9d68e8b435 Update build reports path for multi-project build 2024-11-11 11:16:22 -07:00
dependabot[bot]
707359876a Bump @types/node
Bumps the npm-dependencies group with 1 update in the /sources directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node).


Updates `@types/node` from 20.17.2 to 20.17.3
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-30 18:31:04 -06:00
bigdaz
4103f31d4d [bot] Update dist directory 2024-10-31 00:29:22 +00:00
dependabot[bot]
15020cf347 Bump the npm-dependencies group across 1 directory with 4 updates
Bumps the npm-dependencies group with 4 updates in the /sources directory: [@actions/artifact](https://github.com/actions/toolkit/tree/HEAD/packages/artifact), [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest), [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [typescript](https://github.com/microsoft/TypeScript).


Updates `@actions/artifact` from 2.1.10 to 2.1.11
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/artifact/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/artifact)

Updates `@types/jest` from 29.5.13 to 29.5.14
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Updates `@types/node` from 20.16.11 to 20.17.2
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `typescript` from 5.6.2 to 5.6.3
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.6.2...v5.6.3)

---
updated-dependencies:
- dependency-name: "@actions/artifact"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-30 18:28:10 -06:00
dependabot[bot]
ed43923279 Bump org.junit.jupiter:junit-jupiter
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.11.2 to 5.11.3.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.2...r5.11.3)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-30 18:28:10 -06:00
bigdaz
6dafcf2d22 [bot] Update dist directory 2024-10-30 23:59:49 +00:00
bigdaz
2ca30c9a83 Update known wrapper checksums 2024-10-30 17:58:46 -06:00
bigdaz
bb0c460cbf [bot] Update dist directory 2024-10-10 08:25:45 +00:00
dependabot[bot]
0674891af5 Bump the npm-dependencies group across 1 directory with 5 updates
Bumps the npm-dependencies group with 5 updates in the /sources directory:

| Package | From | To |
| --- | --- | --- |
| [@actions/artifact](https://github.com/actions/toolkit/tree/HEAD/packages/artifact) | `2.1.9` | `2.1.10` |
| [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) | `1.10.1` | `1.11.1` |
| [@octokit/webhooks-types](https://github.com/octokit/webhooks) | `7.5.1` | `7.6.1` |
| [which](https://github.com/npm/node-which) | `4.0.0` | `5.0.0` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.16.10` | `20.16.11` |



Updates `@actions/artifact` from 2.1.9 to 2.1.10
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/artifact/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/artifact)

Updates `@actions/core` from 1.10.1 to 1.11.1
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Updates `@octokit/webhooks-types` from 7.5.1 to 7.6.1
- [Release notes](https://github.com/octokit/webhooks/releases)
- [Commits](https://github.com/octokit/webhooks/compare/v7.5.1...v7.6.1)

Updates `which` from 4.0.0 to 5.0.0
- [Release notes](https://github.com/npm/node-which/releases)
- [Changelog](https://github.com/npm/node-which/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-which/compare/v4.0.0...v5.0.0)

Updates `@types/node` from 20.16.10 to 20.16.11
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@actions/artifact"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: "@octokit/webhooks-types"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: which
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm-dependencies
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-10 02:24:34 -06:00
dependabot[bot]
1b7e89588d Bump org.junit.jupiter:junit-jupiter
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.11.1 to 5.11.2.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.1...r5.11.2)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-06 20:38:26 -06:00
bigdaz
b0cc090202 [bot] Update dist directory 2024-10-07 02:37:40 +00:00
Daz DeBoer
872d6b954c Dependency updates (#411) 2024-10-06 20:36:28 -06:00
daz
61e4a25782 Control version of Gradle in PATH for unit tests 2024-10-07 12:24:47 +10:00
dependabot[bot]
f4e0ea0cdd Bump the npm-dependencies group across 1 directory with 4 updates
Bumps the npm-dependencies group with 4 updates in the /sources directory: [typed-rest-client](https://github.com/Microsoft/typed-rest-client), [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [@vercel/ncc](https://github.com/vercel/ncc) and [eslint](https://github.com/eslint/eslint).


Updates `typed-rest-client` from 2.0.2 to 2.1.0
- [Release notes](https://github.com/Microsoft/typed-rest-client/releases)
- [Commits](https://github.com/Microsoft/typed-rest-client/compare/v2.0.2...v2.1.0)

Updates `@types/node` from 20.16.5 to 20.16.10
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@vercel/ncc` from 0.38.1 to 0.38.2
- [Release notes](https://github.com/vercel/ncc/releases)
- [Commits](https://github.com/vercel/ncc/compare/0.38.1...0.38.2)

Updates `eslint` from 8.57.0 to 8.57.1
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.57.0...v8.57.1)

---
updated-dependencies:
- dependency-name: typed-rest-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@vercel/ncc"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 11:24:36 +10:00
dependabot[bot]
9f70748719 Bump org.junit.jupiter:junit-jupiter
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.11.0 to 5.11.1.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.0...r5.11.1)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 11:24:35 +10:00
dependabot[bot]
ff4a71656f Bump com.fasterxml.jackson.dataformat:jackson-dataformat-smile
Bumps [com.fasterxml.jackson.dataformat:jackson-dataformat-smile](https://github.com/FasterXML/jackson-dataformats-binary) from 2.17.2 to 2.18.0.
- [Commits](https://github.com/FasterXML/jackson-dataformats-binary/compare/jackson-dataformats-binary-2.17.2...jackson-dataformats-binary-2.18.0)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.dataformat:jackson-dataformat-smile
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 11:24:35 +10:00
dependabot[bot]
b5e8e5f396 Bump com.google.guava:guava in /.github/workflow-samples/kotlin-dsl
Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.3.0-jre to 33.3.1-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 11:24:35 +10:00
bigdaz
7605d180a5 Update known wrapper checksums 2024-10-07 11:24:35 +10:00
daz
d32c4bdc08 Update wrapper to Gradle 8.10.2 2024-10-07 11:24:35 +10:00
bigdaz
0d30c9111c [bot] Update dist directory 2024-09-14 22:01:51 +00:00
Daz DeBoer
cf8c435260 Correctly handle multiline patterns for extracted entries (#393) 2024-09-14 16:00:48 -06:00
bigdaz
b4c01c399c [bot] Update dist directory 2024-09-13 17:18:30 +00:00
daz
340f8b64e0 Improve cache logging 2024-09-13 11:17:22 -06:00
bigdaz
36455cb5f4 [bot] Update dist directory 2024-09-13 16:46:55 +00:00
Daz DeBoer
e5c1381176 Include cache save/restore times in Job Summary (#389)
Fixes #370
2024-09-13 10:45:46 -06:00
dependabot[bot]
d156388eb1 Bump path-to-regexp from 6.2.1 to 6.3.0 in /sources
Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) from 6.2.1 to 6.3.0.
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md)
- [Commits](https://github.com/pillarjs/path-to-regexp/compare/v6.2.1...v6.3.0)

---
updated-dependencies:
- dependency-name: path-to-regexp
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-12 20:06:01 -06:00
dependabot[bot]
2e93f415f7 Bump the npm-dependencies group across 1 directory with 2 updates
Bumps the npm-dependencies group with 2 updates in the /sources directory: [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) and [eslint-plugin-github](https://github.com/github/eslint-plugin-github).


Updates `@types/jest` from 29.5.12 to 29.5.13
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Updates `eslint-plugin-github` from 5.0.1 to 5.0.2
- [Release notes](https://github.com/github/eslint-plugin-github/releases)
- [Commits](https://github.com/github/eslint-plugin-github/compare/v5.0.1...v5.0.2)

---
updated-dependencies:
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: eslint-plugin-github
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-12 20:06:01 -06:00
bigdaz
ee8dc905e6 [bot] Update dist directory 2024-09-13 01:56:53 +00:00
bot-githubaction
5fe9264c08 Bump references to Develocity Gradle plugin from 3.18 to 3.18.1 2024-09-12 19:55:39 -06:00
dependabot[bot]
29d4d80ef6 Bump the npm-dependencies group across 1 directory with 3 updates
Bumps the npm-dependencies group with 3 updates in the /sources directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) and [typescript](https://github.com/microsoft/TypeScript).


Updates `@types/node` from 20.16.1 to 20.16.5
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `eslint-plugin-jest` from 28.8.0 to 28.8.3
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v28.8.0...v28.8.3)

Updates `typescript` from 5.5.4 to 5.6.2
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.5.4...v5.6.2)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-12 19:55:39 -06:00
dependabot[bot]
478782dbb4 Bump peter-evans/create-pull-request in the github-actions group
Bumps the github-actions group with 1 update: [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request).


Updates `peter-evans/create-pull-request` from 6 to 7
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v6...v7)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-12 19:55:39 -06:00
bigdaz
e6215edc51 [bot] Update dist directory 2024-09-13 00:44:35 +00:00
Alexis Tual
765a73447c Fix passing expiresInHours query parameter 2024-09-12 18:43:23 -06:00
Daz DeBoer
a122cf5aa7 Document develocity-token-expiry parameter
Fixes #367
2024-09-12 18:32:17 -06:00
bigdaz
5baa1ded34 [bot] Update dist directory 2024-08-31 17:12:28 +00:00
Daz DeBoer
7e0f050645 Ensure minimum Gradle version for cache-cleanup (#364)
Instead of always installing and using the latest Gradle version for
cache cleanup, we now require at least Gradle 8.9.

This avoids downloading and installing Gradle if the version on PATH is
sufficient to perform cache cleanup.
2024-08-31 11:11:24 -06:00
daz
9291ac6ca5 Add example of job summary with cache-read-only 2024-08-29 09:54:55 -06:00
bigdaz
6da85a08fb [bot] Update dist directory 2024-08-27 03:19:58 +00:00
dependabot[bot]
c3c8a18b22 Bump tj-actions/changed-files from 44 to 45 in the github-actions group
Bumps the github-actions group with 1 update: [tj-actions/changed-files](https://github.com/tj-actions/changed-files).


Updates `tj-actions/changed-files` from 44 to 45
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v44...v45)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 21:18:49 -06:00
dependabot[bot]
9498413fd8 Bump the npm-dependencies group in /sources with 3 updates
Bumps the npm-dependencies group in /sources with 3 updates: [@actions/http-client](https://github.com/actions/toolkit/tree/HEAD/packages/http-client), [nock](https://github.com/nock/nock) and [ts-jest](https://github.com/kulshekhar/ts-jest).


Updates `@actions/http-client` from 2.2.2 to 2.2.3
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/http-client/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/http-client)

Updates `nock` from 13.5.4 to 13.5.5
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v13.5.4...v13.5.5)

Updates `ts-jest` from 29.2.4 to 29.2.5
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.2.4...v29.2.5)

---
updated-dependencies:
- dependency-name: "@actions/http-client"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: nock
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 21:18:20 -06:00
Daz DeBoer
16bf8bc8fe Rework docs for Develocity support
Fixes #339
2024-08-26 14:52:14 -06:00
bigdaz
faf4eeacd5 [bot] Update dist directory 2024-08-26 20:49:04 +00:00
Daz DeBoer
4b7cc6e174 Differentiate Gradle 8.1 from 8.10 when checking version (#358)
Fixes #359
2024-08-26 14:47:28 -06:00
daz
0873530e60 Increase Gradle version coverage for init-scripts
As well as testing latest of each major version, also test early release of 6.x and 7.x
2024-08-26 13:57:09 -06:00
bigdaz
f67327f0c8 [bot] Update dist directory 2024-08-26 19:13:13 +00:00
Daz DeBoer
d32a10b3ae Dependency updates (#356)
- Update to DV plugin 3.18
- Update to Gradle 8.10
- Update to address vulnerability in `unzip-stream`
2024-08-26 13:12:08 -06:00
daz
e598a32529 Quote version 8.10 in integ test 2024-08-26 12:47:06 -06:00
dependabot[bot]
d6c8cf816c Bump unzip-stream from 0.3.1 to 0.3.4 in /sources
Bumps [unzip-stream](https://github.com/mhr3/unzip-stream) from 0.3.1 to 0.3.4.
- [Commits](https://github.com/mhr3/unzip-stream/compare/v0.3.1...v0.3.4)

---
updated-dependencies:
- dependency-name: unzip-stream
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 11:10:02 -06:00
dependabot[bot]
79ea5b8f3e Bump org.junit.jupiter:junit-jupiter
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.10.3 to 5.11.0.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.10.3...r5.11.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 11:08:49 -06:00
dependabot[bot]
d77a030aaf Bump com.google.guava:guava in /.github/workflow-samples/kotlin-dsl
Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.2.1-jre to 33.3.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 11:08:26 -06:00
daz
a8a2fd2323 Update to Gradle 8.10 2024-08-26 11:07:48 -06:00
bot-githubaction
089bfb1063 Bump references to Develocity Gradle plugin from 3.17.6 to 3.18 2024-08-26 10:53:40 -06:00
bigdaz
ca7f3fa2f5 [bot] Update dist directory 2024-08-26 16:48:43 +00:00
dependabot[bot]
1c29763ff7 Bump the npm-dependencies group across 1 directory with 5 updates
Bumps the npm-dependencies group with 5 updates in the /sources directory:

| Package | From | To |
| --- | --- | --- |
| [@actions/glob](https://github.com/actions/toolkit/tree/HEAD/packages/glob) | `0.4.0` | `0.5.0` |
| [@actions/http-client](https://github.com/actions/toolkit/tree/HEAD/packages/http-client) | `2.2.1` | `2.2.2` |
| [@octokit/rest](https://github.com/octokit/rest.js) | `21.0.1` | `21.0.2` |
| [cheerio](https://github.com/cheeriojs/cheerio) | `1.0.0-rc.12` | `1.0.0` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.14.14` | `20.16.1` |



Updates `@actions/glob` from 0.4.0 to 0.5.0
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/glob/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/glob)

Updates `@actions/http-client` from 2.2.1 to 2.2.2
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/http-client/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/http-client)

Updates `@octokit/rest` from 21.0.1 to 21.0.2
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](https://github.com/octokit/rest.js/compare/v21.0.1...v21.0.2)

Updates `cheerio` from 1.0.0-rc.12 to 1.0.0
- [Release notes](https://github.com/cheeriojs/cheerio/releases)
- [Commits](https://github.com/cheeriojs/cheerio/compare/v1.0.0-rc.12...v1.0.0)

Updates `@types/node` from 20.14.14 to 20.16.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@actions/glob"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: "@actions/http-client"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@octokit/rest"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: cheerio
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 10:47:34 -06:00
bigdaz
1bc1a6c922 Update known wrapper checksums 2024-08-26 10:46:59 -06:00
daz
b51fcf4d6c Only allow 1 integ-test at a time 2024-08-12 10:33:22 -06:00
daz
82758ea0fa Emphasise notice in wrapper-validation docs 2024-08-12 10:03:35 -06:00
bigdaz
835367424c [bot] Update dist directory 2024-08-12 15:59:33 +00:00
bigdaz
1ac097f44e Update known wrapper checksums 2024-08-12 09:58:33 -06:00
dependabot[bot]
60851f5fb2 Bump eslint-plugin-jest in /sources in the npm-dependencies group
Bumps the npm-dependencies group in /sources with 1 update: [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest).


Updates `eslint-plugin-jest` from 28.7.0 to 28.8.0
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v28.7.0...v28.8.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-08 13:46:38 -06:00
bigdaz
e7551dc2a9 [bot] Update dist directory 2024-08-08 19:36:04 +00:00
daz
e482045599 Tweak log message 2024-08-08 13:34:53 -06:00
Marcono1234
631bcacd15 Document that setup-gradle performs wrapper validation 2024-08-07 15:30:54 -06:00
Daz DeBoer
d724da5563 Update RELEASING.md for v4 2024-08-07 11:41:14 -06:00
dependabot[bot]
228ce9b15b Bump @types/unzipper in /sources in the npm-dependencies group
Bumps the npm-dependencies group in /sources with 1 update: [@types/unzipper](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/unzipper).


Updates `@types/unzipper` from 0.10.9 to 0.10.10
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/unzipper)

---
updated-dependencies:
- dependency-name: "@types/unzipper"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-07 10:11:26 -06:00
daz
64869b1757 Attempt to reduce contention in integ-test-full 2024-08-07 09:04:49 -06:00
Daz DeBoer
0b404a7148 Reduce Dependabot checks to weekly 2024-08-07 07:58:19 -06:00
dependabot[bot]
4cb1dc0963 Bump the npm-dependencies group across 1 directory with 2 updates
Bumps the npm-dependencies group with 2 updates in the /sources directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser).


Updates `@types/node` from 20.12.4 to 20.14.14
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@typescript-eslint/parser` from 7.11.0 to 7.18.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.18.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-06 09:16:21 -06:00
bigdaz
1eb9607ae7 [bot] Update dist directory 2024-08-06 14:52:54 +00:00
daz
a5a9e731f3 Bump the npm-dependencies group in /sources with 11 updates
Bumps the npm-dependencies group in /sources with 11 updates:

| Package | From | To |
| --- | --- | --- |
| [@actions/artifact](https://github.com/actions/toolkit/tree/HEAD/packages/artifact) | `2.1.4` | `2.1.9` |
| [@octokit/rest](https://github.com/octokit/rest.js) | `20.1.0` | `21.0.1` |
| [@octokit/webhooks-types](https://github.com/octokit/webhooks) | `7.5.0` | `7.5.1` |
| [semver](https://github.com/npm/node-semver) | `7.6.0` | `7.6.3` |
| [typed-rest-client](https://github.com/Microsoft/typed-rest-client) | `1.8.11` | `2.0.2` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `7.5.0` | `7.11.0` |
| [eslint-plugin-github](https://github.com/github/eslint-plugin-github) | `4.10.2` | `5.0.1` |
| [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) | `27.9.0` | `28.7.0` |
| [prettier](https://github.com/prettier/prettier) | `3.2.5` | `3.3.3` |
| [ts-jest](https://github.com/kulshekhar/ts-jest) | `29.1.2` | `29.2.4` |
| [typescript](https://github.com/Microsoft/TypeScript) | `5.4.3` | `5.5.4` |

Updates `@actions/artifact` from 2.1.4 to 2.1.9
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/artifact/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/artifact)

Updates `@octokit/rest` from 20.1.0 to 21.0.1
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](https://github.com/octokit/rest.js/compare/v20.1.0...v21.0.1)

Updates `@octokit/webhooks-types` from 7.5.0 to 7.5.1
- [Release notes](https://github.com/octokit/webhooks/releases)
- [Commits](https://github.com/octokit/webhooks/compare/v7.5.0...v7.5.1)

Updates `semver` from 7.6.0 to 7.6.3
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.6.0...v7.6.3)

Updates `typed-rest-client` from 1.8.11 to 2.0.2
- [Release notes](https://github.com/Microsoft/typed-rest-client/releases)
- [Commits](https://github.com/Microsoft/typed-rest-client/compare/v1.8.11...v2.0.2)

Updates `@typescript-eslint/parser` from 7.5.0 to 7.11.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)

Updates `eslint-plugin-github` from 4.10.2 to 5.0.1
- [Release notes](https://github.com/github/eslint-plugin-github/releases)
- [Commits](https://github.com/github/eslint-plugin-github/compare/v4.10.2...v5.0.1)

Updates `eslint-plugin-jest` from 27.9.0 to 28.7.0
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v27.9.0...v28.7.0)

Updates `prettier` from 3.2.5 to 3.3.3
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.2.5...3.3.3)

Updates `ts-jest` from 29.1.2 to 29.2.4
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.1.2...v29.2.4)

Updates `typescript` from 5.4.3 to 5.5.4
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.3...v5.5.4)

---
updated-dependencies:
- dependency-name: "@actions/artifact"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@octokit/rest"
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm-dependencies
- dependency-name: "@octokit/webhooks-types"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: typed-rest-client
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm-dependencies
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm-dependencies
- dependency-name: eslint-plugin-github
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm-dependencies
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm-dependencies
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-06 08:51:50 -06:00
daz
add58192d1 Improve parameter description for 'cache-cleanup' 2024-08-05 10:54:56 -06:00
Daz DeBoer
9edf610422 Update RELEASING.md for v4 2024-08-04 15:14:38 -06:00
daz
b1833c4c90 Account for invalid wrapper jar 2024-08-03 16:51:41 -06:00
daz
895252588e Update docs for v4 release 2024-08-03 16:39:51 -06:00
daz
af1da67850 Prevent concurrent jobs in integ-test-full 2024-08-03 15:54:44 -06:00
daz
f8ba43cf0a Better names for suite workflows 2024-08-03 15:10:49 -06:00
daz
bcd07e6643 Refactor integ-tests into suites
- Extract 2 suites to make it possible to reduce concurrency
- Add separate workflow for integ-test and integ-test-full
2024-08-03 14:56:37 -06:00
daz
d74ee73e9f Refactor integ-tests
- Include test name in all job names
- Remove cache key delegation as it is unused
2024-08-03 14:56:37 -06:00
bigdaz
fb2e6938b6 [bot] Update dist directory 2024-08-02 21:57:19 +00:00
Daz DeBoer
07190022f8 Improve error messages for min-wrapper-count (#321) 2024-08-02 15:56:14 -06:00
daz
ac3aebda93 Improve error messages for min-wrapper-count
- Specific message when no wrappers are found
- Better message when wrapper count is less than configured

Fixes #284
2024-08-02 15:51:41 -06:00
daz
d473db0899 Add tests for wrapper-validation with insufficient wrappers
- Test min-wrapper-count greater than wrappers
- Test caswrapper-validation with insufficient wrappers
2024-08-02 15:50:28 -06:00
bigdaz
833b05f3e6 [bot] Update dist directory 2024-08-01 17:05:22 +00:00
Daz DeBoer
06905c7a0f Enable wrapper-validation by default in setup-gradle (#318) 2024-08-01 11:04:20 -06:00
daz
73f1290de7 Improve docs linked for wrapper-validation failure 2024-08-01 10:59:51 -06:00
daz
b6395da67c Cache validated checksums for later executions
The most common case for validation will be that the wrapper jars are unchanged
from a previous workflow run. In this case, we cache the validated wrapper
checksums to minimise the work required on a subsequent run.

Fixes #172
2024-08-01 10:52:36 -06:00
daz
ce4c3a6c5e Move wrapper-validation into common setup code 2024-08-01 10:52:36 -06:00
daz
b644be617f Enable wrapper validation by default
- Add 'allow-snapshot-wrappers' input parameter
- Default 'validate-wrappers' to 'true'

Fixes #12
2024-08-01 10:51:02 -06:00
daz
7179909719 Verify wrappers for distribution-snapshots
By slurping the checksum URLs from https://services.gradle.org/distributions-snapshots/
we can include these unpublished wrapper checksums in validation.

Fixes #281
2024-07-31 21:26:55 -06:00
daz
c01aea0cb4 Introduce cheerio for fast HTML querying 2024-07-31 21:26:55 -06:00
bigdaz
479297d73e [bot] Update dist directory 2024-08-01 03:26:19 +00:00
daz
fe594a580d Group cache-cleanup log messages for clarity 2024-07-31 21:25:22 -06:00
daz
53f2a5657b Add newline to args message 2024-07-31 13:22:03 -06:00
bigdaz
fd87365911 [bot] Update dist directory 2024-07-23 02:56:59 +00:00
bot-githubaction
c3f989640d Bump references to Develocity Gradle plugin from 3.17.5 to 3.17.6 2024-07-22 20:56:04 -06:00
bigdaz
6c9e547314 [bot] Update dist directory 2024-07-22 09:30:39 -06:00
daz
1a11891cfe Add error to job summary 2024-07-22 09:30:39 -06:00
daz
fae6382622 Fail the build when arguments parameter is used 2024-07-22 09:30:39 -06:00
Daz DeBoer
81b4ac7741 Fix typo 2024-07-22 07:21:54 -06:00
daz
c9872874b0 Segregate cache key for quick and full integtest 2024-07-21 14:38:05 -06:00
bigdaz
561dcd8516 [bot] Update dist directory 2024-07-21 20:20:49 +00:00
daz
7bb45b1dbd Finish enabling cache-cleanup by default
- Add deprecation warning for `gradle-home-cache-cleanup`
- Change default for `dependency-submission` to `cache-cleanup: on-success`
- Update documentation for changed default
2024-07-21 14:19:54 -06:00
bigdaz
dc97151e55 [bot] Update dist directory 2024-07-20 01:41:36 +00:00
Daz DeBoer
2289da045c Introduce dependency graph params (#304)
Fixes #193
2024-07-19 19:40:42 -06:00
bigdaz
40a3605597 [bot] Update dist directory 2024-07-20 01:25:51 +00:00
daz
e6688f31b8 Include RUNNER_ARCH in cache key
Previously, including RUNNER_OS was enough to prevent leaking incompatible
content between Gradle User Homes. With the introduction of macos-14,
we now need to differentiate between different runner architectures as well.

Fixes #138
2024-07-19 19:24:50 -06:00
Daz DeBoer
46308b920a Document dependency verification requirements
Fixes #256
2024-07-19 19:24:12 -06:00
daz
7387edbbb3 Add more input parameters for dependency-graph generation
- dependency-graph-include-projects
- dependency-graph-exclude-projects
- dependency-graph include-configurations
- dependency-graph-exclude-configurations
2024-07-19 17:22:07 -06:00
daz
9e459adb11 Add 'dependency-graph-report-dir' input parameter 2024-07-19 17:21:10 -06:00
bigdaz
1371d49f1d [bot] Update dist directory 2024-07-19 23:14:37 +00:00
Daz DeBoer
8e4868ab4a Prepare for v4 release (#303)
Resolves #297
Resolves #26
2024-07-19 17:13:42 -06:00
daz
5acdee61f0 Make cache-cleanup compatible with cache-write-only 2024-07-19 16:16:59 -06:00
daz
32f9239e2c Remove the undocumented 'dependency-graph: clear' option 2024-07-19 16:16:13 -06:00
daz
12cb23c359 Enable cache-cleanup 'on-success' by default
Fixes #26
2024-07-19 15:28:39 -06:00
daz
238a3da6f4 Remove tests for deprecated features 2024-07-19 15:15:03 -06:00
daz
2041ce6ab1 Fail on delegation from legacy actions 2024-07-19 15:12:40 -06:00
daz
ded8009fcf Remove deprecated input parameters 2024-07-19 15:12:40 -06:00
bigdaz
db8e69bc03 [bot] Update dist directory 2024-07-19 20:14:55 +00:00
Daz DeBoer
4b56f19bda Use pre-installed Gradle when available (#301)
Fixes #270
2024-07-19 14:13:59 -06:00
daz
4576973cce Test provision with more Gradle versions
Include Gradle 8.8 since it is the pre-installed version on Windows runners.
2024-07-19 14:05:33 -06:00
daz
5d7c18409c Use pre-installed Gradle when version matches
By executing Gradle on the PATH, we can avoid downloading and installing
a Gradle version that is already available on the runner.

Fixes #270
2024-07-19 13:46:56 -06:00
daz
7da993afd5 Add 'which' NPM library 2024-07-19 13:46:55 -06:00
daz
de6862d826 Use bash to ensure env vars are expanded 2024-07-19 12:59:38 -06:00
bigdaz
4c453aec59 [bot] Update dist directory 2024-07-19 17:56:33 +00:00
daz
917439d87d Always set the GRADLE_USER_HOME env var 2024-07-19 11:55:34 -06:00
bigdaz
77266ec345 [bot] Update dist directory 2024-07-19 17:08:28 +00:00
Daz DeBoer
514ac344fc Use faster D: drive on windows for Gradle User Home and Gradle downloads (#299)
Fixes #290
2024-07-19 11:07:34 -06:00
daz
f8aa3ed8b4 Use faster D: drive for Gradle User Home on Windows 2024-07-19 10:04:41 -06:00
daz
b175189376 Download and install Gradle distributions into tmpdir 2024-07-19 09:14:37 -06:00
bigdaz
20e923b8cb [bot] Update dist directory 2024-07-19 15:06:31 +00:00
daz
e7f9f25d86 Delete excluded paths on restore Gradle Home
Fixes #296
2024-07-19 09:05:31 -06:00
bigdaz
f8f7d3e704 [bot] Update dist directory 2024-07-19 04:33:23 +00:00
Daz DeBoer
7a630bc41b Disable cache-cleanup on config-cache hit (#295)
Fixes #19
2024-07-18 22:32:30 -06:00
daz
a77cb2b0f8 Add test for no cache-cleanup with config-cache hit 2024-07-18 22:25:59 -06:00
daz
54f7dc55a5 Adapt for new structure of build results 2024-07-18 22:25:58 -06:00
daz
579a013225 Capture config-cache hit in build results 2024-07-18 22:25:58 -06:00
daz
94355bbb2f Split build-results and build-scan capture into separate files 2024-07-18 22:25:58 -06:00
daz
6d20c16462 Use settingsEvaluated in preference to projectsEvaluated in init-script 2024-07-18 22:25:53 -06:00
bigdaz
b7e399239c [bot] Update dist directory 2024-07-18 17:34:32 +00:00
Daz DeBoer
723ca4de01 Caching improvements (#294)
- Better reporting of cache status in Job Summary (including cache
cleanup)
- Allow cache cleanup to be skipped when Gradle builds fail
- Refactoring
2024-07-18 11:33:36 -06:00
daz
72dde7ef1e Move action entry-point sources 2024-07-18 11:09:54 -06:00
daz
3083f01451 Use new cache-cleanup param in integtest 2024-07-17 22:47:46 -06:00
daz
27dea2df09 Allow better control over cache-cleanup
Adds new 'cache-cleanup' parameter with 3 settings: 'never', 'on-success' and 'always'.
This gives users more control over whether cache cleanup should occur.

Fixes #71
2024-07-17 20:36:33 -06:00
daz
91a526b647 Refactor BuildResults 2024-07-17 20:35:14 -06:00
daz
d92de28b80 Improve cache reporting
- More succinct messages for cache-read-only and cache-disabled
- Report on cache-cleanup enabled/disabled status
2024-07-17 20:29:57 -06:00
daz
8d318190ad Add better explanation for cache status
- Clarify default settings for cache-read-only
- Explain why cache was disabled or read-only
- Provide links to documentation in Job Summary

Fixes #255
2024-07-17 15:17:09 -06:00
daz
a025cbe7ec Don't run test on windows 2024-07-16 22:43:22 -06:00
bigdaz
23dad2b1c7 [bot] Update dist directory 2024-07-17 04:13:39 +00:00
Daz DeBoer
4a315dceb2 Isolate 'dependency-submission' action from 'setup-gradle' (#293) 2024-07-16 22:12:40 -06:00
daz
bb7a843511 Reset dependency-graph after submission
Fixes #204
2024-07-16 21:15:51 -06:00
daz
9a57bcca96 Add test for combining setup-gradle and dependency-submission 2024-07-16 21:15:30 -06:00
daz
22818445b3 Restrict download-and-submit to selected file 2024-07-16 21:15:29 -06:00
bigdaz
36c24e793d [bot] Update dist directory 2024-07-16 19:05:54 +00:00
Daz DeBoer
dff3ef9b8d Only fetch checksums for unknown wrapper versions (#292)
The checksum values for most wrapper versions are hard-coded into the
action. These known checksum values are first used for validation: only
if none of the known values work do we download checksums.

Previously, we blindly downloaded all of the checksum values in this
case: we now only download the checksums for versions that are not in
our "known" set.

Fixes #171
2024-07-16 13:04:57 -06:00
Daz DeBoer
01254b3eaa Add additional references to dependency-submission docs
Fixes #276
2024-07-15 16:21:32 -06:00
bigdaz
d9c87d481d [bot] Update dist directory 2024-07-15 19:00:43 +00:00
Daz DeBoer
ff865cb801 Upload dependency graph on submission failure (#291) 2024-07-15 12:47:06 -06:00
daz
c3acd19a4a Update to Gradle 8.9 2024-07-14 08:12:33 -06:00
bigdaz
e5bbd4c742 [bot] Update dist directory 2024-07-12 17:38:55 +00:00
dependabot[bot]
d7cd9fc65c Bump com.fasterxml.jackson.dataformat:jackson-dataformat-smile
Bumps [com.fasterxml.jackson.dataformat:jackson-dataformat-smile](https://github.com/FasterXML/jackson-dataformats-binary) from 2.17.1 to 2.17.2.
- [Commits](https://github.com/FasterXML/jackson-dataformats-binary/compare/jackson-dataformats-binary-2.17.1...jackson-dataformats-binary-2.17.2)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.dataformat:jackson-dataformat-smile
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-12 11:30:33 -06:00
github-actions[bot]
6407986e96 Update known wrapper checksums (#278)
Automatically generated pull request to update the known wrapper
checksums.

Co-authored-by: bigdaz <179734+bigdaz@users.noreply.github.com>
2024-07-12 11:29:43 -06:00
daz
87bf5ca2ea Update DV plugin versions that were missed by automation 2024-07-05 11:33:00 -06:00
Daz DeBoer
81b4ece56a Clarify that tags are isolated in cache entries 2024-07-02 12:15:24 -06:00
bigdaz
cdbbabd09c [bot] Update dist directory 2024-06-28 19:47:07 +00:00
Daz DeBoer
dad038d88d Use Gradle 8.8 features for Gradle Home cleanup (#272)
Fixes #33
Fixes #24
Fixes #46 
Fixes #169
2024-06-28 13:46:10 -06:00
daz
621f3b3f79 Run cache-cleanup build with --info
Resolves #169
2024-06-28 13:25:56 -06:00
daz
4022faad7e Fix integ-test-cache-cleanup.yml for running on act 2024-06-28 13:21:54 -06:00
daz
95ef72241e Use Gradle 8.8 features for cleanup
Gradle 8.8 introduces new features that allow us to avoid using
timestamp manipulation to force the cleanup of the Gradle User Home directory.

This solution is simpler and more robust, but relies on Gradle 8.8+ always being
used for the cache cleanup operation.

Fixes #24
2024-06-28 13:06:23 -06:00
daz
169bec5d8b Provision latest Gradle for cache-cleanup
To cleanup Gradle User Home, a Gradle build must be executed.
Newer Gradle versions are able to cleanup the home directories of older versions,
but not vice-versa.

With this change, the latest version of Gradle is automatically provisioned
in order to run Gradle User Home cleanup. This ensures a consistent version of
Gradle is used for cleanup, and fixes #33 where Gradle is not pre-installed on
a custom runner.
2024-06-28 12:39:09 -06:00
Daz DeBoer
b9abb7b195 Use latest dependency graph plugin (#269) 2024-06-27 19:42:01 -06:00
Daz DeBoer
c04155e2ca Remove instructions for merging Dependabot PRs
These are no longer required, since the bot will update the `dist` directory.
2024-06-27 19:32:31 -06:00
daz
1da1cc97d5 Rename Develocity secret 2024-06-27 18:49:52 -06:00
dependabot[bot]
c401249391 Bump org.junit.jupiter:junit-jupiter
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.10.2 to 5.10.3.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.10.2...r5.10.3)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-27 18:05:07 -06:00
bigdaz
a6a0c7dcef [bot] Update dist directory 2024-06-27 20:12:25 +00:00
bigdaz
3f3913eed0 Update known wrapper checksums 2024-06-27 14:11:23 -06:00
Eric Haag
2cd2a6e951 Fix grammar in docs 2024-06-20 07:58:28 -05:00
cdsap
dbbdc275be [bot] Update dist directory 2024-06-17 17:45:00 +00:00
Iñaki Villar
ae74429826 Fix race condition with fetching short lived token (#260)
This somehow worked before (and in our integ test) because the setup
action gave enough time to let the request short-lived token return in
time 🤷.
2024-06-17 10:44:01 -07:00
Alexis Tual
bdc7162ff9 Forward the setup short-lived token Promise
This caused a race condition not allowing the short-lived token to be returned in time before the setup finished.
2024-06-17 19:03:10 +02:00
bigdaz
31ae3562f6 [bot] Update dist directory 2024-06-15 03:19:11 +00:00
Daz DeBoer
719985db3d Simplify requesting short-lived Develocity access tokens (#259)
- Always fetch a token for every hostname in the access key
- Use any tokens that are successfully fetched
- Retain access key if no tokens can be fetched
2024-06-14 21:18:08 -06:00
bigdaz
b53238971c [bot] Update dist directory 2024-06-14 22:45:05 +00:00
Inaki Villar
5f1c5827bf handle missing access token 2024-06-14 16:44:06 -06:00
144 changed files with 371076 additions and 60346 deletions

View File

@@ -3,7 +3,7 @@ name: 'Build and upload distribution'
runs: runs:
using: "composite" using: "composite"
steps: steps:
- uses: actions/setup-node@v4 - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with: with:
node-version: 20 node-version: 20
cache: npm cache: npm
@@ -23,7 +23,7 @@ runs:
cp -r sources/dist . cp -r sources/dist .
- name: Upload distribution - name: Upload distribution
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with: with:
name: dist name: dist
path: dist/ path: dist/

View File

@@ -4,15 +4,20 @@ runs:
using: "composite" using: "composite"
steps: steps:
- name: Setup Java - name: Setup Java
uses: actions/setup-java@v4 uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 11 java-version: 11
- name: Configure environment
shell: bash
run: |
echo "ALLOWED_GRADLE_WRAPPER_CHECKSUMS=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" >> "$GITHUB_ENV"
# Downloads a 'dist' directory artifact that was uploaded in an earlier 'build-dist' step # Downloads a 'dist' directory artifact that was uploaded in an earlier 'build-dist' step
- name: Download dist - name: Download dist
if: ${{ env.SKIP_DIST != 'true' && !env.ACT }} if: ${{ env.SKIP_DIST != 'true' && !env.ACT }}
uses: actions/download-artifact@v4 uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with: with:
name: dist name: dist
path: dist/ path: dist/

View File

@@ -5,6 +5,7 @@ registries:
url: https://plugins.gradle.org/m2 url: https://plugins.gradle.org/m2
username: dummy # Required by dependabot username: dummy # Required by dependabot
password: dummy # Required by dependabot password: dummy # Required by dependabot
updates: updates:
- package-ecosystem: "npm" - package-ecosystem: "npm"
directory: "/sources" directory: "/sources"
@@ -16,25 +17,12 @@ updates:
- "*" - "*"
- package-ecosystem: "github-actions" - package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
github-actions:
patterns:
- "*"
# github-actions with directory: "/" only monitors .github/workflows # github-actions with directory: "/" only monitors .github/workflows
# https://github.com/dependabot/dependabot-core/issues/6345 # https://github.com/dependabot/dependabot-core/issues/6345
- package-ecosystem: "github-actions" directories:
directory: "/.github/actions/build-dist" - "/"
schedule: - "/.github/actions/build-dist"
interval: "weekly" - "/.github/actions/init-integ-test"
groups:
github-actions:
patterns:
- "*"
- package-ecosystem: "github-actions"
directory: "/.github/actions/init-integ-test"
schedule: schedule:
interval: "weekly" interval: "weekly"
groups: groups:
@@ -43,44 +31,19 @@ updates:
- "*" - "*"
- package-ecosystem: "gradle" - package-ecosystem: "gradle"
directory: ".github/workflow-samples/gradle-plugin" directories:
- ".github/workflow-samples/gradle-plugin"
- ".github/workflow-samples/groovy-dsl"
- ".github/workflow-samples/java-toolchain"
- ".github/workflow-samples/kotlin-dsl"
- ".github/workflow-samples/no-wrapper"
- ".github/workflow-samples/no-wrapper-gradle-5"
- "sources/test/init-scripts"
registries: registries:
- gradle-plugin-portal - gradle-plugin-portal
schedule: schedule:
interval: "daily" interval: "weekly"
- package-ecosystem: "gradle" groups:
directory: ".github/workflow-samples/groovy-dsl" gradle:
registries: patterns:
- gradle-plugin-portal - "*"
schedule:
interval: "daily"
- package-ecosystem: "gradle"
directory: ".github/workflow-samples/java-toolchain"
registries:
- gradle-plugin-portal
schedule:
interval: "daily"
- package-ecosystem: "gradle"
directory: ".github/workflow-samples/kotlin-dsl"
registries:
- gradle-plugin-portal
schedule:
interval: "daily"
- package-ecosystem: "gradle"
directory: ".github/workflow-samples/no-wrapper"
registries:
- gradle-plugin-portal
schedule:
interval: "daily"
- package-ecosystem: "gradle"
directory: ".github/workflow-samples/no-wrapper-gradle-5"
registries:
- gradle-plugin-portal
schedule:
interval: "daily"
- package-ecosystem: "gradle"
directory: "sources/test/init-scripts"
registries:
- gradle-plugin-portal
schedule:
interval: "daily"

View File

@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionSha256Sum=a4b4158601f8636cdeeab09bd76afb640030bb5b144aafe261a5e8af027dc612 distributionSha256Sum=f397b287023acdba1e9f6fc5ea72d22dd63669d59ed4a289a29b1a76eee151c6
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum

View File

@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail

View File

@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionSha256Sum=a4b4158601f8636cdeeab09bd76afb640030bb5b144aafe261a5e8af027dc612 distributionSha256Sum=f397b287023acdba1e9f6fc5ea72d22dd63669d59ed4a289a29b1a76eee151c6
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum

View File

@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail

View File

@@ -1,6 +1,6 @@
plugins { plugins {
id "com.gradle.develocity" version "3.17.5" id "com.gradle.develocity" version "3.19"
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.0.1" id "com.gradle.common-custom-user-data-gradle-plugin" version "2.0.2"
} }
develocity { develocity {

View File

@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionSha256Sum=a4b4158601f8636cdeeab09bd76afb640030bb5b144aafe261a5e8af027dc612 distributionSha256Sum=f397b287023acdba1e9f6fc5ea72d22dd63669d59ed4a289a29b1a76eee151c6
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum

View File

@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail

View File

@@ -8,9 +8,9 @@ repositories {
dependencies { dependencies {
api("org.apache.commons:commons-math3:3.6.1") api("org.apache.commons:commons-math3:3.6.1")
implementation("com.google.guava:guava:33.2.1-jre") implementation("com.google.guava:guava:33.4.0-jre")
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2") testImplementation("org.junit.jupiter:junit-jupiter:5.11.4")
} }
tasks.test { tasks.test {

View File

@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionSha256Sum=a4b4158601f8636cdeeab09bd76afb640030bb5b144aafe261a5e8af027dc612 distributionSha256Sum=f397b287023acdba1e9f6fc5ea72d22dd63669d59ed4a289a29b1a76eee151c6
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum

View File

@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail

View File

@@ -1,6 +1,6 @@
plugins { plugins {
id("com.gradle.develocity") version "3.17.5" id("com.gradle.develocity") version "3.19"
id("com.gradle.common-custom-user-data-gradle-plugin") version "2.0.1" id("com.gradle.common-custom-user-data-gradle-plugin") version "2.0.2"
} }
develocity { develocity {

View File

@@ -1,5 +1,5 @@
plugins { plugins {
id "com.gradle.develocity" version "3.17.5" id "com.gradle.develocity" version "3.19"
} }
develocity { develocity {

View File

@@ -1,5 +1,5 @@
plugins { plugins {
id "com.gradle.develocity" version "3.17.5" id "com.gradle.develocity" version "3.19"
} }
develocity { develocity {

View File

@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionSha256Sum=a4b4158601f8636cdeeab09bd76afb640030bb5b144aafe261a5e8af027dc612 distributionSha256Sum=57dafb5c2622c6cc08b993c85b7c06956a2f53536432a30ead46166dbca0f1e9
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum

View File

@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail

View File

@@ -1,5 +1,5 @@
plugins { plugins {
id "com.gradle.develocity" version "3.17.5" id "com.gradle.develocity" version "3.19"
} }
develocity { develocity {

View File

@@ -17,16 +17,23 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@v4 - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with: with:
node-version: 20 node-version: 20
cache: npm cache: npm
cache-dependency-path: sources/package-lock.json cache-dependency-path: sources/package-lock.json
- name: Setup Gradle
# Use a released version to avoid breakages
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
env:
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
with:
gradle-version: "8.11.1"
- name: Check formatting and compile - name: Check formatting and compile
run: | run: |
npm install npm clean-install
npm run check npm run check
npm run compile npm run compile
working-directory: sources working-directory: sources

View File

@@ -15,13 +15,13 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Get changed files - name: Get changed files
id: changed-files id: changed-files
uses: tj-actions/changed-files@v44 uses: tj-actions/changed-files@bab30c2299617f6615ec02a68b9a40d10bd21366 # v45.0.5
with: with:
files: | files: |
dist/** dist/**

View File

@@ -6,16 +6,15 @@ on:
- 'main' - 'main'
- 'release/**' - 'release/**'
- 'dev/**' # Allow running Code QL on dev branches without a PR - 'dev/**' # Allow running Code QL on dev branches without a PR
paths-ignore:
- 'dist/**'
pull_request: pull_request:
branches: branches:
- 'main' - 'main'
paths-ignore:
- 'dist/**'
schedule: schedule:
- cron: '25 23 * * 2' - cron: '25 23 * * 2'
permissions:
contents: read
jobs: jobs:
analyze: analyze:
name: Analyze name: Analyze
@@ -32,11 +31,11 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v3 uses: github/codeql-action/init@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
config: | config: |
@@ -44,4 +43,4 @@ jobs:
- sources/src - sources/src
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3 uses: github/codeql-action/analyze@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9

View File

@@ -0,0 +1,24 @@
name: Combine Bot PRs
on:
workflow_dispatch:
permissions:
contents: read
jobs:
combine-wrapperbot-prs:
permissions:
contents: write
pull-requests: write
checks: read
if: github.repository == 'gradle/actions'
runs-on: ubuntu-latest
steps:
- name: combine-wrapperbot-prs
uses: github/combine-prs@2909f404763c3177a456e052bdb7f2e85d3a7cb3 # v5.2.0
with:
branch_prefix: wrapperbot
combine_branch_name: wrapperbot/combined-wrapper-updates
pr_title: 'Bump Gradle Wrappers'
ci_required: "false"

View File

@@ -14,19 +14,25 @@ on:
- 'sources/test/init-scripts/**' - 'sources/test/init-scripts/**'
workflow_dispatch: workflow_dispatch:
permissions:
contents: read
jobs: jobs:
test-init-scripts: test-init-scripts:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Java - name: Setup Java
uses: actions/setup-java@v4 uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
with: with:
distribution: temurin distribution: temurin
java-version: 11 java-version: 11
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 # Use a released version to avoid breakages # Use a released version to avoid breakages
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
env:
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
- name: Run integration tests - name: Run integration tests
working-directory: sources/test/init-scripts working-directory: sources/test/init-scripts
run: ./gradlew check run: ./gradlew check

View File

@@ -0,0 +1,37 @@
name: CI-integ-test-full
on:
workflow_dispatch:
push:
paths:
- 'dist/**'
concurrency:
group: integ-test
cancel-in-progress: false
permissions:
contents: read
jobs:
caching-integ-tests:
uses: ./.github/workflows/suite-integ-test-caching.yml
concurrency:
group: CI-integ-test-full
cancel-in-progress: false
with:
runner-os: '["ubuntu-latest", "windows-latest", "macos-latest"]'
skip-dist: true
secrets: inherit
other-integ-tests:
permissions:
contents: write
uses: ./.github/workflows/suite-integ-test-other.yml
concurrency:
group: CI-integ-test-full
cancel-in-progress: false
with:
runner-os: '["ubuntu-latest", "windows-latest", "macos-latest"]'
skip-dist: true
secrets: inherit

View File

@@ -8,219 +8,38 @@ on:
- 'main' - 'main'
- 'release/**' - 'release/**'
- 'dev/**' # Allow running tests on dev branches without a PR - 'dev/**' # Allow running tests on dev branches without a PR
paths-ignore:
- 'dist/**'
concurrency: concurrency:
group: integ-tests-${{ github.ref }} group: integ-test
cancel-in-progress: false cancel-in-progress: false
permissions:
contents: read
jobs: jobs:
determine-suite:
runs-on: ubuntu-latest
outputs:
runner-os: ${{ steps.determine-suite.outputs.suite == 'quick' && '["ubuntu-latest"]' || '["ubuntu-latest", "windows-latest", "macos-latest"]' }}
cache-key-prefix: '0' # TODO DAZ Try this again ${{ steps.determine-suite.outputs.suite == 'quick' && '0' || github.run_number }}
suite: ${{ steps.determine-suite.outputs.suite }}
steps:
- name: Determine suite to run
id: determine-suite
run: |
# Always run quick suite if we are not in the core `gradle/actions` repository
# This reduces the load for developers working on 'main' on forks
if [ "${{ github.repository }}" != "gradle/actions" ]; then
echo "Not in core repository: suite=quick"
echo "suite=quick" >> "$GITHUB_OUTPUT"
exit 0
fi
# Run full suite for push trigger with "[bot] Update dist directory" commit message
if [ "${{ github.event.head_commit.message }}" == "[bot] Update dist directory" ]; then
echo "Bot commit to main branch: suite=full"
echo "suite=full" >> "$GITHUB_OUTPUT"
exit 0
fi
# Run quick suite for everything else
echo "Everything else: suite=quick"
echo "suite=quick" >> "$GITHUB_OUTPUT"
build-distribution: build-distribution:
needs: [determine-suite]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Build and upload distribution - name: Build and upload distribution
if: ${{ needs.determine-suite.outputs.suite != 'full' }} if: ${{ needs.determine-suite.outputs.suite != 'full' }}
uses: ./.github/actions/build-dist uses: ./.github/actions/build-dist
action-inputs: caching-integ-tests:
needs: [determine-suite, build-distribution] needs: build-distribution
uses: ./.github/workflows/integ-test-action-inputs.yml uses: ./.github/workflows/suite-integ-test-caching.yml
with: with:
runner-os: '${{ needs.determine-suite.outputs.runner-os }}' skip-dist: false
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-' secrets: inherit
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
build-scan-publish: other-integ-tests:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-build-scan-publish.yml
with:
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
cache-cleanup:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-cache-cleanup.yml
with:
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
cache-key-prefix: '${{github.run_number}}-' # Requires a fresh cache entry each run
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
caching-config:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-caching-config.yml
with:
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
dependency-graph:
if: ${{ ! github.event.pull_request.head.repo.fork }}
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-dependency-graph.yml
permissions: permissions:
contents: write contents: write
needs: build-distribution
uses: ./.github/workflows/suite-integ-test-other.yml
with: with:
runner-os: '${{ needs.determine-suite.outputs.runner-os }}' skip-dist: false
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-' secrets: inherit
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
dependency-submission:
if: ${{ ! github.event.pull_request.head.repo.fork }}
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-dependency-submission.yml
permissions:
contents: write
with:
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
dependency-submission-failures:
if: ${{ ! github.event.pull_request.head.repo.fork }}
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-dependency-submission-failures.yml
permissions:
contents: write
with:
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
execution-with-caching:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-execution-with-caching.yml
with:
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
execution:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-execution.yml
with:
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
develocity-injection:
if: ${{ ! github.event.pull_request.head.repo.fork }}
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-inject-develocity.yml
with:
runner-os: '["ubuntu-latest"]'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
secrets:
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_SOLUTIONS_ACCESS_TOKEN }}
provision-gradle-versions:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-provision-gradle-versions.yml
with:
runner-os: '["ubuntu-latest"]'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
restore-configuration-cache:
if: ${{ ! github.event.pull_request.head.repo.fork }}
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-restore-configuration-cache.yml
with:
runner-os: '["ubuntu-latest"]'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
secrets:
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
restore-containerized-gradle-home:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-restore-containerized-gradle-home.yml
with:
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
restore-custom-gradle-home:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml
with:
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
restore-gradle-home:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-restore-gradle-home.yml
with:
runner-os: '["ubuntu-latest"]'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
restore-java-toolchain:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-restore-java-toolchain.yml
with:
runner-os: '["ubuntu-latest"]'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
sample-kotlin-dsl:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml
with:
runner-os: '["ubuntu-latest"]'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
sample-gradle-plugin:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml
with:
runner-os: '["ubuntu-latest"]'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
toolchain-detection:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-detect-java-toolchains.yml
with:
runner-os: '["ubuntu-latest"]'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
wrapper-validation:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-wrapper-validation.yml
with:
runner-os: '["ubuntu-latest"]'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}

57
.github/workflows/ci-ossf-scorecard.yml vendored Normal file
View File

@@ -0,0 +1,57 @@
name: CI-ossf-scorecard
on:
schedule:
- cron: '0 5 * * 1'
push:
branches:
- main
permissions:
contents: read
jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge (see publish_results below).
id-token: write
steps:
- name: 'Checkout code'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
show-progress: false
- name: 'Run analysis'
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
with:
results_file: results.sarif
results_format: sarif
# Public repositories:
# - Publish results to OpenSSF REST API for easy access by consumers
# - Allows the repository to include the Scorecard badge.
# - See https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories:
# - `publish_results` will always be set to `false`, regardless
# of the value entered here.
publish_results: true
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: 'Upload artifact'
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: SARIF file
path: results.sarif
retention-days: 5
# Upload the results to GitHub's code scanning dashboard.
- name: 'Upload to code-scanning'
uses: github/codeql-action/upload-sarif@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
with:
sarif_file: results.sarif

View File

@@ -10,19 +10,24 @@ on:
- 'dist/**' - 'dist/**'
permissions: permissions:
contents: write contents: read
jobs: jobs:
update-dist: update-dist:
# Only run for the Gradle repository; otherwise when users create pull requests from their `main` branch
# it would erroneously update `dist` on their branch (and the pull request)
if: github.repository == 'gradle/actions'
permissions:
contents: write
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
token: ${{ secrets.BOT_GITHUB_TOKEN }} token: ${{ secrets.BOT_GITHUB_TOKEN }}
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with: with:
node-version: 20 node-version: 20
cache: npm cache: npm
@@ -43,10 +48,7 @@ jobs:
# Important: The push event will not trigger any other workflows, see # Important: The push event will not trigger any other workflows, see
# https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#commits-made-by-this-action-do-not-trigger-new-workflow-runs # https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#commits-made-by-this-action-do-not-trigger-new-workflow-runs
- name: Commit & push changes - name: Commit & push changes
# Only run for the Gradle repository; otherwise when users create pull requests from their `main` branch uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
# it would erroneously update `dist` on their branch (and the pull request)
if: github.repository == 'gradle/actions'
uses: stefanzweifel/git-auto-commit-action@v5
with: with:
commit_message: '[bot] Update dist directory' commit_message: '[bot] Update dist directory'
file_pattern: dist file_pattern: dist

View File

@@ -0,0 +1,17 @@
name: CI-validate-wrappers
on:
push:
pull_request:
permissions:
contents: read
jobs:
validation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: gradle/actions/wrapper-validation@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
with:
allow-checksums: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

View File

@@ -1,62 +0,0 @@
name: demo-failure-cases
on:
workflow_dispatch:
jobs:
build-distribution:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Build and upload distribution
uses: ./.github/actions/build-dist
failing-build:
needs: build-distribution
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Initialize integ-test
uses: ./.github/actions/init-integ-test
- name: Test build failure
uses: ./setup-gradle
continue-on-error: true
with:
build-root-directory: .github/workflow-samples/kotlin-dsl
arguments: not-a-valid-task
wrapper-missing:
needs: build-distribution
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Initialize integ-test
uses: ./.github/actions/init-integ-test
- name: Test wrapper missing
uses: ./setup-gradle
continue-on-error: true
with:
build-root-directory: .github/workflow-samples/no-wrapper
arguments: help
bad-configuration:
needs: build-distribution
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Initialize integ-test
uses: ./.github/actions/init-integ-test
- name: Test bad config value
uses: ./setup-gradle
continue-on-error: true
with:
build-root-directory: .github/workflow-samples/no-wrapper
arguments: help
cache-disabled: yes

View File

@@ -3,12 +3,15 @@ name: Demo Job Summary, for Gradle builds
on: on:
workflow_dispatch: workflow_dispatch:
permissions:
contents: read
jobs: jobs:
build-distribution: build-distribution:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Build and upload distribution - name: Build and upload distribution
uses: ./.github/actions/build-dist uses: ./.github/actions/build-dist
@@ -17,12 +20,15 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
- name: Setup Gradle - name: Setup Gradle
uses: ./setup-gradle uses: ./setup-gradle
with:
cache-read-only: false
cache-cleanup: 'on-success'
- name: Build kotlin-dsl project - name: Build kotlin-dsl project
working-directory: .github/workflow-samples/kotlin-dsl working-directory: .github/workflow-samples/kotlin-dsl
run: ./gradlew assemble run: ./gradlew assemble
@@ -56,7 +62,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -76,7 +82,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -91,3 +97,20 @@ jobs:
- name: Run build - name: Run build
working-directory: .github/workflow-samples/groovy-dsl working-directory: .github/workflow-samples/groovy-dsl
run: ./gradlew assemble run: ./gradlew assemble
cache-read-only:
needs: build-distribution
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test
uses: ./.github/actions/init-integ-test
- name: Setup Gradle
uses: ./setup-gradle
with:
cache-read-only: true
- name: Build kotlin-dsl project
working-directory: .github/workflow-samples/kotlin-dsl
run: ./gradlew assemble

View File

@@ -4,23 +4,25 @@ on:
types: [assigned, review_requested] types: [assigned, review_requested]
permissions: permissions:
pull-requests: write contents: read
jobs: jobs:
build-distribution: build-distribution:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Build and upload distribution - name: Build and upload distribution
uses: ./.github/actions/build-dist uses: ./.github/actions/build-dist
successful-build-with-always-comment: successful-build-with-always-comment:
permissions:
pull-requests: write
needs: build-distribution needs: build-distribution
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -34,11 +36,13 @@ jobs:
run: ./gradlew build --scan run: ./gradlew build --scan
successful-build-with-comment-on-failure: successful-build-with-comment-on-failure:
permissions:
pull-requests: write
needs: build-distribution needs: build-distribution
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -52,11 +56,13 @@ jobs:
run: ./gradlew build --scan run: ./gradlew build --scan
failing-build-with-comment-on-failure: failing-build-with-comment-on-failure:
permissions:
pull-requests: write
needs: build-distribution needs: build-distribution
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test

View File

@@ -1,42 +0,0 @@
name: Test action inputs
on:
workflow_call:
inputs:
cache-key-prefix:
type: string
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
skip-dist:
type: boolean
default: false
env:
SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: action-inputs-${{ inputs.cache-key-prefix }}
jobs:
action-inputs:
strategy:
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Initialize integ-test
uses: ./.github/actions/init-integ-test
- name: Invoke with multi-line arguments
uses: ./setup-gradle
with:
build-root-directory: .github/workflow-samples/groovy-dsl
arguments: |
--configuration-cache
--build-cache
-DsystemProperty=FOO
-PgradleProperty=BAR
test
jar

View File

@@ -5,9 +5,10 @@ on:
inputs: inputs:
cache-key-prefix: cache-key-prefix:
type: string type: string
default: '0'
runner-os: runner-os:
type: string type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]' default: '["ubuntu-latest"]'
skip-dist: skip-dist:
type: boolean type: boolean
default: false default: false
@@ -16,6 +17,9 @@ env:
SKIP_DIST: ${{ inputs.skip-dist }} SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: build-scan-publish-${{ inputs.cache-key-prefix }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: build-scan-publish-${{ inputs.cache-key-prefix }}
permissions:
contents: read
jobs: jobs:
build-scan-publish: build-scan-publish:
strategy: strategy:
@@ -26,15 +30,10 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- name: Setup Gradle - name: Setup Gradle
id: setup-gradle id: setup-gradle
uses: ./setup-gradle uses: ./setup-gradle
@@ -50,7 +49,7 @@ jobs:
run: gradle help run: gradle help
- name: Check Build Scan url - name: Check Build Scan url
if: ${{ !steps.gradle.outputs.build-scan-url }} if: ${{ !steps.gradle.outputs.build-scan-url }}
uses: actions/github-script@v7 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with: with:
script: | script: |
core.setFailed('No Build Scan detected') core.setFailed('No Build Scan detected')

View File

@@ -5,27 +5,33 @@ on:
inputs: inputs:
cache-key-prefix: cache-key-prefix:
type: string type: string
default: '0'
runner-os: runner-os:
type: string type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]' default: '["ubuntu-latest"]'
skip-dist: skip-dist:
type: boolean type: boolean
default: false default: false
env: env:
SKIP_DIST: ${{ inputs.skip-dist }} SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: cache-cleanup-${{ inputs.cache-key-prefix }} # Requires a fresh cache entry each run
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: cache-cleanup-${{ inputs.cache-key-prefix }}-${{github.run_number}}
permissions:
contents: read
jobs: jobs:
full-build: cache-cleanup-full-build:
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -35,19 +41,20 @@ jobs:
cache-read-only: false # For testing, allow writing cache entries on non-default branches cache-read-only: false # For testing, allow writing cache entries on non-default branches
- name: Build with 3.1 - name: Build with 3.1
working-directory: sources/test/jest/resources/cache-cleanup working-directory: sources/test/jest/resources/cache-cleanup
run: gradle --no-daemon --build-cache -Dcommons_math3_version="3.1" build run: ./gradlew --no-daemon --build-cache -Dcommons_math3_version="3.1" build
# Second build will use the cache from the first build, but cleanup should remove unused artifacts # Second build will use the cache from the first build, but cleanup should remove unused artifacts
assemble-build: cache-cleanup-assemble-build:
needs: full-build needs: cache-cleanup-full-build
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -55,21 +62,22 @@ jobs:
uses: ./setup-gradle uses: ./setup-gradle
with: with:
cache-read-only: false cache-read-only: false
gradle-home-cache-cleanup: true cache-cleanup: 'on-success'
- name: Build with 3.1.1 - name: Build with 3.1.1
working-directory: sources/test/jest/resources/cache-cleanup working-directory: sources/test/jest/resources/cache-cleanup
run: gradle --no-daemon --build-cache -Dcommons_math3_version="3.1.1" build run: ./gradlew --no-daemon --build-cache -Dcommons_math3_version="3.1.1" build
check-clean-cache: cache-cleanup-check-clean-cache:
needs: assemble-build needs: cache-cleanup-assemble-build
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -78,15 +86,22 @@ jobs:
with: with:
cache-read-only: true cache-read-only: true
- name: Report Gradle User Home - name: Report Gradle User Home
run: du -hc ~/.gradle/caches/modules-2 shell: bash
run: |
du -hc $GRADLE_USER_HOME/caches/modules-2
du -hc $GRADLE_USER_HOME/wrapper/dists
- name: Verify cleaned cache - name: Verify cleaned cache
shell: bash shell: bash
run: | run: |
if [ ! -e ~/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-math3/3.1.1 ]; then if [ ! -e $GRADLE_USER_HOME/caches/modules-2/files-2.1/org.apache.commons/commons-math3/3.1.1 ]; then
echo "::error ::Should find commons-math3 3.1.1 in cache" echo "::error ::Should find commons-math3 3.1.1 in cache"
exit 1 exit 1
fi fi
if [ -e ~/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-math3/3.1 ]; then if [ -e $GRADLE_USER_HOME/caches/modules-2/files-2.1/org.apache.commons/commons-math3/3.1 ]; then
echo "::error ::Should NOT find commons-math3 3.1 in cache" echo "::error ::Should NOT find commons-math3 3.1 in cache"
exit 1 exit 1
fi fi
if [ ! -e $GRADLE_USER_HOME/wrapper/dists/gradle-8.0.2-bin ]; then
echo "::error ::Should find gradle-8.0.2 in wrapper/dists"
exit 1
fi

View File

@@ -5,9 +5,10 @@ on:
inputs: inputs:
cache-key-prefix: cache-key-prefix:
type: string type: string
default: '0'
runner-os: runner-os:
type: string type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]' default: '["ubuntu-latest"]'
skip-dist: skip-dist:
type: boolean type: boolean
default: false default: false
@@ -16,16 +17,20 @@ env:
SKIP_DIST: ${{ inputs.skip-dist }} SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: caching-config-${{ inputs.cache-key-prefix }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: caching-config-${{ inputs.cache-key-prefix }}
permissions:
contents: read
jobs: jobs:
seed-build: caching-config-seed-build:
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -46,16 +51,17 @@ jobs:
run: ./gradlew test run: ./gradlew test
# Test that the gradle-user-home cache will cache dependencies, by running build with --offline # Test that the gradle-user-home cache will cache dependencies, by running build with --offline
verify-build: caching-config-verify-build:
needs: seed-build needs: caching-config-seed-build
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -75,15 +81,16 @@ jobs:
run: ./gradlew test --offline run: ./gradlew test --offline
# Test that build scans are captured when caching is explicitly disabled # Test that build scans are captured when caching is explicitly disabled
cache-disabled: caching-config-cache-disabled:
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -97,17 +104,17 @@ jobs:
run: ./gradlew help run: ./gradlew help
- name: Check Build Scan url is captured - name: Check Build Scan url is captured
if: ${{ !steps.gradle.outputs.build-scan-url }} if: ${{ !steps.gradle.outputs.build-scan-url }}
uses: actions/github-script@v7 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with: with:
script: | script: |
core.setFailed('No Build Scan detected') core.setFailed('No Build Scan detected')
# Test that build scans are captured when caching is disabled because Gradle User Home already exists # Test that build scans are captured when caching is disabled because Gradle User Home already exists
cache-disabled-pre-existing-gradle-home: caching-config-cache-disabled-pre-existing-gradle-home:
runs-on: ubuntu-latest # This test only runs on Ubuntu runs-on: ubuntu-latest # This test only runs on Ubuntu
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -121,23 +128,24 @@ jobs:
run: ./gradlew help run: ./gradlew help
- name: Check Build Scan url is captured - name: Check Build Scan url is captured
if: ${{ !steps.gradle.outputs.build-scan-url }} if: ${{ !steps.gradle.outputs.build-scan-url }}
uses: actions/github-script@v7 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with: with:
script: | script: |
core.setFailed('No Build Scan detected') core.setFailed('No Build Scan detected')
# Test seed the cache with cache-write-only and verify with cache-read-only # Test seed the cache with cache-write-only and verify with cache-read-only
seed-build-write-only: caching-config-seed-write-only:
env: env:
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}-write-only- GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: caching-config-write-only-${{ inputs.cache-key-prefix }}
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -149,18 +157,19 @@ jobs:
working-directory: .github/workflow-samples/groovy-dsl working-directory: .github/workflow-samples/groovy-dsl
run: ./gradlew test run: ./gradlew test
verify-write-only-build: caching-config-verify-write-only:
env: env:
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}-write-only- GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: caching-config-write-only-${{ inputs.cache-key-prefix }}
needs: seed-build-write-only needs: caching-config-seed-write-only
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test

View File

@@ -5,31 +5,28 @@ on:
inputs: inputs:
cache-key-prefix: cache-key-prefix:
type: string type: string
default: '0'
runner-os: runner-os:
type: string type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]' default: '["ubuntu-latest"]'
skip-dist: skip-dist:
type: boolean type: boolean
default: false default: false
permissions:
contents: write
env: env:
SKIP_DIST: ${{ inputs.skip-dist }} SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-graph-${{ inputs.cache-key-prefix }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-graph-${{ inputs.cache-key-prefix }}
GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
permissions:
contents: read
jobs: jobs:
groovy-generate: dependency-graph-groovy-upload:
strategy: runs-on: "ubuntu-latest"
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -41,12 +38,14 @@ jobs:
run: ./gradlew build run: ./gradlew build
working-directory: .github/workflow-samples/groovy-dsl working-directory: .github/workflow-samples/groovy-dsl
groovy-submit: dependency-graph-groovy-submit:
needs: [groovy-generate] permissions:
contents: write
needs: [dependency-graph-groovy-upload]
runs-on: "ubuntu-latest" runs-on: "ubuntu-latest"
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -54,16 +53,16 @@ jobs:
uses: ./setup-gradle uses: ./setup-gradle
with: with:
dependency-graph: download-and-submit dependency-graph: download-and-submit
env:
DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME: groovy-upload
kotlin-generate-and-submit: dependency-graph-kotlin-generate-and-submit:
strategy: permissions:
fail-fast: false contents: write
matrix: runs-on: "ubuntu-latest"
os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -75,15 +74,13 @@ jobs:
run: ./gradlew build run: ./gradlew build
working-directory: .github/workflow-samples/kotlin-dsl working-directory: .github/workflow-samples/kotlin-dsl
multiple-builds: dependency-graph-multiple-builds:
strategy: permissions:
fail-fast: false contents: write
matrix: runs-on: "ubuntu-latest"
os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -120,11 +117,13 @@ jobs:
exit 1 exit 1
fi fi
config-cache: dependency-graph-config-cache:
permissions:
contents: write
runs-on: ubuntu-latest # Test is not compatible with Windows runs-on: ubuntu-latest # Test is not compatible with Windows
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test

View File

@@ -5,6 +5,7 @@ on:
inputs: inputs:
cache-key-prefix: cache-key-prefix:
type: string type: string
default: '0'
runner-os: runner-os:
type: string type: string
default: '["ubuntu-latest"]' default: '["ubuntu-latest"]'
@@ -17,12 +18,15 @@ env:
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-submission-failures-${{ inputs.cache-key-prefix }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-submission-failures-${{ inputs.cache-key-prefix }}
GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
permissions:
contents: read
jobs: jobs:
failing-build: dependency-submission-failures-failing-build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -47,11 +51,11 @@ jobs:
exit 1 exit 1
fi fi
unsupported-gradle-version: dependency-submission-failures-unsupported-gradle-version:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -76,13 +80,13 @@ jobs:
exit 1 exit 1
fi fi
insufficient-permissions: dependency-submission-failures-insufficient-permissions:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: read contents: read
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test

View File

@@ -5,31 +5,35 @@ on:
inputs: inputs:
cache-key-prefix: cache-key-prefix:
type: string type: string
default: '0'
runner-os: runner-os:
type: string type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]' default: '["ubuntu-latest"]'
skip-dist: skip-dist:
type: boolean type: boolean
default: false default: false
permissions:
contents: write
env: env:
SKIP_DIST: ${{ inputs.skip-dist }} SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-submission-${{ inputs.cache-key-prefix }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-submission-${{ inputs.cache-key-prefix }}
GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
permissions:
contents: read
jobs: jobs:
groovy-generate-and-upload: dependency-submission-groovy-generate-and-upload:
permissions:
contents: write
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -42,16 +46,19 @@ jobs:
env: env:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: groovy-dependency-submission GRADLE_BUILD_ACTION_CACHE_KEY_JOB: groovy-dependency-submission
groovy-restore-cache: dependency-submission-groovy-restore-cache:
needs: [groovy-generate-and-upload] permissions:
contents: write
needs: [dependency-submission-groovy-generate-and-upload]
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -63,16 +70,19 @@ jobs:
env: env:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: groovy-dependency-submission GRADLE_BUILD_ACTION_CACHE_KEY_JOB: groovy-dependency-submission
groovy-download-and-submit: dependency-submission-groovy-download-and-submit:
needs: [groovy-generate-and-upload] permissions:
contents: write
needs: [dependency-submission-groovy-generate-and-upload]
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -80,16 +90,21 @@ jobs:
uses: ./dependency-submission uses: ./dependency-submission
with: with:
dependency-graph: download-and-submit dependency-graph: download-and-submit
env:
DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME: groovy-generate-and-upload-${{ matrix.os }}
kotlin-generate-and-submit: dependency-submission-kotlin-generate-and-submit:
permissions:
contents: write
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -98,15 +113,18 @@ jobs:
with: with:
build-root-directory: .github/workflow-samples/kotlin-dsl build-root-directory: .github/workflow-samples/kotlin-dsl
multiple-builds: dependency-submission-multiple-builds:
permissions:
contents: write
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -143,15 +161,18 @@ jobs:
exit 1 exit 1
fi fi
multiple-builds-upload: dependency-submission-multiple-builds-upload:
permissions:
contents: write
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -166,11 +187,13 @@ jobs:
dependency-graph: generate-and-upload dependency-graph: generate-and-upload
build-root-directory: .github/workflow-samples/groovy-dsl build-root-directory: .github/workflow-samples/groovy-dsl
config-cache: dependency-submission-config-cache:
permissions:
contents: write
runs-on: ubuntu-latest # Test is not compatible with Windows runs-on: ubuntu-latest # Test is not compatible with Windows
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -201,7 +224,9 @@ jobs:
exit 1 exit 1
fi fi
gradle-versions: dependency-submission-gradle-versions:
permissions:
contents: write
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -215,7 +240,7 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -225,15 +250,13 @@ jobs:
gradle-version: ${{ matrix.gradle }} gradle-version: ${{ matrix.gradle }}
build-root-directory: .github/workflow-samples/no-wrapper${{ matrix.build-root-suffix }} build-root-directory: .github/workflow-samples/no-wrapper${{ matrix.build-root-suffix }}
after-setup-gradle: dependency-submission-with-setup-gradle:
strategy: permissions:
fail-fast: false contents: write
matrix: runs-on: ubuntu-latest # Test is not compatible with Windows
os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -244,16 +267,74 @@ jobs:
uses: ./dependency-submission uses: ./dependency-submission
with: with:
build-root-directory: .github/workflow-samples/groovy-dsl build-root-directory: .github/workflow-samples/groovy-dsl
- name: Check and delete generated dependency graph
shell: bash
run: |
if [ ! -e "${{ steps.dependency-submission.outputs.dependency-graph-file }}" ]; then
echo "Did not find generated dependency graph files"
exit 1
fi
rm ${{ steps.dependency-submission.outputs.dependency-graph-file }}*
- name: Run Gradle build
run: ./gradlew build
working-directory: .github/workflow-samples/groovy-dsl
- name: Check no dependency graph is generated
shell: bash
run: |
if [ ! -z "$(ls -A dependency-graph-reports)" ]; then
echo "Expected no dependency graph files to be generated"
ls -l dependency-graph-reports
exit 1
fi
custom-report-dir-submit: dependency-submission-with-includes-and-excludes:
permissions:
contents: write
runs-on: ubuntu-latest # Test is not compatible with Windows
steps:
- name: Checkout sources
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test
uses: ./.github/actions/init-integ-test
- name: Generate and submit dependencies
id: dependency-submission
uses: ./dependency-submission
with:
build-root-directory: .github/workflow-samples/groovy-dsl
dependency-graph-exclude-projects: excluded-project
dependency-graph-include-projects: included-project
dependency-graph-exclude-configurations: excluded-configuration
dependency-graph-include-configurations: included-configuration
- name: Check generated dependency graph and env vars
shell: bash
run: |
if [ ! -e "${{ steps.dependency-submission.outputs.dependency-graph-file }}" ]; then
echo "Did not find generated dependency graph file"
exit 1
fi
if [ "$DEPENDENCY_GRAPH_EXCLUDE_PROJECTS" != "excluded-project" ] ||
[ "$DEPENDENCY_GRAPH_INCLUDE_PROJECTS" != "included-project" ] ||
[ "$DEPENDENCY_GRAPH_EXCLUDE_CONFIGURATIONS" != "excluded-configuration" ] ||
[ "$DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS" != "included-configuration" ]; then
echo "Did not set expected environment variables"
exit 1
fi
dependency-submission-custom-report-dir-submit:
permissions:
contents: write
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -262,9 +343,8 @@ jobs:
uses: ./dependency-submission uses: ./dependency-submission
with: with:
dependency-graph: generate-and-submit dependency-graph: generate-and-submit
dependency-graph-report-dir: '${{ github.workspace }}/custom/report-dir'
build-root-directory: .github/workflow-samples/groovy-dsl build-root-directory: .github/workflow-samples/groovy-dsl
env:
DEPENDENCY_GRAPH_REPORT_DIR: '${{ github.workspace }}/custom/report-dir'
- name: Check generated dependency graphs - name: Check generated dependency graphs
shell: bash shell: bash
run: | run: |
@@ -280,11 +360,13 @@ jobs:
exit 1 exit 1
fi fi
custom-report-dir-upload: dependency-submission-custom-report-dir-upload:
permissions:
contents: write
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -293,16 +375,17 @@ jobs:
uses: ./dependency-submission uses: ./dependency-submission
with: with:
dependency-graph: generate-and-upload dependency-graph: generate-and-upload
dependency-graph-report-dir: '${{ github.workspace }}/custom/report-dir'
build-root-directory: .github/workflow-samples/groovy-dsl build-root-directory: .github/workflow-samples/groovy-dsl
env:
DEPENDENCY_GRAPH_REPORT_DIR: '${{ github.workspace }}/custom/report-dir'
custom-report-dir-download-and-submit: custom-report-dir-download-and-submit:
needs: custom-report-dir-upload permissions:
contents: write
needs: [dependency-submission-custom-report-dir-upload]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -310,9 +393,11 @@ jobs:
uses: ./dependency-submission uses: ./dependency-submission
with: with:
dependency-graph: download-and-submit dependency-graph: download-and-submit
dependency-graph-report-dir: '${{ github.workspace }}/custom/report-dir'
build-root-directory: .github/workflow-samples/groovy-dsl build-root-directory: .github/workflow-samples/groovy-dsl
env: env:
DEPENDENCY_GRAPH_REPORT_DIR: '${{ github.workspace }}/custom/report-dir' DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME: custom-report-dir-upload # For testing, to avoid downloading artifacts from other worklfows
- name: Check downloaded dependency graph - name: Check downloaded dependency graph
shell: bash shell: bash
run: | run: |

View File

@@ -5,9 +5,10 @@ on:
inputs: inputs:
cache-key-prefix: cache-key-prefix:
type: string type: string
default: '0'
runner-os: runner-os:
type: string type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]' default: '["ubuntu-latest"]'
skip-dist: skip-dist:
type: boolean type: boolean
default: false default: false
@@ -16,9 +17,12 @@ env:
SKIP_DIST: ${{ inputs.skip-dist }} SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: detect-java-toolchain-${{ inputs.cache-key-prefix }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: detect-java-toolchain-${{ inputs.cache-key-prefix }}
permissions:
contents: read
jobs: jobs:
# Test that pre-installed runner JDKs are detected # Test that pre-installed runner JDKs are detected
pre-installed-toolchains: detect-toolchains-pre-installed-jdks:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -26,7 +30,7 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -48,7 +52,7 @@ jobs:
grep -q 'Eclipse Temurin JDK 21' output.txt || (echo "::error::Did not detect preinstalled JDK 21" && exit 1) grep -q 'Eclipse Temurin JDK 21' output.txt || (echo "::error::Did not detect preinstalled JDK 21" && exit 1)
# Test that JDKs provisioned by setup-java are detected # Test that JDKs provisioned by setup-java are detected
setup-java-installed-toolchain: detect-toolchains-setup-java-jdks:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -56,17 +60,17 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
- name: Setup Java 20 - name: Setup Java 20
uses: actions/setup-java@v4 uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 20 java-version: 20
- name: Setup Java 16 - name: Setup Java 16
uses: actions/setup-java@v4 uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 16 java-version: 16

View File

@@ -1,60 +0,0 @@
name: Test execution with caching
on:
workflow_call:
inputs:
cache-key-prefix:
type: string
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
skip-dist:
type: boolean
default: false
env:
SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: execution-with-caching-${{ inputs.cache-key-prefix }}
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
jobs:
seed-build:
strategy:
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Initialize integ-test
uses: ./.github/actions/init-integ-test
- name: Execute Gradle build
uses: ./setup-gradle
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
build-root-directory: .github/workflow-samples/groovy-dsl
arguments: test
# Test that the gradle-user-home is restored
verify-build:
needs: seed-build
strategy:
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Initialize integ-test
uses: ./.github/actions/init-integ-test
- name: Execute Gradle build
uses: ./setup-gradle
with:
cache-read-only: true
build-root-directory: .github/workflow-samples/groovy-dsl
arguments: test --offline -DverifyCachedBuild=true

View File

@@ -1,102 +0,0 @@
name: Test execution
on:
workflow_call:
inputs:
cache-key-prefix:
type: string
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
skip-dist:
type: boolean
default: false
env:
SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: execution-${{ inputs.cache-key-prefix }}
jobs:
# Tests for executing with different Gradle versions.
# Each build verifies that it is executed with the expected Gradle version.
gradle-execution:
strategy:
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
include:
- os: windows-latest
script-suffix: '.bat'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Initialize integ-test
uses: ./.github/actions/init-integ-test
- name: Test use defined Gradle version
uses: ./setup-gradle
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
gradle-version: 6.9
build-root-directory: .github/workflow-samples/no-wrapper
arguments: help -DgradleVersionCheck=6.9
- name: Test use Gradle version alias
uses: ./setup-gradle
with:
gradle-version: release-candidate
build-root-directory: .github/workflow-samples/no-wrapper
arguments: help
- name: Test with non-executable wrapper
uses: ./setup-gradle
with:
gradle-version: wrapper
build-root-directory: .github/workflow-samples/non-executable-wrapper
arguments: help
gradle-versions:
strategy:
fail-fast: false
matrix:
gradle: [7.5.1, 6.9.2, 5.6.4, 4.10.3, 3.5.1]
os: ${{fromJSON(inputs.runner-os)}}
include:
- java-version: 11
- gradle: 5.6.4
build-root-suffix: -gradle-5
- gradle: 4.10.3
build-root-suffix: -gradle-4
- gradle: 3.5.1
build-root-suffix: -gradle-4
java-version: 8
exclude:
- os: macos-latest # Java 8 is not supported on macos-latest, so we cannot test Gradle 3.5.1
gradle: 3.5.1
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Initialize integ-test
uses: ./.github/actions/init-integ-test
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java-version }}
- name: Run Gradle build
uses: ./setup-gradle
id: gradle
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
gradle-version: ${{matrix.gradle}}
build-root-directory: .github/workflow-samples/no-wrapper${{ matrix.build-root-suffix }}
arguments: help -DgradleVersionCheck=${{matrix.gradle}}
- name: Check Build Scan url
if: ${{ !steps.gradle.outputs.build-scan-url }}
uses: actions/github-script@v7
with:
script: |
core.setFailed('No Build Scan detected')

View File

@@ -5,9 +5,10 @@ on:
inputs: inputs:
cache-key-prefix: cache-key-prefix:
type: string type: string
default: '0'
runner-os: runner-os:
type: string type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]' default: '["ubuntu-latest"]'
skip-dist: skip-dist:
type: boolean type: boolean
default: false default: false
@@ -19,38 +20,36 @@ env:
SKIP_DIST: ${{ inputs.skip-dist }} SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: inject-develocity-${{ inputs.cache-key-prefix }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: inject-develocity-${{ inputs.cache-key-prefix }}
permissions:
contents: read
jobs: jobs:
inject-develocity: inject-develocity:
env: env:
DEVELOCITY_INJECTION_ENABLED: true DEVELOCITY_INJECTION_ENABLED: true
DEVELOCITY_URL: https://ge.solutions-team.gradle.com DEVELOCITY_URL: https://ge.solutions-team.gradle.com
DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }} DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
DEVELOCITY_CCUD_PLUGIN_VERSION: '2.0' DEVELOCITY_CCUD_PLUGIN_VERSION: '2.0.2'
${{matrix.accessKeyEnv}}: ${{ secrets.DEVELOCITY_ACCESS_KEY }} ${{matrix.accessKeyEnv}}: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
gradle: [current, 7.6.2, 6.9.4, 5.6.4] gradle: [current, 7.6.2, 6.9.4, 5.6.4]
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
plugin-version: [3.16.2, 3.17.4] plugin-version: [3.16.2, 3.19]
include: include:
- plugin-version: 3.16.2 - plugin-version: 3.16.2
accessKeyEnv: GRADLE_ENTERPRISE_ACCESS_KEY accessKeyEnv: GRADLE_ENTERPRISE_ACCESS_KEY
- plugin-version: 3.17.4 - plugin-version: 3.19
accessKeyEnv: DEVELOCITY_ACCESS_KEY accessKeyEnv: DEVELOCITY_ACCESS_KEY
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- name: Setup Gradle - name: Setup Gradle
id: setup-gradle id: setup-gradle
uses: ./setup-gradle uses: ./setup-gradle
@@ -63,7 +62,7 @@ jobs:
run: gradle help run: gradle help
- name: Check Build Scan url - name: Check Build Scan url
if: ${{ !steps.gradle.outputs.build-scan-url }} if: ${{ !steps.gradle.outputs.build-scan-url }}
uses: actions/github-script@v7 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with: with:
script: | script: |
core.setFailed('No Build Scan detected') core.setFailed('No Build Scan detected')
@@ -77,24 +76,19 @@ jobs:
DEVELOCITY_INJECTION_ENABLED: true DEVELOCITY_INJECTION_ENABLED: true
DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com' DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com'
DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }} DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
DEVELOCITY_CCUD_PLUGIN_VERSION: '2.0' DEVELOCITY_CCUD_PLUGIN_VERSION: '2.0.2'
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
gradle: [current, 7.6.2, 6.9.4, 5.6.4] gradle: [current, 7.6.2, 6.9.4, 5.6.4]
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
plugin-version: [3.16.2, 3.17.4] plugin-version: [3.16.2, 3.19]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
- name: Setup Gradle - name: Setup Gradle
id: setup-gradle id: setup-gradle
uses: ./setup-gradle uses: ./setup-gradle
@@ -113,7 +107,7 @@ jobs:
run: "[ ${#GRADLE_ENTERPRISE_ACCESS_KEY} -gt 500 ] || (echo 'GRADLE_ENTERPRISE_ACCESS_KEY does not look like a short lived token'; exit 1)" run: "[ ${#GRADLE_ENTERPRISE_ACCESS_KEY} -gt 500 ] || (echo 'GRADLE_ENTERPRISE_ACCESS_KEY does not look like a short lived token'; exit 1)"
- name: Check Build Scan url - name: Check Build Scan url
if: ${{ !steps.gradle.outputs.build-scan-url }} if: ${{ !steps.gradle.outputs.build-scan-url }}
uses: actions/github-script@v7 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with: with:
script: | script: |
core.setFailed('No Build Scan detected') core.setFailed('No Build Scan detected')
@@ -123,7 +117,7 @@ jobs:
DEVELOCITY_INJECTION_ENABLED: true DEVELOCITY_INJECTION_ENABLED: true
DEVELOCITY_URL: 'https://localhost:3333/' DEVELOCITY_URL: 'https://localhost:3333/'
DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }} DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
DEVELOCITY_CCUD_PLUGIN_VERSION: '2.0' DEVELOCITY_CCUD_PLUGIN_VERSION: '2.0.2'
# Access key also set as an env var, we want to check it does not leak # Access key also set as an env var, we want to check it does not leak
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
@@ -132,19 +126,14 @@ jobs:
matrix: matrix:
gradle: [ current, 7.6.2, 6.9.4, 5.6.4 ] gradle: [ current, 7.6.2, 6.9.4, 5.6.4 ]
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
plugin-version: [ 3.16.2, 3.17.4 ] plugin-version: [ 3.16.2, 3.19 ]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
- name: Setup Gradle - name: Setup Gradle
id: setup-gradle id: setup-gradle
uses: ./setup-gradle uses: ./setup-gradle
@@ -155,8 +144,8 @@ jobs:
id: gradle id: gradle
working-directory: .github/workflow-samples/no-ge working-directory: .github/workflow-samples/no-ge
run: gradle help run: gradle help
- name: Check access key is blank (DEVELOCITY_ACCESS_KEY) - name: Check access key is not blank (DEVELOCITY_ACCESS_KEY)
run: "[ \"${DEVELOCITY_ACCESS_KEY}\" == \"\" ] || (echo 'DEVELOCITY_ACCESS_KEY has leaked!'; exit 1)" run: "[ \"${DEVELOCITY_ACCESS_KEY}\" != \"\" ] || (echo 'using DEVELOCITY_ACCESS_KEY!'; exit 1)"
- name: Check access key is not blank (GRADLE_ENTERPRISE_ACCESS_KEY) - name: Check access key is not blank (GRADLE_ENTERPRISE_ACCESS_KEY)
run: "[ \"${GRADLE_ENTERPRISE_ACCESS_KEY}\" != \"\" ] || (echo 'GRADLE_ENTERPRISE_ACCESS_KEY is still supported in v3!'; exit 1)" run: "[ \"${GRADLE_ENTERPRISE_ACCESS_KEY}\" != \"\" ] || (echo 'GRADLE_ENTERPRISE_ACCESS_KEY is still supported in v3!'; exit 1)"
@@ -168,18 +157,13 @@ jobs:
matrix: matrix:
gradle: [ current, 7.6.2, 6.9.4, 5.6.4 ] gradle: [ current, 7.6.2, 6.9.4, 5.6.4 ]
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
plugin-version: [ 3.16.2, 3.17.4 ] plugin-version: [ 3.16.2, 3.19 ]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
- name: Setup Gradle - name: Setup Gradle
id: setup-gradle id: setup-gradle
uses: ./setup-gradle uses: ./setup-gradle
@@ -195,7 +179,7 @@ jobs:
run: gradle help run: gradle help
- name: Check Build Scan url - name: Check Build Scan url
if: ${{ !steps.gradle.outputs.build-scan-url }} if: ${{ !steps.gradle.outputs.build-scan-url }}
uses: actions/github-script@v7 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with: with:
script: | script: |
core.setFailed('No Build Scan detected') core.setFailed('No Build Scan detected')

View File

@@ -5,9 +5,10 @@ on:
inputs: inputs:
cache-key-prefix: cache-key-prefix:
type: string type: string
default: '0'
runner-os: runner-os:
type: string type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]' default: '["ubuntu-latest"]'
skip-dist: skip-dist:
type: boolean type: boolean
default: false default: false
@@ -17,21 +18,22 @@ env:
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: provision-gradle-versions-${{ inputs.cache-key-prefix }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: provision-gradle-versions-${{ inputs.cache-key-prefix }}
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
permissions:
contents: read
jobs: jobs:
# Tests for executing with different Gradle versions. # Tests for executing with different Gradle versions.
# Each build verifies that it is executed with the expected Gradle version. # Each build verifies that it is executed with the expected Gradle version.
provision-gradle: provision-gradle:
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
include:
- os: windows-latest
script-suffix: '.bat'
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -62,18 +64,21 @@ jobs:
uses: ./setup-gradle uses: ./setup-gradle
with: with:
gradle-version: current gradle-version: current
- name: Test use current
working-directory: .github/workflow-samples/no-wrapper
run: gradle help
- name: Check current version output parameter - name: Check current version output parameter
if: ${{ !startsWith(steps.gradle-current.outputs.gradle-version , '8.') }} if: ${{ !startsWith(steps.gradle-current.outputs.gradle-version , '8.') }}
uses: actions/github-script@v7 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with: with:
script: | script: |
core.setFailed('Gradle version parameter not set correctly: value was "${{ steps.gradle-current.outputs.gradle-version }}"') core.setFailed('Gradle version parameter not set correctly: value was "${{ steps.gradle-current.outputs.gradle-version }}"')
gradle-versions: provision-gradle-version:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
gradle: [7.3, 6.9, 5.6.4, 4.10.3, 3.5.1] gradle: ["8.11.1", 8.9, 8.1, 7.6.4, 6.9.4, 5.6.4, 4.10.3, 3.5.1]
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
include: include:
- java-version: 11 - java-version: 11
@@ -90,12 +95,12 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
- name: Setup Java - name: Setup Java
uses: actions/setup-java@v4 uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
with: with:
distribution: temurin distribution: temurin
java-version: ${{ matrix.java-version }} java-version: ${{ matrix.java-version }}
@@ -107,7 +112,7 @@ jobs:
gradle-version: ${{ matrix.gradle }} gradle-version: ${{ matrix.gradle }}
- name: Check output parameter - name: Check output parameter
if: ${{ steps.setup-gradle.outputs.gradle-version != matrix.gradle }} if: ${{ steps.setup-gradle.outputs.gradle-version != matrix.gradle }}
uses: actions/github-script@v7 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with: with:
script: | script: |
core.setFailed('Gradle version parameter not set correctly: value was "${{ steps.setup-gradle.outputs.gradle-version }}"') core.setFailed('Gradle version parameter not set correctly: value was "${{ steps.setup-gradle.outputs.gradle-version }}"')
@@ -117,7 +122,7 @@ jobs:
run: gradle help "-DgradleVersionCheck=${{matrix.gradle}}" run: gradle help "-DgradleVersionCheck=${{matrix.gradle}}"
- name: Check Build Scan url - name: Check Build Scan url
if: ${{ !steps.gradle.outputs.build-scan-url }} if: ${{ !steps.gradle.outputs.build-scan-url }}
uses: actions/github-script@v7 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with: with:
script: | script: |
core.setFailed('No Build Scan detected') core.setFailed('No Build Scan detected')

View File

@@ -5,9 +5,10 @@ on:
inputs: inputs:
cache-key-prefix: cache-key-prefix:
type: string type: string
default: '0'
runner-os: runner-os:
type: string type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]' default: '["ubuntu-latest"]'
skip-dist: skip-dist:
type: boolean type: boolean
default: false default: false
@@ -19,96 +20,123 @@ env:
SKIP_DIST: ${{ inputs.skip-dist }} SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-configuration-cache-${{ inputs.cache-key-prefix }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-configuration-cache-${{ inputs.cache-key-prefix }}
permissions:
contents: read
jobs: jobs:
seed-build-groovy: restore-cc-seed-build-groovy:
env: env:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-groovy GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-groovy
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
- name: Setup Java to ensure consistency
uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: 17
- name: Setup Gradle - name: Setup Gradle
uses: ./setup-gradle uses: ./setup-gradle
with: with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches cache-read-only: false # For testing, allow writing cache entries on non-default branches
cache-write-only: true # Ensure we start with a clean cache entry
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
gradle-version: 8.6
- name: Groovy build with configuration-cache enabled - name: Groovy build with configuration-cache enabled
working-directory: .github/workflow-samples/groovy-dsl working-directory: .github/workflow-samples/groovy-dsl
run: gradle test --configuration-cache run: gradle test --configuration-cache
verify-build-groovy: restore-cc-verify-build-groovy:
env: env:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-groovy GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-groovy
needs: seed-build-groovy GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_1
needs: restore-cc-seed-build-groovy
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
- name: Setup Java to ensure consistency - name: Setup Gradle
uses: actions/setup-java@v4 uses: ./setup-gradle
with: with:
distribution: 'liberica' cache-read-only: false
java-version: 17 cache-cleanup: on-success
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- name: Groovy build with configuration-cache enabled
id: execute
working-directory: .github/workflow-samples/groovy-dsl
run: gradle test --configuration-cache
- name: Verify configuration-cache hit
shell: bash
run: |
if [ -e ".github/workflow-samples/groovy-dsl/task-configured.txt" ]; then
echo "Configuration cache was not used - task was configured unexpectedly"
exit 1
fi
# Ensure that cache-cleanup doesn't remove all necessary files
restore-cc-verify-no-cache-cleanup-groovy:
env:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-groovy
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_2
needs: restore-cc-verify-build-groovy
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test
uses: ./.github/actions/init-integ-test
- name: Setup Gradle - name: Setup Gradle
uses: ./setup-gradle uses: ./setup-gradle
with: with:
cache-read-only: true cache-read-only: true
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
gradle-version: 8.6
- name: Groovy build with configuration-cache enabled - name: Groovy build with configuration-cache enabled
id: execute id: execute
working-directory: .github/workflow-samples/groovy-dsl working-directory: .github/workflow-samples/groovy-dsl
run: gradle test --configuration-cache run: gradle test --configuration-cache
- name: Check that configuration-cache was used - name: Verify configuration-cache hit
uses: actions/github-script@v7 shell: bash
with: run: |
script: | if [ -e ".github/workflow-samples/groovy-dsl/task-configured.txt" ]; then
const fs = require('fs') echo "Configuration cache was not used - task was configured unexpectedly"
if (fs.existsSync('.github/workflow-samples/groovy-dsl/task-configured.txt')) { exit 1
core.setFailed('Configuration cache was not used - task was configured unexpectedly') fi
}
# Check that the build can run when no extracted cache entries are restored # Check that the build can run when no extracted cache entries are restored
gradle-user-home-not-fully-restored: restore-cc-gradle-user-home-not-fully-restored:
env: env:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-groovy GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-groovy
needs: seed-build-groovy GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_x
needs: restore-cc-seed-build-groovy
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
- name: Setup Java to ensure consistency
uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: 17
- name: Setup Gradle with no extracted cache entries restored - name: Setup Gradle with no extracted cache entries restored
uses: ./setup-gradle uses: ./setup-gradle
env: env:
@@ -116,107 +144,92 @@ jobs:
with: with:
cache-read-only: true cache-read-only: true
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
gradle-version: 8.6
- name: Check execute Gradle build with configuration cache enabled (but not restored) - name: Check execute Gradle build with configuration cache enabled (but not restored)
working-directory: .github/workflow-samples/groovy-dsl working-directory: .github/workflow-samples/groovy-dsl
run: gradle test --configuration-cache run: gradle test --configuration-cache
seed-build-kotlin: restore-cc-seed-build-kotlin:
env: env:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-kotlin GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-kotlin
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
- name: Setup Java to ensure consistency
uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: 17
- name: Setup Gradle - name: Setup Gradle
uses: ./setup-gradle uses: ./setup-gradle
with: with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches cache-read-only: false # For testing, allow writing cache entries on non-default branches
cache-write-only: true # Ensure we start with a clean cache entry
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
gradle-version: 8.6
- name: Execute 'help' with configuration-cache enabled - name: Execute 'help' with configuration-cache enabled
working-directory: .github/workflow-samples/kotlin-dsl working-directory: .github/workflow-samples/kotlin-dsl
run: gradle help --configuration-cache run: gradle help --configuration-cache
modify-build-kotlin: restore-cc-modify-build-kotlin:
env: env:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-kotlin-modified GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-kotlin
needs: seed-build-kotlin GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_1
needs: restore-cc-seed-build-kotlin
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
- name: Setup Java to ensure consistency
uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: 17
- name: Setup Gradle - name: Setup Gradle
uses: ./setup-gradle uses: ./setup-gradle
with: with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches cache-read-only: false # For testing, allow writing cache entries on non-default branches
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
gradle-version: 8.6
- name: Execute 'test' with configuration-cache enabled - name: Execute 'test' with configuration-cache enabled
working-directory: .github/workflow-samples/kotlin-dsl working-directory: .github/workflow-samples/kotlin-dsl
run: gradle test --configuration-cache run: gradle test --configuration-cache
# Test restore configuration-cache from the third build invocation # Test restore configuration-cache from the third build invocation
verify-build-kotlin: restore-cc-verify-build-kotlin:
env: env:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-kotlin-modified GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-kotlin
needs: modify-build-kotlin GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_2
needs: restore-cc-modify-build-kotlin
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
- name: Setup Java to ensure consistency
uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: 17
- name: Setup Gradle - name: Setup Gradle
uses: ./setup-gradle uses: ./setup-gradle
with: with:
cache-read-only: true cache-read-only: true
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
gradle-version: 8.6
- name: Execute 'test' again with configuration-cache enabled - name: Execute 'test' again with configuration-cache enabled
id: execute id: execute
working-directory: .github/workflow-samples/kotlin-dsl working-directory: .github/workflow-samples/kotlin-dsl
run: gradle test --configuration-cache run: gradle test --configuration-cache
- name: Check that configuration-cache was used - name: Verify configuration-cache hit
uses: actions/github-script@v7 shell: bash
with: run: |
script: | if [ -e ".github/workflow-samples/kotlin-dsl/task-configured.txt" ]; then
const fs = require('fs') echo "Configuration cache was not used - task was configured unexpectedly"
if (fs.existsSync('.github/workflow-samples/kotlin-dsl/task-configured.txt')) { exit 1
core.setFailed('Configuration cache was not used - task was configured unexpectedly') fi
}

View File

@@ -5,6 +5,7 @@ on:
inputs: inputs:
cache-key-prefix: cache-key-prefix:
type: string type: string
default: '0'
skip-dist: skip-dist:
type: boolean type: boolean
default: false default: false
@@ -13,13 +14,16 @@ env:
SKIP_DIST: ${{ inputs.skip-dist }} SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-containerized-gradle-home-${{ inputs.cache-key-prefix }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-containerized-gradle-home-${{ inputs.cache-key-prefix }}
permissions:
contents: read
jobs: jobs:
seed-build: restore-containerized-seed-build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: fedora:latest container: fedora:latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -32,13 +36,13 @@ jobs:
run: ./gradlew test run: ./gradlew test
# Test that the gradle-user-home cache will cache dependencies, by running build with --offline # Test that the gradle-user-home cache will cache dependencies, by running build with --offline
dependencies-cache: restore-containerized-dependencies-cache:
needs: seed-build needs: restore-containerized-seed-build
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: fedora:latest container: fedora:latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test

View File

@@ -5,6 +5,7 @@ on:
inputs: inputs:
cache-key-prefix: cache-key-prefix:
type: string type: string
default: '0'
skip-dist: skip-dist:
type: boolean type: boolean
default: false default: false
@@ -13,12 +14,15 @@ env:
SKIP_DIST: ${{ inputs.skip-dist }} SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-custom-gradle-home-${{ inputs.cache-key-prefix }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-custom-gradle-home-${{ inputs.cache-key-prefix }}
permissions:
contents: read
jobs: jobs:
seed-build: restore-custom-gradle-home-seed-build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -35,12 +39,12 @@ jobs:
run: ./gradlew test --info run: ./gradlew test --info
# Test that the gradle-user-home cache will cache dependencies, by running build with --offline # Test that the gradle-user-home cache will cache dependencies, by running build with --offline
dependencies-cache: restore-custom-gradle-home-dependencies-cache:
needs: seed-build needs: restore-custom-gradle-home-seed-build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -57,12 +61,12 @@ jobs:
run: ./gradlew test --offline --info run: ./gradlew test --offline --info
# Test that the gradle-user-home cache will cache and restore local build-cache # Test that the gradle-user-home cache will cache and restore local build-cache
build-cache: restore-custom-gradle-home-build-cache:
needs: seed-build needs: restore-custom-gradle-home-seed-build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test

View File

@@ -5,9 +5,10 @@ on:
inputs: inputs:
cache-key-prefix: cache-key-prefix:
type: string type: string
default: '0'
runner-os: runner-os:
type: string type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]' default: '["ubuntu-latest"]'
skip-dist: skip-dist:
type: boolean type: boolean
default: false default: false
@@ -17,16 +18,20 @@ env:
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-gradle-home-${{ inputs.cache-key-prefix }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-gradle-home-${{ inputs.cache-key-prefix }}
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-gradle-home GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-gradle-home
permissions:
contents: read
jobs: jobs:
seed-build: restore-gradle-home-seed-build:
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -39,16 +44,17 @@ jobs:
run: ./gradlew test run: ./gradlew test
# Test that the gradle-user-home cache will cache dependencies, by running build with --offline # Test that the gradle-user-home cache will cache dependencies, by running build with --offline
dependencies-cache: restore-gradle-home-dependencies-cache:
needs: seed-build needs: restore-gradle-home-seed-build
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -61,16 +67,17 @@ jobs:
run: ./gradlew test --offline run: ./gradlew test --offline
# Test that the gradle-user-home cache will cache and restore local build-cache # Test that the gradle-user-home cache will cache and restore local build-cache
build-cache: restore-gradle-home-build-cache:
needs: seed-build needs: restore-gradle-home-seed-build
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -83,16 +90,17 @@ jobs:
run: ./gradlew test -DverifyCachedBuild=true run: ./gradlew test -DverifyCachedBuild=true
# Check that the build can run when Gradle User Home is not fully restored # Check that the build can run when Gradle User Home is not fully restored
no-extracted-cache-entries-restored: restore-gradle-home-no-extracted-cache-entries-restored:
needs: seed-build needs: restore-gradle-home-seed-build
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -107,16 +115,17 @@ jobs:
run: ./gradlew test run: ./gradlew test
# Test that a pre-existing gradle-user-home can be overwritten by the restored cache # Test that a pre-existing gradle-user-home can be overwritten by the restored cache
pre-existing-gradle-home: restore-gradle-home-pre-existing-gradle-home:
needs: seed-build needs: restore-gradle-home-seed-build
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test

View File

@@ -5,9 +5,10 @@ on:
inputs: inputs:
cache-key-prefix: cache-key-prefix:
type: string type: string
default: '0'
runner-os: runner-os:
type: string type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]' default: '["ubuntu-latest"]'
skip-dist: skip-dist:
type: boolean type: boolean
default: false default: false
@@ -16,16 +17,20 @@ env:
SKIP_DIST: ${{ inputs.skip-dist }} SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-java-toolchain-${{ inputs.cache-key-prefix }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-java-toolchain-${{ inputs.cache-key-prefix }}
permissions:
contents: read
jobs: jobs:
seed-build: restore-java-toolchain-seed-build:
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -38,16 +43,17 @@ jobs:
run: ./gradlew test --info run: ./gradlew test --info
# Test that the gradle-user-home cache will cache the toolchain, by running build with --offline # Test that the gradle-user-home cache will cache the toolchain, by running build with --offline
toolchain-cache: restore-java-toolchain-verify-build:
needs: seed-build needs: restore-java-toolchain-seed-build
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test

View File

@@ -5,9 +5,10 @@ on:
inputs: inputs:
cache-key-prefix: cache-key-prefix:
type: string type: string
default: '0'
runner-os: runner-os:
type: string type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]' default: '["ubuntu-latest"]'
skip-dist: skip-dist:
type: boolean type: boolean
default: false default: false
@@ -16,16 +17,20 @@ env:
SKIP_DIST: ${{ inputs.skip-dist }} SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-gradle-plugin-${{ inputs.cache-key-prefix }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-gradle-plugin-${{ inputs.cache-key-prefix }}
permissions:
contents: read
jobs: jobs:
seed-build: sample-gradle-plugin-seed-build:
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -37,16 +42,17 @@ jobs:
working-directory: .github/workflow-samples/gradle-plugin working-directory: .github/workflow-samples/gradle-plugin
run: ./gradlew build run: ./gradlew build
verify-build: sample-gradle-plugin-verify-build:
needs: seed-build needs: sample-gradle-plugin-seed-build
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test

View File

@@ -5,9 +5,10 @@ on:
inputs: inputs:
cache-key-prefix: cache-key-prefix:
type: string type: string
default: '0'
runner-os: runner-os:
type: string type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]' default: '["ubuntu-latest"]'
skip-dist: skip-dist:
type: boolean type: boolean
default: false default: false
@@ -16,16 +17,20 @@ env:
SKIP_DIST: ${{ inputs.skip-dist }} SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-kotlin-dsl-${{ inputs.cache-key-prefix }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-kotlin-dsl-${{ inputs.cache-key-prefix }}
permissions:
contents: read
jobs: jobs:
seed-build: sample-kotlin-dsl-seed-build:
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -37,16 +42,17 @@ jobs:
working-directory: .github/workflow-samples/kotlin-dsl working-directory: .github/workflow-samples/kotlin-dsl
run: ./gradlew build run: ./gradlew build
verify-build: sample-kotlin-dsl-verify-build:
needs: seed-build needs: sample-kotlin-dsl-seed-build
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test

View File

@@ -5,7 +5,7 @@ on:
inputs: inputs:
runner-os: runner-os:
type: string type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]' default: '["ubuntu-latest"]'
skip-dist: skip-dist:
type: boolean type: boolean
default: false default: false
@@ -13,8 +13,11 @@ on:
env: env:
SKIP_DIST: ${{ inputs.skip-dist }} SKIP_DIST: ${{ inputs.skip-dist }}
permissions:
contents: read
jobs: jobs:
test-setup-gradle-validation: wrapper-validation-setup-gradle:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -22,29 +25,30 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
- name: Run wrapper-validation-action - name: Run wrapper-validation-action
id: setup-gradle id: setup-gradle
uses: ./setup-gradle uses: ./setup-gradle
with: env:
validate-wrappers: true ALLOWED_GRADLE_WRAPPER_CHECKSUMS: ''
continue-on-error: true continue-on-error: true
- name: Check failure - name: Check failure
shell: bash
run: | run: |
if [ "${{ steps.setup-gradle.outcome}}" != "failure" ] ; then if [ "${{ steps.setup-gradle.outcome}}" != "failure" ] ; then
echo "Expected validation to fail, but it didn't" echo "Expected validation to fail, but it didn't"
exit 1 exit 1
fi fi
test-validation-success: wrapper-validation-success:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -54,6 +58,7 @@ jobs:
with: with:
# to allow the invalid wrapper jar present in test data # to allow the invalid wrapper jar present in test data
allow-checksums: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 allow-checksums: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
min-wrapper-count: 10
- name: Check outcome - name: Check outcome
env: env:
@@ -61,17 +66,18 @@ jobs:
# below to not accidentally inject code into shell script or break its syntax # below to not accidentally inject code into shell script or break its syntax
FAILED_WRAPPERS: ${{ steps.action-test.outputs.failed-wrapper }} FAILED_WRAPPERS: ${{ steps.action-test.outputs.failed-wrapper }}
FAILED_WRAPPERS_MATCHES: ${{ steps.action-test.outputs.failed-wrapper == '' }} FAILED_WRAPPERS_MATCHES: ${{ steps.action-test.outputs.failed-wrapper == '' }}
shell: bash
run: | run: |
if [ "$FAILED_WRAPPERS_MATCHES" != "true" ] ; then if [ "$FAILED_WRAPPERS_MATCHES" != "true" ] ; then
echo "'outputs.failed-wrapper' has unexpected content: $FAILED_WRAPPERS" echo "'outputs.failed-wrapper' has unexpected content: $FAILED_WRAPPERS"
exit 1 exit 1
fi fi
test-validation-error: wrapper-validation-error:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test - name: Initialize integ-test
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
@@ -88,6 +94,7 @@ jobs:
VALIDATION_FAILED: ${{ steps.action-test.outcome == 'failure' }} VALIDATION_FAILED: ${{ steps.action-test.outcome == 'failure' }}
FAILED_WRAPPERS: ${{ steps.action-test.outputs.failed-wrapper }} FAILED_WRAPPERS: ${{ steps.action-test.outputs.failed-wrapper }}
FAILED_WRAPPERS_MATCHES: ${{ steps.action-test.outputs.failed-wrapper == 'sources/test/jest/wrapper-validation/data/invalid/gradle-wrapper.jar|sources/test/jest/wrapper-validation/data/invalid/gradlе-wrapper.jar' }} FAILED_WRAPPERS_MATCHES: ${{ steps.action-test.outputs.failed-wrapper == 'sources/test/jest/wrapper-validation/data/invalid/gradle-wrapper.jar|sources/test/jest/wrapper-validation/data/invalid/gradlе-wrapper.jar' }}
shell: bash
run: | run: |
if [ "$VALIDATION_FAILED" != "true" ] ; then if [ "$VALIDATION_FAILED" != "true" ] ; then
echo "Expected validation to fail, but it didn't" echo "Expected validation to fail, but it didn't"
@@ -98,3 +105,64 @@ jobs:
echo "'outputs.failed-wrapper' has unexpected content: $FAILED_WRAPPERS" echo "'outputs.failed-wrapper' has unexpected content: $FAILED_WRAPPERS"
exit 1 exit 1
fi fi
wrapper-validation-minimum-wrapper-count:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test
uses: ./.github/actions/init-integ-test
- name: Run wrapper-validation-action
id: action-test
uses: ./wrapper-validation
with:
# to allow the invalid wrapper jar present in test data
allow-checksums: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
min-wrapper-count: 11
# Expected to fail; validated below
continue-on-error: true
- name: Check outcome
env:
# Evaluate workflow expressions here as env variable values instead of inside shell script
# below to not accidentally inject code into shell script or break its syntax
VALIDATION_FAILED: ${{ steps.action-test.outcome == 'failure' }}
shell: bash
run: |
if [ "$VALIDATION_FAILED" != "true" ] ; then
echo "Expected validation to fail, but it didn't"
exit 1
fi
wrapper-validation-zero-wrappers:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 # Checkout the repository with no wrappers
with:
sparse-checkout: |
.github/actions
dist
wrapper-validation
- name: Initialize integ-test
uses: ./.github/actions/init-integ-test
- name: Run wrapper-validation-action
id: action-test
uses: ./wrapper-validation
# Expected to fail; validated below
continue-on-error: true
- name: Check outcome
env:
# Evaluate workflow expressions here as env variable values instead of inside shell script
# below to not accidentally inject code into shell script or break its syntax
VALIDATION_FAILED: ${{ steps.action-test.outcome == 'failure' }}
shell: bash
run: |
if [ "$VALIDATION_FAILED" != "true" ] ; then
echo "Expected validation to fail, but it didn't"
exit 1
fi

View File

@@ -0,0 +1,55 @@
name: suite-integ-test-caching
on:
workflow_call:
inputs:
runner-os:
type: string
default: '["ubuntu-latest"]'
skip-dist:
type: boolean
default: false
permissions:
contents: read
jobs:
cache-cleanup:
uses: ./.github/workflows/integ-test-cache-cleanup.yml
with:
runner-os: '${{ inputs.runner-os }}'
skip-dist: ${{ inputs.skip-dist }}
caching-config:
uses: ./.github/workflows/integ-test-caching-config.yml
with:
runner-os: '${{ inputs.runner-os }}'
skip-dist: ${{ inputs.skip-dist }}
restore-configuration-cache:
if: ${{ ! github.event.pull_request.head.repo.fork }}
uses: ./.github/workflows/integ-test-restore-configuration-cache.yml
with:
skip-dist: ${{ inputs.skip-dist }}
secrets:
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
restore-containerized-gradle-home:
uses: ./.github/workflows/integ-test-restore-containerized-gradle-home.yml
with:
skip-dist: ${{ inputs.skip-dist }}
restore-custom-gradle-home:
uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml
with:
skip-dist: ${{ inputs.skip-dist }}
restore-gradle-home:
uses: ./.github/workflows/integ-test-restore-gradle-home.yml
with:
skip-dist: ${{ inputs.skip-dist }}
restore-java-toolchain:
uses: ./.github/workflows/integ-test-restore-java-toolchain.yml
with:
skip-dist: ${{ inputs.skip-dist }}

View File

@@ -0,0 +1,85 @@
name: suite-integ-test-other
on:
workflow_call:
inputs:
runner-os:
type: string
default: '["ubuntu-latest"]'
skip-dist:
type: boolean
default: false
permissions:
contents: read
jobs:
build-scan-publish:
uses: ./.github/workflows/integ-test-build-scan-publish.yml
with:
runner-os: '${{ inputs.runner-os }}'
skip-dist: ${{ inputs.skip-dist }}
dependency-graph:
if: ${{ ! github.event.pull_request.head.repo.fork }}
uses: ./.github/workflows/integ-test-dependency-graph.yml
permissions:
contents: write
with:
runner-os: '${{ inputs.runner-os }}'
skip-dist: ${{ inputs.skip-dist }}
dependency-submission:
if: ${{ ! github.event.pull_request.head.repo.fork }}
uses: ./.github/workflows/integ-test-dependency-submission.yml
permissions:
contents: write
with:
runner-os: '${{ inputs.runner-os }}'
skip-dist: ${{ inputs.skip-dist }}
dependency-submission-failures:
if: ${{ ! github.event.pull_request.head.repo.fork }}
uses: ./.github/workflows/integ-test-dependency-submission-failures.yml
permissions:
contents: write
with:
runner-os: '${{ inputs.runner-os }}'
skip-dist: ${{ inputs.skip-dist }}
develocity-injection:
if: ${{ ! github.event.pull_request.head.repo.fork }}
uses: ./.github/workflows/integ-test-inject-develocity.yml
with:
skip-dist: ${{ inputs.skip-dist }}
secrets:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}
provision-gradle-versions:
uses: ./.github/workflows/integ-test-provision-gradle-versions.yml
with:
runner-os: '${{ inputs.runner-os }}'
skip-dist: ${{ inputs.skip-dist }}
sample-kotlin-dsl:
uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml
with:
runner-os: '${{ inputs.runner-os }}'
skip-dist: ${{ inputs.skip-dist }}
sample-gradle-plugin:
uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml
with:
runner-os: '${{ inputs.runner-os }}'
skip-dist: ${{ inputs.skip-dist }}
toolchain-detection:
uses: ./.github/workflows/integ-test-detect-toolchains.yml
with:
skip-dist: ${{ inputs.skip-dist }}
wrapper-validation:
uses: ./.github/workflows/integ-test-wrapper-validation.yml
with:
runner-os: '${{ inputs.runner-os }}'
skip-dist: ${{ inputs.skip-dist }}

View File

@@ -7,20 +7,22 @@ on:
workflow_dispatch: workflow_dispatch:
permissions: permissions:
contents: write contents: read
pull-requests: write
jobs: jobs:
update-checksums: update-checksums:
permissions:
contents: write
pull-requests: write
name: Update checksums name: Update checksums
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with: with:
node-version: 20 node-version: 20
cache: npm cache: npm
@@ -28,7 +30,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
npm install typed-rest-client@1.8.11 --no-save npm clean-install typed-rest-client@1.8.11 --no-save
working-directory: sources working-directory: sources
- name: Update checksums file - name: Update checksums file
@@ -37,7 +39,7 @@ jobs:
# If there are no changes, this action will not create a pull request # If there are no changes, this action will not create a pull request
- name: Create or update pull request - name: Create or update pull request
uses: peter-evans/create-pull-request@v6 uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
with: with:
branch: bot/wrapper-checksums-update branch: bot/wrapper-checksums-update
commit-message: Update known wrapper checksums commit-message: Update known wrapper checksums

View File

@@ -3,23 +3,9 @@
The `build` script in the project root provides a convenient way to perform many local build tasks: The `build` script in the project root provides a convenient way to perform many local build tasks:
1. `./build` will lint and compile typescript sources 1. `./build` will lint and compile typescript sources
2. `./build all` will lint and compile typescript and run unit tests 2. `./build all` will lint and compile typescript and run unit tests
3. `./build init-scripts` will run the init-script integration tests 3. `./build install` will install npm packages followed by lint and compile
4. `./build act <act-commands>` will run `act` after building local changes (see below) 4. `./build init-scripts` will run the init-script integration tests
5. `./build act <act-commands>` will run `act` after building local changes (see below)
## How to merge a Dependabot PR
The "distribution" for a GitHub Action is checked into the repository itself.
In the case of these actions, the transpiled sources are committed to the `dist` directory.
Any production dependencies are inlined into the distribution.
So if a Dependabot PR updates a production dependency (or a dev dependency that changes the distribution, like the Typescript compiler),
then a manual step is required to rebuild the dist and commit.
The simplest process to follow is:
1. Checkout the dependabot branch locally eg: `git checkout dependabot/npm_and_yarn/actions/github-5.1.0`
2. In the `sources` directory, run `npm install` to download NPM dependencies
3. In the `sources` directory, run `npm run build` to regenerate the distribution
4. Push the changes to the dependabot branch
5. If/when the checks pass, you can merge the dependabot PR
## Using `act` to run integ-test workflows locally ## Using `act` to run integ-test workflows locally
@@ -36,7 +22,6 @@ Example running a single job:
`./build act -W .github/workflows/integ-test-caching-config.yml -j cache-disabled-pre-existing-gradle-home` `./build act -W .github/workflows/integ-test-caching-config.yml -j cache-disabled-pre-existing-gradle-home`
Known issues: Known issues:
- `integ-test-cache-cleanup.yml` fails because `gradle` is not installed on the runner. Should be fixed by #33.
- `integ-test-detect-java-toolchains.yml` fails when running on a `linux/amd64` container, since the expected pre-installed JDKs are not present. Should be fixed by #89. - `integ-test-detect-java-toolchains.yml` fails when running on a `linux/amd64` container, since the expected pre-installed JDKs are not present. Should be fixed by #89.
- `act` is not yet compatible with `actions/upload-artifact@v4` (or related toolkit functions) - `act` is not yet compatible with `actions/upload-artifact@v4` (or related toolkit functions)
- See https://github.com/nektos/act/pull/2224 - See https://github.com/nektos/act/pull/2224

View File

@@ -1,5 +1,7 @@
# GitHub Actions for Gradle builds # GitHub Actions for Gradle builds
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/gradle/actions/badge)](https://scorecard.dev/viewer/?uri=github.com/gradle/actions)
This repository contains a set of GitHub Actions that are useful for building Gradle projects on GitHub. This repository contains a set of GitHub Actions that are useful for building Gradle projects on GitHub.
## The `setup-gradle` action ## The `setup-gradle` action
@@ -30,7 +32,7 @@ jobs:
distribution: 'temurin' distribution: 'temurin'
java-version: 17 java-version: 17
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle - name: Build with Gradle
run: ./gradlew build run: ./gradlew build
``` ```
@@ -68,7 +70,7 @@ jobs:
distribution: 'temurin' distribution: 'temurin'
java-version: 17 java-version: 17
- name: Generate and submit dependency graph - name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3 uses: gradle/actions/dependency-submission@v4
``` ```
See the [full action documentation](docs/dependency-submission.md) for more advanced usage scenarios. See the [full action documentation](docs/dependency-submission.md) for more advanced usage scenarios.
@@ -79,6 +81,9 @@ The `wrapper-validation` action validates the checksums of _all_ [Gradle Wrapper
The action should be run in the root of the repository, as it will recursively search for any files named `gradle-wrapper.jar`. The action should be run in the root of the repository, as it will recursively search for any files named `gradle-wrapper.jar`.
Starting with v4 the `setup-gradle` action will [perform wrapper validation](docs/setup-gradle.md#gradle-wrapper-validation) on each execution.
If you are using `setup-gradle` in your workflows, it is unlikely that you will need to use the `wrapper-validation` action.
### Example workflow ### Example workflow
```yaml ```yaml
@@ -94,7 +99,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v3 - uses: gradle/actions/wrapper-validation@v4
``` ```
See the [full action documentation](docs/wrapper-validation.md) for more advanced usage scenarios. See the [full action documentation](docs/wrapper-validation.md) for more advanced usage scenarios.

View File

@@ -5,58 +5,27 @@
- Check that https://github.com/gradle/actions/actions is green for all workflows for the main branch. - Check that https://github.com/gradle/actions/actions is green for all workflows for the main branch.
- This should include any workflows triggered by `[bot] Update dist directory` - This should include any workflows triggered by `[bot] Update dist directory`
- Decide on the version number to use for the release. The action releases should follow semantic versioning. - Decide on the version number to use for the release. The action releases should follow semantic versioning.
- By default, a patch release is assumed (eg. `3.0.0``3.0.1`) - By default, a patch release is assumed (eg. `4.0.0``4.0.1`)
- If new features have been added, bump the minor version (eg `3.1.1``3.2.0`) - If new features have been added, bump the minor version (eg `4.1.1``4.2.0`)
- If a new major release is required, bump the major version (eg `3.1.1``4.0.0`) - If a new major release is required, bump the major version (eg `4.1.1``5.0.0`)
- Note: The gradle actions follow the GitHub Actions convention of including a .0 patch number for the first release of a minor version, unlike the Gradle convention which omits the trailing .0. - Note: The gradle actions follow the GitHub Actions convention of including a .0 patch number for the first release of a minor version, unlike the Gradle convention which omits the trailing .0.
## Release gradle/actions ## Release gradle/actions
- Create a tag for the release. The tag should have the format `v3.1.0` - Create a tag for the release. The tag should have the format `v4.1.0`
- From CLI: `git tag v3.1.0 && git push --tags` - From CLI: `git tag v4.1.0 && git push --tags`
- Go to https://github.com/gradle/actions/releases and "Draft new release" - Go to https://github.com/gradle/actions/releases and "Draft new release"
- Use the newly created tag and copy the tag name exactly as the release title. - Use the newly created tag and copy the tag name exactly as the release title.
- Craft release notes content based on issues closed, PRs merged and commits - Craft release notes content based on issues closed, PRs merged and commits
- Include a Full changelog link in the format https://github.com/gradle/actions/compare/v2.12.0...v3.0.0 - Include a Full changelog link in the format https://github.com/gradle/actions/compare/v2.12.0...v3.0.0
- Publish the release. - Publish the release.
- Force push the `v3` tag (or current major version) to point to the new release. It is conventional for users to bind to a major release version using this tag. - Force push the `v4` tag (or current major version) to point to the new release. It is conventional for users to bind to a major release version using this tag.
- From CLI: `git tag -f -a -m "v3.0.0" v3 v3.0.0 && git push -f --tags` - From CLI: `git tag -f -a -m "v4.0.0" v4 v4.0.0 && git push -f --tags`
- Note that we set the commit message for the tag to the newly released version. - Note that we set the commit message for the tag to the newly released version.
## Release gradle/gradle-build-action
During the 3.x release series, we will continue to publish parallel releases of `gradle/gradle-build-action`. These releases will simply delegate to `gradle/actions/setup-gradle` with the same version.
- Update the [gradle-build-action action.yml](https://github.com/gradle/gradle-build-action/blob/main/action.yml#L162) file to point to the newly released version of `gradle/actions/setup-gradle`.
- Ensure that any parameters that have been added to the setup-gradle action are added to the gradle-build-action definition, and that these are passed on to setup-gradle.
- Create and push a tag for the release.
- From CLI: `git tag v3.1.0 && git push --tags`
- Go to https://github.com/gradle/gradle-build-action/releases and "Draft new release"
- Use the newly created tag and copy the tag name exactly as the release title.
- In the release notes, point users to the gradle/actions release. Include a header informing users to switch to `gradle/actions/setup-gradle`.
- Publish the release.
- Force push the `v3` tag (or current major version) to point to the new release.
- From CLI: `git tag -f -a -m "v3.0.0" v3 v3.0.0 && git push -f --tags`
## Release gradle/wrapper-validation-action
During the 3.x release series, we will continue to publish parallel releases of `gradle/wrapper-validation-action`. These releases will simply delegate to `gradle/actions/wrapper-validation` with the same version.
- Update the [wrapper-validation-action action.yml](https://github.com/gradle/wrapper-validation-action/blob/main/action.yml#L162) file to point to the newly released version of `gradle/actions/wrapper-validation`.
- Ensure that any parameters that have been added to the `wrapper-validation` action (if any) are added to the action definition, and that these are passed on to setup-gradle.
- Create and push a tag for the release.
- From CLI: `git tag v3.1.0 && git push --tags`
- Go to https://github.com/gradle/wrapper-validation-action/releases and "Draft new release"
- Use the newly created tag and copy the tag name exactly as the release title.
- In the release notes, point users to the gradle/actions release. Include a header informing users to switch to `gradle/actions/wrapper-validation`.
- Publish the release.
- Force push the `v3` tag (or current major version) to point to the new release.
- From CLI: `git tag -f -a -m "v3.0.0" v3 v3.0.0 && git push -f --tags`
## Post release steps ## Post release steps
Submit PRs to update the GitHub starter workflow. Starter workflows contain content that should reference the Git hash of the current gradle/actions release: Submit PRs to update the GitHub starter workflow. Starter workflows contain content that should reference the Git hash of the current gradle/actions release:
https://github.com/actions/starter-workflows has [gradle](https://github.com/actions/starter-workflows/blob/main/ci/gradle.yml) and [gradle-publish](https://github.com/actions/starter-workflows/blob/main/ci/gradle-publish.yml): see [the v2.1.4 update PR](https://github.com/actions/starter-workflows/pull/1489) for an example. https://github.com/actions/starter-workflows has [gradle](https://github.com/actions/starter-workflows/blob/main/ci/gradle.yml) and [gradle-publish](https://github.com/actions/starter-workflows/blob/main/ci/gradle-publish.yml): see [the v4.0.0 update PR](https://github.com/actions/starter-workflows/pull/2468) for an example.
Submit PRs to update the GitHub documentation. The documentation contains content that should reference the Git hash of the current gradle/actions release: Submit PRs to update the GitHub documentation. The documentation contains content that should reference the Git hash of the current gradle/actions release:
https://github.com/github/docs has [building-and-testing-java-with-gradle](https://github.com/github/docs/blob/main/content/actions/automating-builds-and-tests/building-and-testing-java-with-gradle.md) and [publishing-java-packages-with-gradle](https://github.com/github/docs/blob/main/content/actions/publishing-packages/publishing-java-packages-with-gradle.md) : see [the v2.1.4 update PR](https://github.com/github/docs/pull/16392) for an example. https://github.com/github/docs has [building-and-testing-java-with-gradle](https://github.com/github/docs/blob/main/content/actions/automating-builds-and-tests/building-and-testing-java-with-gradle.md) and [publishing-java-packages-with-gradle](https://github.com/github/docs/blob/main/content/actions/publishing-packages/publishing-java-packages-with-gradle.md) : see [the v4.0.0 update PR](https://github.com/github/docs/pull/34239) for an example.

17
build
View File

@@ -4,12 +4,10 @@ cd sources
case "$1" in case "$1" in
all) all)
npm clean-install
npm run all npm run all
;; ;;
act) act)
# Build and copy outputs to the dist directory # Build and copy outputs to the dist directory
npm install
npm run build npm run build
cd .. cd ..
cp -r sources/dist . cp -r sources/dist .
@@ -18,18 +16,21 @@ case "$1" in
# Revert the changes to the dist directory # Revert the changes to the dist directory
git checkout -- dist git checkout -- dist
;; ;;
init-scripts)
cd test/init-scripts
./gradlew check
;;
dist) dist)
npm install npm clean-install
npm run build npm run build
cd .. cd ..
cp -r sources/dist . cp -r sources/dist .
;; ;;
init-scripts)
cd test/init-scripts
./gradlew check
;;
install)
npm clean-install
npm run build
;;
*) *)
npm install
npm run build npm run build
;; ;;
esac esac

View File

@@ -29,7 +29,7 @@ jobs:
distribution: 'temurin' distribution: 'temurin'
java-version: 17 java-version: 17
- name: Generate and submit dependency graph - name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3 uses: gradle/actions/dependency-submission@v4
``` ```
See the [full action documentation](../docs/dependency-submission.md) for more advanced usage scenarios. See the [full action documentation](../docs/dependency-submission.md) for more advanced usage scenarios.

View File

@@ -57,6 +57,20 @@ inputs:
Configuration-cache data will not be saved/restored without an encryption key being provided. Configuration-cache data will not be saved/restored without an encryption key being provided.
required: false required: false
cache-cleanup:
description: |
Specifies if the action should attempt to remove any stale/unused entries from the Gradle User Home prior to saving to the GitHub Actions cache.
By default ('on-success'), cleanup is performed when all Gradle builds succeed for the Job.
This behaviour can be disabled ('never'), or configured to always run irrespective of the build outcome ('always').
Valid values are 'never', 'on-success' and 'always'.
required: false
default: 'on-success'
gradle-home-cache-cleanup:
description: When 'true', the action will attempt to remove any stale/unused entries from the Gradle User Home prior to saving to the GitHub Actions cache.
required: false
deprecation-message: This input has been superceded by the 'cache-cleanup' input parameter.
gradle-home-cache-includes: gradle-home-cache-includes:
description: Paths within Gradle User Home to cache. description: Paths within Gradle User Home to cache.
required: false required: false
@@ -68,11 +82,6 @@ inputs:
description: Paths within Gradle User Home to exclude from cache. description: Paths within Gradle User Home to exclude from cache.
required: false required: false
gradle-home-cache-cleanup:
description: When 'true', the action will attempt to remove any stale/unused entries from the Gradle User Home prior to saving to the GitHub Actions cache.
required: false
default: false
# Job summary configuration # Job summary configuration
add-job-summary: add-job-summary:
description: Specifies when a Job Summary should be inluded in the action results. Valid values are 'never', 'always' (default), and 'on-failure'. description: Specifies when a Job Summary should be inluded in the action results. Valid values are 'never', 'always' (default), and 'on-failure'.
@@ -99,11 +108,42 @@ inputs:
required: false required: false
default: 'generate-and-submit' default: 'generate-and-submit'
dependency-graph-report-dir:
description: |
Specifies where the dependency graph report will be generated.
Paths can relative or absolute. Relative paths are resolved relative to the workspace directory.
required: false
default: 'dependency-graph-reports'
dependency-graph-continue-on-failure: dependency-graph-continue-on-failure:
description: When 'false' a failure to generate or submit a dependency graph will fail the Step or Job. When 'true' a warning will be emitted but no failure will result. description: When 'false' a failure to generate or submit a dependency graph will fail the Step or Job. When 'true' a warning will be emitted but no failure will result.
required: false required: false
default: false default: false
dependency-graph-exclude-projects:
description: |
Gradle projects that should be excluded from dependency graph (regular expression).
When set, any matching project will be excluded.
required: false
dependency-graph-include-projects:
description: |
Gradle projects that should be included in dependency graph (regular expression).
When set, only matching projects will be included.
required: false
dependency-graph-exclude-configurations:
description: |
Gradle configurations that should be included in dependency graph (regular expression).
When set, anymatching configurations will be excluded.
required: false
dependency-graph-include-configurations:
description: |
Gradle configurations that should be included in dependency graph (regular expression).
When set, only matching configurations will be included.
required: false
artifact-retention-days: artifact-retention-days:
description: Specifies the number of days to retain any artifacts generated by the action. If not set, the default retention settings for the repository will apply. description: Specifies the number of days to retain any artifacts generated by the action. If not set, the default retention settings for the repository will apply.
required: false required: false
@@ -133,22 +173,22 @@ inputs:
description: The Develocity short-lived access tokens expiry in hours. Default is 2 hours. description: The Develocity short-lived access tokens expiry in hours. Default is 2 hours.
required: false required: false
# Wrapper validation configuration
validate-wrappers:
description: |
When 'true' the action will automatically validate all wrapper jars found in the repository.
If the wrapper checksums are not valid, the action will fail.
required: false
default: false
allow-snapshot-wrappers:
description: |
When 'true', wrapper validation will include the checksums of snapshot wrapper jars.
Use this if you are running with nightly or snapshot versions of the Gradle wrapper.
required: false
default: false
# DEPRECATED ACTION INPUTS # DEPRECATED ACTION INPUTS
build-scan-terms-of-service-url:
description: The URL to the Build Scan® terms of use. This input must be set to 'https://gradle.com/terms-of-service'.
required: false
deprecation-message: The input has been renamed to align with the Develocity API. Use 'build-scan-terms-of-use-url' instead.
build-scan-terms-of-service-agree:
description: Indicate that you agree to the Build Scan® terms of use. This input value must be "yes".
required: false
deprecation-message: The input has been renamed to align with the Develocity API. Use 'build-scan-terms-of-use-agree' instead.
generate-job-summary:
description: When 'false', no Job Summary will be generated for the Job.
required: false
default: true
deprecation-message: Superceded by the new 'add-job-summary' and 'add-job-summary-as-pr-comment' parameters.
# EXPERIMENTAL ACTION INPUTS # EXPERIMENTAL ACTION INPUTS
# The following action properties allow fine-grained tweaking of the action caching behaviour. # The following action properties allow fine-grained tweaking of the action caching behaviour.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -13,7 +13,7 @@ The generated dependency graph includes all of the dependencies in your build, a
for vulnerable dependencies, as well as to populate the for vulnerable dependencies, as well as to populate the
[Dependency Graph insights view](https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#viewing-the-dependency-graph). [Dependency Graph insights view](https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#viewing-the-dependency-graph).
If your confused by the behaviour you're seeing or have specific questions, please check out [the FAQ](dependency-submission-faq.md) before raising an issue. If you're confused by the behaviour you're seeing or have specific questions, please check out [the FAQ](dependency-submission-faq.md) before raising an issue.
## General usage ## General usage
@@ -43,7 +43,7 @@ jobs:
java-version: 17 java-version: 17
- name: Generate and submit dependency graph - name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3 uses: gradle/actions/dependency-submission@v4
``` ```
### Gradle execution ### Gradle execution
@@ -68,7 +68,7 @@ Three input parameters are required, one to enable publishing and two more to ac
```yaml ```yaml
- name: Generate and submit dependency graph - name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3 uses: gradle/actions/dependency-submission@v4
with: with:
build-scan-publish: true build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use" build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
@@ -83,7 +83,7 @@ In some cases, the default action configuration will not be sufficient, and addi
```yaml ```yaml
- name: Generate and save dependency graph - name: Generate and save dependency graph
uses: gradle/actions/dependency-submission@v3 uses: gradle/actions/dependency-submission@v4
with: with:
# Use a particular Gradle version instead of the configured wrapper. # Use a particular Gradle version instead of the configured wrapper.
gradle-version: 8.6 gradle-version: 8.6
@@ -102,6 +102,13 @@ In some cases, the default action configuration will not be sufficient, and addi
# Do not attempt to submit the dependency-graph. Save it as a workflow artifact. # Do not attempt to submit the dependency-graph. Save it as a workflow artifact.
dependency-graph: generate-and-upload dependency-graph: generate-and-upload
# Specify the location where dependency graph files will be generated.
dependency-graph-report-dir: custom-report-dir
# By default, failure to generate a dependency graph will cause the workflow to fail
dependency-graph-continue-on-failure: true
``` ```
See the [Action Metadata file](../dependency-submission/action.yml) for a more detailed description of each input parameter. See the [Action Metadata file](../dependency-submission/action.yml) for a more detailed description of each input parameter.
@@ -235,26 +242,26 @@ contribute to the dependency graph.
> These dependencies would be assigned to different scopes (eg development, runtime, testing) and the GitHub UI would make it easy to opt-in to security alerts for different dependency scopes. > These dependencies would be assigned to different scopes (eg development, runtime, testing) and the GitHub UI would make it easy to opt-in to security alerts for different dependency scopes.
> However, this functionality does not yet exist. > However, this functionality does not yet exist.
### Excluding certain Gradle projects from the dependency graph ### Selecting Gradle projects that will contribute to the dependency graph
If you do not want the dependency graph to include dependencies from every project in your build, If you do not want the dependency graph to include dependencies from every project in your build,
you can easily exclude certain projects from the dependency extraction process. you can easily exclude or include certain projects from the dependency extraction process.
To restrict which Gradle subprojects contribute to the report, specify which projects to exclude via a regular expression. To restrict which Gradle subprojects contribute to the report, specify which projects to exclude or include via a regular expression.
You can provide this value via the `DEPENDENCY_GRAPH_EXCLUDE_PROJECTS` environment variable or system property. You can use the `dependency-graph-exclude-projects` and `dependency-graph-include-projects` input parameters for this purpose.
Note that excluding a project in this way only removes dependencies that are _resolved_ as part of that project, and may Note that excluding a project in this way only removes dependencies that are _resolved_ as part of that project, and may
not necessarily remove all dependencies _declared_ in that project. If another project depends on the excluded project not necessarily remove all dependencies _declared_ in that project. If another project depends on the excluded project
then it may transitively resolve dependencies declared in the excluded project: these dependencies will still be included then it may transitively resolve dependencies declared in the excluded project: these dependencies will still be included
in the generated dependency graph. in the generated dependency graph.
### Excluding certain Gradle configurations from the dependency graph ### Selecting Gradle configurations that will contribute to the dependency graph
Similarly to Gradle projects, it is possible to exclude a set of configuration instances from dependency graph generation, Similarly to Gradle projects, it is possible to exclude or include a set of dependency configurations from dependency graph generation,
so that dependencies resolved by those configurations are not included. so that only dependencies resolved by the included configurations are reported.
To restrict which Gradle configurations contribute to the report, specify which configurations to exclude via a regular expression. To restrict which Gradle configurations contribute to the report, specify which configurations to exclude or include via a regular expression.
You can provide this value via the `DEPENDENCY_GRAPH_EXCLUDE_CONFIGURATIONS` environment variable or system property. You can use the `dependency-graph-exclude-configurations` and `dependency-graph-include-configurations` input parameters for this purpose.
Note that configuration exclusion applies to the configuration in which the dependency is _resolved_ which is not necessarily Note that configuration exclusion applies to the configuration in which the dependency is _resolved_ which is not necessarily
the configuration where the dependency is _declared_. For example if you decare a dependency as `implementation` in the configuration where the dependency is _declared_. For example if you decare a dependency as `implementation` in
@@ -262,24 +269,18 @@ a Java project, that dependency will be resolved in `compileClasspath`, `runtime
### Example of project and configuration filtering ### Example of project and configuration filtering
For example, if you want to exclude dependencies in the `buildSrc` project, and exclude dependencies from the `testCompileClasspath` and `testRuntimeClasspath` configurations, you would use the following configuration: For example, if you want to exclude dependencies resolved by the `buildSrc` project, and exclude dependencies from the `testCompileClasspath` and `testRuntimeClasspath` configurations, you would use the following configuration:
```yaml ```yaml
- name: Generate and submit dependency graph - name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3 uses: gradle/actions/dependency-submission@v4
env: with:
# Exclude all dependencies that originate solely in the 'buildSrc' project # Exclude all dependencies that originate solely in the 'buildSrc' project
DEPENDENCY_GRAPH_EXCLUDE_PROJECTS: ':buildSrc' dependency-graph-exclude-projects: ':buildSrc'
# Exclude dependencies that are only resolved in test classpaths # Exclude dependencies that are only resolved in test classpaths
DEPENDENCY_GRAPH_EXCLUDE_CONFIGURATIONS: '.*[Tt]est(Compile|Runtime)Classpath' dependency-graph-exclude-configurations: '.*[Tt]est(Compile|Runtime)Classpath'
``` ```
### Other filtering options
The [GitHub Dependency Graph Gradle Plugin](https://plugins.gradle.org/plugin/org.gradle.github-dependency-graph-gradle-plugin)
has other filtering options that may be useful.
See [the docs](https://github.com/gradle/github-dependency-graph-gradle-plugin?tab=readme-ov-file#filtering-which-gradle-configurations-contribute-to-the-dependency-graph) for details.
# Advance usage scenarios # Advance usage scenarios
## Using a custom plugin repository ## Using a custom plugin repository
@@ -316,10 +317,10 @@ jobs:
java-version: 17 java-version: 17
- name: Generate and submit dependency graph - name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3 uses: gradle/actions/dependency-submission@v4
- name: Perform dependency review - name: Perform dependency review
uses: actions/dependency-review-action@v3 uses: actions/dependency-review-action@v4
``` ```
## Usage with pull requests from public forked repositories ## Usage with pull requests from public forked repositories
@@ -352,7 +353,7 @@ jobs:
java-version: 17 java-version: 17
- name: Generate and save dependency graph - name: Generate and save dependency graph
uses: gradle/actions/dependency-submission@v3 uses: gradle/actions/dependency-submission@v4
with: with:
dependency-graph: generate-and-upload dependency-graph: generate-and-upload
``` ```
@@ -375,7 +376,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Download and submit dependency graph - name: Download and submit dependency graph
uses: gradle/actions/dependency-submission@v3 uses: gradle/actions/dependency-submission@v4
with: with:
dependency-graph: download-and-submit # Download saved dependency-graph and submit dependency-graph: download-and-submit # Download saved dependency-graph and submit
``` ```
@@ -402,7 +403,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: 'Dependency Review' - name: 'Dependency Review'
uses: actions/dependency-review-action@v3 uses: actions/dependency-review-action@v4
with: with:
retry-on-snapshot-warnings: true retry-on-snapshot-warnings: true
retry-on-snapshot-warnings-timeout: 600 retry-on-snapshot-warnings-timeout: 600
@@ -418,3 +419,10 @@ Gradle versions `5.2.1`, `5.6.4`, `6.0.1`, `6.9.4`, `7.1.1` and `7.6.3`, as well
A known exception to this is that Gradle `7.0`, `7.0.1` and `7.0.2` are not supported. A known exception to this is that Gradle `7.0`, `7.0.1` and `7.0.2` are not supported.
See [here](https://github.com/gradle/github-dependency-graph-gradle-plugin?tab=readme-ov-file#gradle-compatibility) for complete compatibility information. See [here](https://github.com/gradle/github-dependency-graph-gradle-plugin?tab=readme-ov-file#gradle-compatibility) for complete compatibility information.
# Additional references
- Dependency Submission Demo repository: https://github.com/gradle/github-dependency-submission-demo
- GitHub Dependency Graph Gradle Plugin: https://github.com/gradle/github-dependency-graph-gradle-plugin
- Webinar - Gradle at Scale with GitHub and GitHub Actions at Allegro: https://www.youtube.com/watch?v=gV94I28FPos

View File

@@ -20,7 +20,7 @@ To convert your workflows, simply replace:
``` ```
with with
``` ```
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
``` ```
## The action `gradle/wrapper-validation-action` has been replaced by `gradle/actions/wrapper-validation` ## The action `gradle/wrapper-validation-action` has been replaced by `gradle/actions/wrapper-validation`
@@ -40,7 +40,7 @@ To convert your workflows, simply replace:
``` ```
with with
``` ```
uses: gradle/actions/wrapper-validation@v3 uses: gradle/actions/wrapper-validation@v4
``` ```
## Using the action to execute Gradle via the `arguments` parameter is deprecated ## Using the action to execute Gradle via the `arguments` parameter is deprecated
@@ -82,7 +82,7 @@ The exact syntax depends on whether or not your project is configured with the [
``` ```
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
- name: Assemble the project - name: Assemble the project
run: ./gradlew assemble run: ./gradlew assemble
@@ -99,9 +99,9 @@ The exact syntax depends on whether or not your project is configured with the [
``` ```
- name: Setup Gradle for a non-wrapper project - name: Setup Gradle for a non-wrapper project
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
with: with:
gradle-version: 8.8 gradle-version: "8.11"
- name: Assemble the project - name: Assemble the project
run: gradle assemble run: gradle assemble
@@ -148,3 +148,15 @@ These deprecated build-scan parameters are scheduled to be removed in `setup-gra
Gradle Enterprise has been renamed to Develocity starting from Gradle plugin 3.17 and Develocity server 2024.1. Gradle Enterprise has been renamed to Develocity starting from Gradle plugin 3.17 and Develocity server 2024.1.
In v4 release of the action, it will require setting the access key with the `develocity-access-key` input and Develocity 2024.1 at least to generate short-lived tokens. In v4 release of the action, it will require setting the access key with the `develocity-access-key` input and Develocity 2024.1 at least to generate short-lived tokens.
If those requirements are not met, the `GRADLE_ENTERPRISE_ACCESS_KEY` env var will be cleared out and build scan publication or other authenticated Develocity operations won't be possible. If those requirements are not met, the `GRADLE_ENTERPRISE_ACCESS_KEY` env var will be cleared out and build scan publication or other authenticated Develocity operations won't be possible.
## The `gradle-home-cache-cleanup` input parameter has been replaced by `cache-cleanup`
In versions of the action prior to `v4`, the boolean `gradle-home-cache-cleanup` parameter allows users to opt-in
to cache cleanup, removing unused files in Gradle User Home prior to saving to the cache.
With `v4`, cache-cleanup is enabled by default, and controlled by the `cache-cleanup` input parameter.
To remove this deprecation:
- If you are using `gradle-home-cache-cleanup: true` in your workflow, you can remove this option as this is now enabled by default.
- If you want cache-cleanup to run even when a Gradle build fails, then add the `cache-cleanup: always` input.
- If cache-cleanup is causing problems with your workflow, you can disable it with `cache-cleanup: never`.

View File

@@ -45,7 +45,7 @@ jobs:
java-version: 17 java-version: 17
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
- name: Execute Gradle build - name: Execute Gradle build
run: ./gradlew build run: ./gradlew build
@@ -57,11 +57,11 @@ The `setup-gradle` action can download and install a specified Gradle version, a
Downloaded Gradle versions are stored in the GitHub Actions cache, to avoid having to download them again later. Downloaded Gradle versions are stored in the GitHub Actions cache, to avoid having to download them again later.
```yaml ```yaml
- name: Setup Gradle 8.5 - name: Setup Gradle 8.10
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
with: with:
gradle-version: 8.5 gradle-version: "8.10" # Quotes required to prevent YAML converting to number
- name: Build with Gradle 8.5 - name: Build with Gradle 8.10
run: gradle build run: gradle build
``` ```
@@ -96,7 +96,7 @@ jobs:
distribution: temurin distribution: temurin
java-version: 17 java-version: 17
- uses: gradle/actions/setup-gradle@v3 - uses: gradle/actions/setup-gradle@v4
id: setup-gradle id: setup-gradle
with: with:
gradle-version: release-candidate gradle-version: release-candidate
@@ -127,6 +127,8 @@ cache-disabled: true
By default, The `setup-gradle` action will only write to the cache from Jobs on the default (`main`/`master`) branch. By default, The `setup-gradle` action will only write to the cache from Jobs on the default (`main`/`master`) branch.
Jobs on other branches will read entries from the cache but will not write updated entries. Jobs on other branches will read entries from the cache but will not write updated entries.
This setup is designed around [GitHub imposed restrictions on cache access](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache) and should work well in most scenarios.
See [Optimizing cache effectiveness](#select-which-branches-should-write-to-the-cache) for a more detailed explanation. See [Optimizing cache effectiveness](#select-which-branches-should-write-to-the-cache) for a more detailed explanation.
In some circumstances, it makes sense to change this default and configure a workflow Job to read existing cache entries but not to write changes back. In some circumstances, it makes sense to change this default and configure a workflow Job to read existing cache entries but not to write changes back.
@@ -153,9 +155,32 @@ In certain circumstances it may be desirable to start with a clean Gradle User H
cache-write-only: true cache-write-only: true
``` ```
### Configuring cache cleanup
The Gradle User Home directory tends to grow over time. When you switch to a new Gradle wrapper version
or upgrade a dependency version the old files are not automatically and immediately removed.
While this can make sense in a local environment, in a GitHub Actions environment
it can lead to ever-larger Gradle User Home cache entries being saved and restored.
To avoid this situation, the `setup-gradle` and `dependency-submission` actions will perform "cache-cleanup",
purging any unused files from the Gradle User Home before saving it to the GitHub Actions cache.
Cache cleanup will attempt to remove any files that are initially restored to the Gradle User Home directory
but that are not used used by Gradle during the GitHub Actions Workflow.
If a Gradle build fails when running the Job, then it is possible that some required files and dependencies
will not be touched during the Job. To prevent these files from being purged, the default behavior is for
cache cleanup to run only when all Gradle builds in the Job are successful.
Gradle Home cache cleanup is enabled by default, and can be controlled by the `cache-cleanup` parameter as follows:
- `cache-cleanup: always`: Always run cache cleanup, even when a Gradle build fails in the Job.
- `cache-cleanup: on-success` (default): Run cache cleanup when the Job contains no failing Gradle builds.
- `cache-cleanup: never`: Disable cache cleanup for the Job.
Cache cleanup will never run when the cache is configured as read-only or disabled.
### Overwriting an existing Gradle User Home ### Overwriting an existing Gradle User Home
When the action detects that the Gradle User Home caches directory already exists (`~/.gradle/caches`), then by default it will not overwrite the existing content of this directory. When the action detects that the Gradle User Home caches directory already exists (`$GRADLE_USER_HOME/caches`), then by default it will not overwrite the existing content of this directory.
This can occur when a prior action initializes this directory, or when using a self-hosted runner that retains this directory between uses. This can occur when a prior action initializes this directory, or when using a self-hosted runner that retains this directory between uses.
In this case, the Job Summary will display a message like: In this case, the Job Summary will display a message like:
@@ -173,6 +198,9 @@ When Gradle is executed with the [configuration-cache](https://docs.gradle.org/c
in the project directory, at `<project-dir>/.gradle/configuration-cache`. Due to the way the configuration-cache works, [this file may contain stored credentials and other in the project directory, at `<project-dir>/.gradle/configuration-cache`. Due to the way the configuration-cache works, [this file may contain stored credentials and other
secrets](https://docs.gradle.org/release-nightly/userguide/configuration_cache.html#config_cache:secrets), and this data needs to be encrypted to be safely stored in the GitHub Actions cache. secrets](https://docs.gradle.org/release-nightly/userguide/configuration_cache.html#config_cache:secrets), and this data needs to be encrypted to be safely stored in the GitHub Actions cache.
> [!IMPORTANT]
> To avoid potentially leaking secrets in the configuration-cache entry, the action will only save or restore configuration-cache data if the `cache-encryption-key` parameter is set.
To benefit from configuration caching in your GitHub Actions workflow, you must: To benefit from configuration caching in your GitHub Actions workflow, you must:
- Execute your build with Gradle 8.6 or newer. This can be achieved directly or via the Gradle Wrapper. - Execute your build with Gradle 8.6 or newer. This can be achieved directly or via the Gradle Wrapper.
- Enable the configuration cache for your build. - Enable the configuration cache for your build.
@@ -190,14 +218,17 @@ jobs:
distribution: temurin distribution: temurin
java-version: 17 java-version: 17
- uses: gradle/actions/setup-gradle@v3 - uses: gradle/actions/setup-gradle@v4
with: with:
gradle-version: 8.6 gradle-version: 8.6
cache-encryption-key: ${{ secrets.GradleEncryptionKey }} cache-encryption-key: ${{ secrets.GradleEncryptionKey }}
- run: gradle build --configuration-cache - run: gradle build --configuration-cache
``` ```
> [!IMPORTANT] Even with everything correctly configured, you may find that the configuration-cache entry is not reused in your workflow.
This is often due to a known issue: [Included builds containing build logic prevent configuration-cache reuse](https://github.com/gradle/actions/issues/21). Refer to the issue for more details.
> [!NOTE]
> The configuration cache cannot be saved or restored in workflows triggered by a pull requests from a repository fork. > The configuration cache cannot be saved or restored in workflows triggered by a pull requests from a repository fork.
> This is because [GitHub secrets are not passed to workflows triggered by PRs from forks](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#using-secrets-in-a-workflow). > This is because [GitHub secrets are not passed to workflows triggered by PRs from forks](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#using-secrets-in-a-workflow).
> This prevents a malicious PR from reading the configuration-cache data, which may encode secrets read by Gradle. > This prevents a malicious PR from reading the configuration-cache data, which may encode secrets read by Gradle.
@@ -218,7 +249,7 @@ Using either of these mechanisms may interfere with the caching provided by this
The GitHub Actions cache has some properties that present problems for efficient caching of the Gradle User Home. The GitHub Actions cache has some properties that present problems for efficient caching of the Gradle User Home.
- Immutable entries: once a cache entry is written for a key, it cannot be overwritten or changed. - Immutable entries: once a cache entry is written for a key, it cannot be overwritten or changed.
- Branch scope: cache entries written for a Git branch are not visible from actions running against different branches. Entries written for the default branch are visible to all. https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache - Branch scope: cache entries written for a Git branch are not visible from actions running against different branches or tags. Entries written for the default branch are visible to all. https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache
- Restore keys: if no exact match is found, a set of partial keys can be provided that will match by cache key prefix. https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key - Restore keys: if no exact match is found, a set of partial keys can be provided that will match by cache key prefix. https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key
Each of these properties has influenced the design and implementation of the caching in `setup-gradle`, as described below. Each of these properties has influenced the design and implementation of the caching in `setup-gradle`, as described below.
@@ -316,8 +347,8 @@ Some techniques can be used to avoid/mitigate this issue:
### Select which branches should write to the cache ### Select which branches should write to the cache
GitHub cache entries are not shared between builds on different branches. GitHub cache entries are not shared between builds on different branches or tags.
Workflow runs can restore caches created in either the current branch or the default branch (usually main). Workflow runs can _only_ restore caches created in either the same branch or the default branch (usually `main`).
This means that each branch will have its own Gradle User Home cache scope, and will not benefit from cache entries written for other (non-default) branches. This means that each branch will have its own Gradle User Home cache scope, and will not benefit from cache entries written for other (non-default) branches.
By default, The `setup-gradle` action will only _write_ to the cache for builds run on the default (`master`/`main`) branch. By default, The `setup-gradle` action will only _write_ to the cache for builds run on the default (`master`/`main`) branch.
@@ -356,20 +387,6 @@ gradle-home-cache-excludes: |
You can specify any number of fixed paths or patterns to include or exclude. You can specify any number of fixed paths or patterns to include or exclude.
File pattern support is documented at https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#patterns-to-match-file-paths. File pattern support is documented at https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#patterns-to-match-file-paths.
### Remove unused files from Gradle User Home before saving to the cache
The Gradle User Home directory tends to grow over time. When you switch to a new Gradle wrapper version or upgrade a dependency version
the old files are not automatically and immediately removed. While this can make sense in a local environment, in a GitHub Actions environment
it can lead to ever-larger Gradle User Home cache entries being saved and restored.
To avoid this situation, The `setup-gradle` action supports the `gradle-home-cache-cleanup` parameter.
When enabled, this feature will attempt to delete any files in the Gradle User Home that were not used by Gradle during the GitHub Actions Workflow, before saving the Gradle User Home to the GitHub Actions cache.
Gradle Home cache cleanup is considered experimental and is disabled by default. You can enable this feature for the action as follows:
```yaml
gradle-home-cache-cleanup: true
```
### Disable local build-cache when remote build-cache is available ### Disable local build-cache when remote build-cache is available
If you have a remote build-cache available for your build, then it is recommended to do the following: If you have a remote build-cache available for your build, then it is recommended to do the following:
@@ -446,7 +463,7 @@ jobs:
java-version: 17 java-version: 17
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
with: with:
add-job-summary-as-pr-comment: on-failure # Valid values are 'never' (default), 'always', and 'on-failure' add-job-summary-as-pr-comment: on-failure # Valid values are 'never' (default), 'always', and 'on-failure'
@@ -483,17 +500,17 @@ jobs:
java-version: 17 java-version: 17
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
- name: Run build with Gradle wrapper - name: Run build with Gradle wrapper
run: ./gradlew build --scan run: ./gradlew build --scan
- name: Upload build reports - name: Upload build reports
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
if: always() if: always()
with: with:
name: build-reports name: build-reports
path: build/reports/ path: **/build/reports/
``` ```
### Use of custom init-scripts in Gradle User Home ### Use of custom init-scripts in Gradle User Home
@@ -506,14 +523,30 @@ Since Gradle applies init scripts in alphabetical order, one way to ensure this
## Gradle Wrapper validation ## Gradle Wrapper validation
Instead of using the [wrapper-validation action](./wrapper-validation.md) separately, you can enable By default, this action will perform the same wrapper validation as is performed by the dedicated
wrapper validation directly in your Setup Gradle step. [wrapper-validation action](./wrapper-validation.md).
This means that invalid wrapper jars will be automatically detected when using `setup-gradle`.
If you do not want wrapper-validation to occur automatically, you can disable it:
```yaml ```yaml
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
with:
validate-wrappers: false
```
If your repository uses snapshot versions of the Gradle wrapper, such as nightly builds, then you'll need to
explicitly allow snapshot wrappers in wrapper validation.
These are not allowed by default.
```yaml
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with: with:
validate-wrappers: true validate-wrappers: true
allow-snapshot-wrappers: true
``` ```
If you need more advanced configuration, then you're advised to continue using a separate workflow step If you need more advanced configuration, then you're advised to continue using a separate workflow step
@@ -575,7 +608,7 @@ jobs:
java-version: 17 java-version: 17
- name: Setup Gradle to generate and submit dependency graphs - name: Setup Gradle to generate and submit dependency graphs
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
with: with:
dependency-graph: generate-and-submit dependency-graph: generate-and-submit
- name: Run the usual CI build (dependency-graph will be generated and submitted post-job) - name: Run the usual CI build (dependency-graph will be generated and submitted post-job)
@@ -602,7 +635,7 @@ graph cannot be generated or submitted. You can enable this behavior with the `d
```yaml ```yaml
# Ensure that the workflow Job will fail if the dependency graph cannot be submitted # Ensure that the workflow Job will fail if the dependency graph cannot be submitted
- uses: gradle/actions/setup-gradle@v3 - uses: gradle/actions/setup-gradle@v4
with: with:
dependency-graph: generate-and-submit dependency-graph: generate-and-submit
dependency-graph-continue-on-failure: false dependency-graph-continue-on-failure: false
@@ -627,7 +660,7 @@ jobs:
java-version: 17 java-version: 17
- name: Setup Gradle to generate and submit dependency graphs - name: Setup Gradle to generate and submit dependency graphs
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
with: with:
dependency-graph: generate-and-submit dependency-graph: generate-and-submit
- name: Run a build, resolving the 'dependency-graph' plugin from the plugin portal proxy - name: Run a build, resolving the 'dependency-graph' plugin from the plugin portal proxy
@@ -657,7 +690,7 @@ jobs:
java-version: 17 java-version: 17
- name: Setup Gradle to generate and submit dependency graphs - name: Setup Gradle to generate and submit dependency graphs
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
with: with:
dependency-graph: generate-and-submit dependency-graph: generate-and-submit
- name: Build the app, generating a graph of dependencies required - name: Build the app, generating a graph of dependencies required
@@ -693,20 +726,112 @@ To reduce storage costs for these artifacts, you can set the `artifact-retention
```yaml ```yaml
- name: Generate dependency graph, but only retain artifact for one day - name: Generate dependency graph, but only retain artifact for one day
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
with: with:
dependency-graph: generate dependency-graph: generate
artifact-retention-days: 1 artifact-retention-days: 1
``` ```
# Develocity plugin injection # Develocity Build Scan® integration
The `setup-gradle` action provides support for injecting and configuring the Develocity Gradle plugin into any Gradle build, without any modification to the project sources. Publishing a Develocity Build Scan can be very helpful for Gradle builds run on GitHub Actions. Each Build Scan provides a
This is achieved via an init-script installed into Gradle User Home, which is enabled and parameterized via environment variables. detailed report of the execution of the build, including which tasks were executed and the results of any test execution.
The `setup-gradle` plugin provides a number of features to enable and enhance publishing Build Scans® to a Develocity instance.
## Publishing to scans.gradle.com
If you don't have a a private Develocity instance, you can easily publish Build Scans to the
free, public Develocity instance (https://scans.gradle.com).
To publish to https://scans.gradle.com, you must specify in your workflow that you accept the [Gradle Terms of Use](https://gradle.com/help/legal-terms-of-use).
```yaml
- name: Setup Gradle to publish build scans
uses: gradle/actions/setup-gradle@v4
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
build-scan-terms-of-use-agree: "yes"
- name: Run a Gradle build - a build scan will be published automatically
run: ./gradlew build
```
## Managing Develocity access keys
Develocity access keys are long-lived, creating risks if they are leaked. To mitigate this risk this,
the `setup-gradle` action can automatically attempt to obtain a [short-lived access token](https://docs.gradle.com/develocity/gradle-plugin/current/#short_lived_access_tokens)
to use when authenticating with Develocity.
The short-lived access token will then be used wherever a Develocity access key is required.
```yaml
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }} # Long-lived access key, visiblility is restricted to this step.
# Subsequent steps will automatically use a short-lived access token to authenticate with Develocity
- name: Run a Gradle build that is configured to publish to Develocity.
run: ./gradlew build
```
### Increasing the expiry time for Develocity access tokens
By default, a short-lived Develocity access token will be valid for 2 hours from the time it is generated. If your workflows take longer than
2 hours to complete, you may see failure to publish Build Scans due to access token expiry.
To avoid this, use the `develocity-token-expiry` parameter to specify a different token expiry in hours.
```yaml
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }}
develocity-token-expiry: 8 # The number of hours that the access token should remain valid (max 24).
```
### Develocity access key supplied as environment variable
The preferred mechanism is to supply the long-lived Develocity access key directly to `setup-gradle` via
the `develocity-access-key` input variable. However, the action will also detect an access key configured as an environment variable,
such as `DEVELOCITY_ACCESS_KEY` or `GRADLE_ENTERPRISE_ACCESS_KEY`. In this case, the environment variable value will be replaced by
a short-lived access token, thus hiding the long-lived access key from subsequent steps.
```yaml
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }}
jobs:
build-with-gradle:
runs-on: ubuntu-latest
steps:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
# The build will automatically use a short-lived access token to authenticate with Develocity
- name: Run a Gradle build that is configured to publish to Develocity.
run: ./gradlew build
```
### Failure to obtain a short-lived access token
If a short-lived token cannot be retrieved (for example, if the Develocity server version is lower than `2024.1`):
- If the access key is provided via `develocity-access-key`, then no access token is set and authentication with Develocity will not succeed.
- If the access key is provided via an environment variable, a warning will be logged and the environment variable will be left as-is.
This can result in long-lived access keys being unintentionally exposed to other workflow steps.
For more information on short-lived tokens, see [Develocity API documentation](https://docs.gradle.com/develocity/api-manual/#short_lived_access_tokens).
## Develocity plugin injection
The `setup-gradle` action provides support for transparently injecting and configuring the Develocity Gradle plugin into any Gradle build,
without any modification to the project sources. This allows Build Scans to be published for a repository without any changes to the project sources.
Develocity injection is achieved via an init-script installed into Gradle User Home, which is enabled and parameterized via environment variables.
The same auto-injection behavior is available for the Common Custom User Data Gradle plugin, which enriches any build scans published with additional useful information. The same auto-injection behavior is available for the Common Custom User Data Gradle plugin, which enriches any build scans published with additional useful information.
## Enabling Develocity injection ### Enabling Develocity injection
To enable Develocity injection for your build, you must provide the required configuration via inputs. To enable Develocity injection for your build, you must provide the required configuration via inputs.
@@ -714,7 +839,7 @@ Here's a minimal example:
```yaml ```yaml
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
with: with:
develocity-injection-enabled: true develocity-injection-enabled: true
develocity-url: https://develocity.your-server.com develocity-url: https://develocity.your-server.com
@@ -724,14 +849,14 @@ Here's a minimal example:
run: ./gradlew build run: ./gradlew build
``` ```
This configuration will automatically apply `v3.17.5` of the [Develocity Gradle plugin](https://docs.gradle.com/develocity/gradle-plugin/), and publish build scans to https://develocity.your-server.com. This configuration will automatically apply `v3.19` of the [Develocity Gradle plugin](https://docs.gradle.com/develocity/gradle-plugin/), and publish build scans to https://develocity.your-server.com.
This example assumes that the `develocity.your-server.com` server allows anonymous publishing of build scans. This example assumes that the `develocity.your-server.com` server allows anonymous publishing of build scans.
In the likely scenario that your Develocity server requires authentication, you will also need to pass a valid [Develocity access key](https://docs.gradle.com/develocity/gradle-plugin/#via_environment_variable) taken from a secret: In the likely scenario that your Develocity server requires authentication, you will also need to pass a valid [Develocity access key](https://docs.gradle.com/develocity/gradle-plugin/#via_environment_variable) taken from a secret:
```yaml ```yaml
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
with: with:
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }} develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }}
@@ -745,14 +870,7 @@ In the likely scenario that your Develocity server requires authentication, you
This access key will be used during the action execution to get a short-lived token and set it to the DEVELOCITY_ACCESS_KEY environment variable. This access key will be used during the action execution to get a short-lived token and set it to the DEVELOCITY_ACCESS_KEY environment variable.
### Short-lived access tokens ### Configuring Develocity injection
Develocity access keys are long-lived, creating risks if they are leaked. To avoid this, users can use short-lived access tokens to authenticate with Develocity. Access tokens can be used wherever an access key would be used. Access tokens are only valid for the Develocity instance that created them.
If a short-lived token fails to be retrieved (for example, if the Develocity server version is lower than `2024.1`):
- if a `GRADLE_ENTERPRISE_ACCESS_KEY` env var has been set, we're falling back to it with a deprecation warning
- otherwise no access key env var will be set. In that case Develocity authenticated operations like build cache read/write and build scan publication will fail without failing the build.
For more information on short-lived tokens, see [Develocity API documentation](https://docs.gradle.com/develocity/api-manual/#short_lived_access_tokens).
## Configuring Develocity injection
The `init-script` supports several additional configuration parameters that you may find useful. All configuration options (required and optional) are detailed below: The `init-script` supports several additional configuration parameters that you may find useful. All configuration options (required and optional) are detailed below:
@@ -789,31 +907,32 @@ Here's an example using the env vars:
```yaml ```yaml
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
- name: Run a Gradle build with Develocity injection enabled with environment variables - name: Run a Gradle build with Develocity injection enabled with environment variables
run: ./gradlew build run: ./gradlew build
env: env:
DEVELOCITY_INJECTION_ENABLED: true DEVELOCITY_INJECTION_ENABLED: true
DEVELOCITY_URL: https://develocity.your-server.com DEVELOCITY_URL: https://develocity.your-server.com
DEVELOCITY_PLUGIN_VERSION: 3.17.5 DEVELOCITY_ENFORCE_URL: true
DEVELOCITY_PLUGIN_VERSION: "3.19"
DEVELOCITY_CCUD_PLUGIN_VERSION: "2.0.2"
``` ```
## Publishing to scans.gradle.com # Dependency verification
Develocity injection is designed to enable the publishing of build scans to a Develocity instance, Develocity injection, Build Scan publishing and Dependency Graph generation all work by applying external plugins to your build.
but is also useful for publishing to the public Build Scans instance (https://scans.gradle.com). If you project has [dependency verification enabled](https://docs.gradle.org/current/userguide/dependency_verification.html#sec:signature-verification),
then you'll need to update your verification metadata to trust these plugins.
To publish to https://scans.gradle.com, you must specify in your workflow that you accept the [Gradle Terms of Use](https://gradle.com/help/legal-terms-of-use). Each of the plugins is signed by Gradle, and you can simply add the following snippet to your `dependency-verificaton.xml` file:
```yaml ```xml
- name: Setup Gradle to publish build scans <trusted-keys>
uses: gradle/actions/setup-gradle@v3 <trusted-key id="7B79ADD11F8A779FE90FD3D0893A028475557671">
with: <trusting group="com.gradle"/>
build-scan-publish: true <trusting group="org.gradle"/>
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service" </trusted-key>
build-scan-terms-of-use-agree: "yes" </trusted-keys>
- name: Run a Gradle build - a build scan will be published automatically
run: ./gradlew build
``` ```

View File

@@ -4,6 +4,12 @@ This action validates the checksums of _all_ [Gradle Wrapper](https://docs.gradl
The action should be run in the root of the repository, as it will recursively search for any files named `gradle-wrapper.jar`. The action should be run in the root of the repository, as it will recursively search for any files named `gradle-wrapper.jar`.
> [!NOTE]
> Starting with v4 the `setup-gradle` action will automatically [perform wrapper validation](../docs/setup-gradle.md#gradle-wrapper-validation)
> on each execution.
>
> If you are using `setup-gradle` in your workflows, it is unlikely that you will need to use the `wrapper-validation` action.
## The Gradle Wrapper Problem in Open Source ## The Gradle Wrapper Problem in Open Source
The `gradle-wrapper.jar` is a binary blob of executable code that is checked into nearly The `gradle-wrapper.jar` is a binary blob of executable code that is checked into nearly
@@ -44,7 +50,7 @@ We created an example [Homoglyph attack PR here](https://github.com/JLLeitschuh/
Simply add this action to your workflow **after** having checked out your source tree and **before** running any Gradle build: Simply add this action to your workflow **after** having checked out your source tree and **before** running any Gradle build:
```yaml ```yaml
uses: gradle/actions/wrapper-validation@v3 uses: gradle/actions/wrapper-validation@v4
``` ```
This action step should precede any step using `gradle/gradle-build-action` or `gradle/actions/setup-gradle`. This action step should precede any step using `gradle/gradle-build-action` or `gradle/actions/setup-gradle`.
@@ -67,7 +73,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v3 - uses: gradle/actions/wrapper-validation@v4
``` ```
## Contributing to an external GitHub Repository ## Contributing to an external GitHub Repository
@@ -90,18 +96,34 @@ We recommend the message commit contents of:
From there, you can easily follow the rest of the prompts to create a Pull Request against the project. From there, you can easily follow the rest of the prompts to create a Pull Request against the project.
## Reporting Failures ## Validation Failures
If this GitHub action fails because a `gradle-wrapper.jar` doesn't match one of our published SHA-256 checksums, A wrapper jar can fail validation for a few reasons:
1. The wrapper is from a snapshot build of Gradle (nightly or release nightly) and you have not set `allow-snapshots`
or `allow-snapshot-wrappers` to `true`.
2. The wrapper jar is from a version of Gradle with an unverifiable wrapper jar (see below).
3. The wrapper jar is saved in Git LFS, and has not been correctly restored on checkout (see below).
4. The wrapper jar was not published by Gradle, and could be compromised.
If this GitHub action fails because a `gradle-wrapper.jar` was not published by Gradle,
we highly recommend that you reach out to us at [security@gradle.com](mailto:security@gradle.com). we highly recommend that you reach out to us at [security@gradle.com](mailto:security@gradle.com).
**Note:** `gradle-wrapper.jar` generated by Gradle 3.3 to 4.0 are not verifiable because those files were dynamically generated by Gradle in a non-reproducible way. It's not possible to verify the `gradle-wrapper.jar` for those versions are legitimate using a hash comparison. You should try to determine if the `gradle-wrapper.jar` was generated by one of these versions before running the build. #### Unverifiable Wrapper Jars
Wrapper Jars generated by Gradle versions `3.3` to `4.0` are not verifiable because those files were dynamically generated by Gradle in a non-reproducible way. It's not possible to verify the `gradle-wrapper.jar` for those versions are legitimate using a hash comparison. If you have a validation failure, you should try to determine if the `gradle-wrapper.jar` was generated by one of these versions before running the build.
If the Gradle version in `gradle-wrapper.properties` is out of this range, you may need to regenerate the `gradle-wrapper.jar` by running `./gradlew wrapper`. If you need to use a version of Gradle between 3.3 and 4.0, you can use a newer version of Gradle to generate the `gradle-wrapper.jar`. - If the Gradle version in `gradle-wrapper.properties` is outside of this range, you can regenerate the `gradle-wrapper.jar` by running `./gradlew wrapper`. This will generate a new, verifiable wrapper jar.
- If you need to run your build with a version of Gradle between 3.3 and 4.0, you can use a newer version of Gradle to generate the `gradle-wrapper.jar`.
If you're curious and want to explore what the differences are between the `gradle-wrapper.jar` in your possession #### Wrapper Jar stored with Git LFS
and one of our valid release, you can compare them using this online utility: [diffoscope](https://try.diffoscope.org/). If your repository is configured to store Wrapper Jars in Git Large File Storage (LFS), then you must include the configuration to correctly
Regardless of what you find, we still kindly request that you reach out to us and let us know. restore these Jars on checkout. Without this, only a pointer to the Wrapper Jar is restored, and the checksum verification will fail.
```
steps:
- uses: actions/checkout@v4
with:
lfs: true # gradle-wrapper.jar verification will fail without this
```
## Resources ## Resources

View File

@@ -26,7 +26,7 @@ jobs:
distribution: 'temurin' distribution: 'temurin'
java-version: 17 java-version: 17
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle - name: Build with Gradle
run: ./gradlew build run: ./gradlew build
``` ```

View File

@@ -40,6 +40,20 @@ inputs:
Configuration-cache data will not be saved/restored without an encryption key being provided. Configuration-cache data will not be saved/restored without an encryption key being provided.
required: false required: false
cache-cleanup:
description: |
Specifies if the action should attempt to remove any stale/unused entries from the Gradle User Home prior to saving to the GitHub Actions cache.
By default ('on-success'), cleanup is performed when all Gradle builds succeed for the Job.
This behaviour can be disabled ('never'), or configured to always run irrespective of the build outcome ('always').
Valid values are 'never', 'on-success' and 'always'.
required: false
default: 'on-success'
gradle-home-cache-cleanup:
description: When 'true', the action will attempt to remove any stale/unused entries from the Gradle User Home prior to saving to the GitHub Actions cache.
required: false
deprecation-message: This input has been superceded by the 'cache-cleanup' input parameter.
gradle-home-cache-includes: gradle-home-cache-includes:
description: Paths within Gradle User Home to cache. description: Paths within Gradle User Home to cache.
required: false required: false
@@ -51,11 +65,6 @@ inputs:
description: Paths within Gradle User Home to exclude from cache. description: Paths within Gradle User Home to exclude from cache.
required: false required: false
gradle-home-cache-cleanup:
description: When 'true', the action will attempt to remove any stale/unused entries from the Gradle User Home prior to saving to the GitHub Actions cache.
required: false
default: false
# Job summary configuration # Job summary configuration
add-job-summary: add-job-summary:
description: Specifies when a Job Summary should be inluded in the action results. Valid values are 'never', 'always' (default), and 'on-failure'. description: Specifies when a Job Summary should be inluded in the action results. Valid values are 'never', 'always' (default), and 'on-failure'.
@@ -71,15 +80,46 @@ inputs:
dependency-graph: dependency-graph:
description: | description: |
Specifies if a GitHub dependency snapshot should be generated for each Gradle build, and if so, how. Specifies if a GitHub dependency snapshot should be generated for each Gradle build, and if so, how.
Valid values are 'disabled' (default), 'generate', 'generate-and-submit', 'generate-and-upload', 'download-and-submit' and 'clear'. Valid values are 'disabled' (default), 'generate', 'generate-and-submit', 'generate-and-upload', and 'download-and-submit'.
required: false required: false
default: 'disabled' default: 'disabled'
dependency-graph-report-dir:
description: |
Specifies where the dependency graph report will be generated.
Paths can relative or absolute. Relative paths are resolved relative to the workspace directory.
required: false
default: 'dependency-graph-reports'
dependency-graph-continue-on-failure: dependency-graph-continue-on-failure:
description: When 'false' a failure to generate or submit a dependency graph will fail the Step or Job. When 'true' a warning will be emitted but no failure will result. description: When 'false' a failure to generate or submit a dependency graph will fail the Step or Job. When 'true' a warning will be emitted but no failure will result.
required: false required: false
default: true default: true
dependency-graph-exclude-projects:
description: |
Gradle projects that should be excluded from dependency graph (regular expression).
When set, any matching project will be excluded.
required: false
dependency-graph-include-projects:
description: |
Gradle projects that should be included in dependency graph (regular expression).
When set, only matching projects will be included.
required: false
dependency-graph-exclude-configurations:
description: |
Gradle configurations that should be included in dependency graph (regular expression).
When set, anymatching configurations will be excluded.
required: false
dependency-graph-include-configurations:
description: |
Gradle configurations that should be included in dependency graph (regular expression).
When set, only matching configurations will be included.
required: false
artifact-retention-days: artifact-retention-days:
description: Specifies the number of days to retain any artifacts generated by the action. If not set, the default retention settings for the repository will apply. description: Specifies the number of days to retain any artifacts generated by the action. If not set, the default retention settings for the repository will apply.
required: false required: false
@@ -151,37 +191,23 @@ inputs:
# Wrapper validation configuration # Wrapper validation configuration
validate-wrappers: validate-wrappers:
description: | description: |
When 'true', the action will perform the 'wrapper-validation' action automatically. When 'true' (the default) the action will automatically validate all wrapper jars found in the repository.
If the wrapper checksums are not valid, the action will fail. If the wrapper checksums are not valid, the action will fail.
required: false required: false
default: true
allow-snapshot-wrappers:
description: |
When 'true', wrapper validation will include the checksums of snapshot wrapper jars.
Use this if you are running with nightly or snapshot versions of the Gradle wrapper.
required: false
default: false default: false
# DEPRECATED ACTION INPUTS # DEPRECATED ACTION INPUTS
build-scan-terms-of-service-url:
description: The URL to the Build Scan® terms of use. This input must be set to 'https://gradle.com/terms-of-service'.
required: false
deprecation-message: The input has been renamed to align with the Develocity API. Use 'build-scan-terms-of-use-url' instead.
build-scan-terms-of-service-agree:
description: Indicate that you agree to the Build Scan® terms of use. This input value must be "yes".
required: false
deprecation-message: The input has been renamed to align with the Develocity API. Use 'build-scan-terms-of-use-agree' instead.
generate-job-summary:
description: When 'false', no Job Summary will be generated for the Job.
required: false
default: true
deprecation-message: Superceded by the new 'add-job-summary' and 'add-job-summary-as-pr-comment' parameters.
arguments: arguments:
description: Gradle command line arguments (supports multi-line input) description: Gradle command line arguments (supports multi-line input)
required: false required: false
deprecation-message: Using the action to execute Gradle directly is deprecated in favor of using the action to setup Gradle, and executing Gradle in a subsequent Step. deprecation-message: This parameter has been deprecated and removed. It is only left here to allow for better reporting to assist users to migrate.
build-root-directory:
description: Path to the root directory of the build. Default is the root of the GitHub workspace.
required: false
deprecation-message: Using the action to execute Gradle directly is deprecated in favor of using the action to setup Gradle, and executing Gradle in a subsequent Step.
# EXPERIMENTAL ACTION INPUTS # EXPERIMENTAL ACTION INPUTS
# The following action properties allow fine-grained tweaking of the action caching behaviour. # The following action properties allow fine-grained tweaking of the action caching behaviour.

View File

@@ -1,3 +1,3 @@
# Configuration file for asdf version manager # Configuration file for asdf version manager
nodejs 20.10.0 nodejs 20.10.0
gradle 8.8 gradle 8.11.1

3968
sources/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -8,11 +8,11 @@
"prettier-write": "prettier --write 'src/**/*.ts'", "prettier-write": "prettier --write 'src/**/*.ts'",
"prettier-check": "prettier --check 'src/**/*.ts'", "prettier-check": "prettier --check 'src/**/*.ts'",
"lint": "eslint 'src/**/*.ts'", "lint": "eslint 'src/**/*.ts'",
"compile-dependency-submission-main": "ncc build src/dependency-submission/main.ts --out dist/dependency-submission/main --source-map --no-source-map-register", "compile-dependency-submission-main": "ncc build src/actions/dependency-submission/main.ts --out dist/dependency-submission/main --source-map --no-source-map-register",
"compile-dependency-submission-post": "ncc build src/dependency-submission/post.ts --out dist/dependency-submission/post --source-map --no-source-map-register", "compile-dependency-submission-post": "ncc build src/actions/dependency-submission/post.ts --out dist/dependency-submission/post --source-map --no-source-map-register",
"compile-setup-gradle-main": "ncc build src/setup-gradle/main.ts --out dist/setup-gradle/main --source-map --no-source-map-register", "compile-setup-gradle-main": "ncc build src/actions/setup-gradle/main.ts --out dist/setup-gradle/main --source-map --no-source-map-register",
"compile-setup-gradle-post": "ncc build src/setup-gradle/post.ts --out dist/setup-gradle/post --source-map --no-source-map-register", "compile-setup-gradle-post": "ncc build src/actions/setup-gradle/post.ts --out dist/setup-gradle/post --source-map --no-source-map-register",
"compile-wrapper-validation-main": "ncc build src/wrapper-validation/main.ts --out dist/wrapper-validation/main --source-map --no-source-map-register", "compile-wrapper-validation-main": "ncc build src/actions/wrapper-validation/main.ts --out dist/wrapper-validation/main --source-map --no-source-map-register",
"compile": "npm-run-all --parallel compile-*", "compile": "npm-run-all --parallel compile-*",
"check": "npm-run-all --parallel prettier-check lint", "check": "npm-run-all --parallel prettier-check lint",
"format": "npm-run-all --parallel prettier-write lint", "format": "npm-run-all --parallel prettier-write lint",
@@ -32,38 +32,40 @@
], ],
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/artifact": "2.1.4", "@actions/artifact": "2.1.11",
"@actions/cache": "3.2.4", "@actions/cache": "4.0.0",
"@actions/core": "1.10.1", "@actions/core": "1.11.1",
"@actions/exec": "1.1.1", "@actions/exec": "1.1.1",
"@actions/github": "6.0.0", "@actions/github": "6.0.0",
"@actions/glob": "0.4.0", "@actions/glob": "0.5.0",
"@actions/http-client": "2.2.1", "@actions/http-client": "2.2.3",
"@actions/tool-cache": "2.0.1", "@actions/tool-cache": "2.0.1",
"@octokit/rest": "20.1.0", "@octokit/rest": "21.0.2",
"@octokit/webhooks-types": "7.5.0", "@octokit/webhooks-types": "7.6.1",
"semver": "7.6.0", "cheerio": "^1.0.0",
"semver": "7.6.3",
"string-argv": "0.3.2", "string-argv": "0.3.2",
"typed-rest-client": "1.8.11", "typed-rest-client": "2.1.0",
"unhomoglyph": "1.0.6" "unhomoglyph": "1.0.6",
"which": "5.0.0"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "29.5.12", "@types/jest": "29.5.14",
"@types/node": "20.12.4", "@types/node": "20.17.10",
"@types/unzipper": "0.10.9", "@types/unzipper": "0.10.10",
"@typescript-eslint/parser": "7.5.0", "@types/which": "3.0.4",
"@vercel/ncc": "0.38.1", "@typescript-eslint/parser": "7.18.0",
"eslint": "8.57.0", "@vercel/ncc": "0.38.3",
"eslint-plugin-github": "4.10.2", "eslint": "8.57.1",
"eslint-plugin-jest": "27.9.0", "eslint-plugin-github": "5.1.4",
"eslint-plugin-prettier": "5.1.3", "eslint-plugin-jest": "28.9.0",
"jest": "29.7.0", "jest": "29.7.0",
"js-yaml": "4.1.0", "js-yaml": "4.1.0",
"nock": "13.5.6",
"npm-run-all": "4.1.5", "npm-run-all": "4.1.5",
"patch-package": "8.0.0", "patch-package": "8.0.0",
"prettier": "3.2.5", "prettier": "3.4.2",
"ts-jest": "29.1.2", "ts-jest": "29.2.5",
"typescript": "5.4.3", "typescript": "5.7.2"
"nock": "13.5.4"
} }
} }

View File

@@ -1,113 +0,0 @@
diff --git a/node_modules/@actions/cache/lib/cache.d.ts b/node_modules/@actions/cache/lib/cache.d.ts
index 4658366..b796e58 100644
--- a/node_modules/@actions/cache/lib/cache.d.ts
+++ b/node_modules/@actions/cache/lib/cache.d.ts
@@ -21,7 +21,7 @@ export declare function isFeatureAvailable(): boolean;
* @param enableCrossOsArchive an optional boolean enabled to restore on windows any cache created on any platform
* @returns string returns the key for the cache hit, otherwise returns undefined
*/
-export declare function restoreCache(paths: string[], primaryKey: string, restoreKeys?: string[], options?: DownloadOptions, enableCrossOsArchive?: boolean): Promise<string | undefined>;
+export declare function restoreCache(paths: string[], primaryKey: string, restoreKeys?: string[], options?: DownloadOptions, enableCrossOsArchive?: boolean): Promise<CacheEntry | undefined>;
/**
* Saves a list of files with the specified key
*
@@ -31,4 +31,12 @@ export declare function restoreCache(paths: string[], primaryKey: string, restor
* @param options cache upload options
* @returns number returns cacheId if the cache was saved successfully and throws an error if save fails
*/
-export declare function saveCache(paths: string[], key: string, options?: UploadOptions, enableCrossOsArchive?: boolean): Promise<number>;
+export declare function saveCache(paths: string[], key: string, options?: UploadOptions, enableCrossOsArchive?: boolean): Promise<CacheEntry>;
+
+// PATCHED: Add `CacheEntry` as return type for save/restore functions
+// This allows us to track and report on cache entry sizes.
+export declare class CacheEntry {
+ key: string;
+ size?: number;
+ constructor(key: string, size?: number);
+}
diff --git a/node_modules/@actions/cache/lib/cache.js b/node_modules/@actions/cache/lib/cache.js
index 9d636aa..a176bd7 100644
--- a/node_modules/@actions/cache/lib/cache.js
+++ b/node_modules/@actions/cache/lib/cache.js
@@ -127,18 +127,21 @@ function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArch
core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`);
yield (0, tar_1.extractTar)(archivePath, compressionMethod);
core.info('Cache restored successfully');
- return cacheEntry.cacheKey;
- }
- catch (error) {
- const typedError = error;
- if (typedError.name === ValidationError.name) {
- throw error;
- }
- else {
- // Supress all non-validation cache related errors because caching should be optional
- core.warning(`Failed to restore: ${error.message}`);
- }
+
+ // PATCHED - Return more inforamtion about restored entry
+ return new CacheEntry(cacheEntry.cacheKey, archiveFileSize);;
}
+ // PATCHED - propagate errors
+ // catch (error) {
+ // const typedError = error;
+ // if (typedError.name === ValidationError.name) {
+ // throw error;
+ // }
+ // else {
+ // // Supress all non-validation cache related errors because caching should be optional
+ // core.warning(`Failed to restore: ${error.message}`);
+ // }
+ // }
finally {
// Try to delete the archive to save space
try {
@@ -206,19 +209,23 @@ function saveCache(paths, key, options, enableCrossOsArchive = false) {
}
core.debug(`Saving Cache (ID: ${cacheId})`);
yield cacheHttpClient.saveCache(cacheId, archivePath, options);
+
+ // PATCHED - Return more inforamtion about saved entry
+ return new CacheEntry(key, archiveFileSize);
}
- catch (error) {
- const typedError = error;
- if (typedError.name === ValidationError.name) {
- throw error;
- }
- else if (typedError.name === ReserveCacheError.name) {
- core.info(`Failed to save: ${typedError.message}`);
- }
- else {
- core.warning(`Failed to save: ${typedError.message}`);
- }
- }
+ // PATCHED - propagate errors
+ // catch (error) {
+ // const typedError = error;
+ // if (typedError.name === ValidationError.name) {
+ // throw error;
+ // }
+ // else if (typedError.name === ReserveCacheError.name) {
+ // core.info(`Failed to save: ${typedError.message}`);
+ // }
+ // else {
+ // core.warning(`Failed to save: ${typedError.message}`);
+ // }
+ // }
finally {
// Try to delete the archive to save space
try {
@@ -232,4 +239,11 @@ function saveCache(paths, key, options, enableCrossOsArchive = false) {
});
}
exports.saveCache = saveCache;
+class CacheEntry {
+ constructor(key, size) {
+ this.key = key;
+ this.size = size;
+ }
+}
+exports.CacheEntry = CacheEntry;
//# sourceMappingURL=cache.js.map
\ No newline at end of file

View File

@@ -0,0 +1,183 @@
diff --git a/node_modules/@actions/cache/lib/cache.d.ts b/node_modules/@actions/cache/lib/cache.d.ts
index ef0928b..4e2f570 100644
--- a/node_modules/@actions/cache/lib/cache.d.ts
+++ b/node_modules/@actions/cache/lib/cache.d.ts
@@ -21,7 +21,7 @@ export declare function isFeatureAvailable(): boolean;
* @param enableCrossOsArchive an optional boolean enabled to restore on windows any cache created on any platform
* @returns string returns the key for the cache hit, otherwise returns undefined
*/
-export declare function restoreCache(paths: string[], primaryKey: string, restoreKeys?: string[], options?: DownloadOptions, enableCrossOsArchive?: boolean): Promise<string | undefined>;
+export declare function restoreCache(paths: string[], primaryKey: string, restoreKeys?: string[], options?: DownloadOptions, enableCrossOsArchive?: boolean): Promise<CacheEntry | undefined>;
/**
* Saves a list of files with the specified key
*
@@ -31,4 +31,12 @@ export declare function restoreCache(paths: string[], primaryKey: string, restor
* @param options cache upload options
* @returns number returns cacheId if the cache was saved successfully and throws an error if save fails
*/
-export declare function saveCache(paths: string[], key: string, options?: UploadOptions, enableCrossOsArchive?: boolean): Promise<number>;
+export declare function saveCache(paths: string[], key: string, options?: UploadOptions, enableCrossOsArchive?: boolean): Promise<CacheEntry>;
+
+// PATCHED: Add `CacheEntry` as return type for save/restore functions
+// This allows us to track and report on cache entry sizes.
+export declare class CacheEntry {
+ key: string;
+ size?: number;
+ constructor(key: string, size?: number);
+}
\ No newline at end of file
diff --git a/node_modules/@actions/cache/lib/cache.js b/node_modules/@actions/cache/lib/cache.js
index 45201b6..2654e4b 100644
--- a/node_modules/@actions/cache/lib/cache.js
+++ b/node_modules/@actions/cache/lib/cache.js
@@ -154,18 +154,21 @@ function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsAr
core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`);
yield (0, tar_1.extractTar)(archivePath, compressionMethod);
core.info('Cache restored successfully');
- return cacheEntry.cacheKey;
- }
- catch (error) {
- const typedError = error;
- if (typedError.name === ValidationError.name) {
- throw error;
- }
- else {
- // Supress all non-validation cache related errors because caching should be optional
- core.warning(`Failed to restore: ${error.message}`);
- }
+
+ // PATCHED - Include size of restored entry
+ return new CacheEntry(cacheEntry.cacheKey, archiveFileSize);;
}
+ // PATCHED - propagate errors
+ // catch (error) {
+ // const typedError = error;
+ // if (typedError.name === ValidationError.name) {
+ // throw error;
+ // }
+ // else {
+ // // Supress all non-validation cache related errors because caching should be optional
+ // core.warning(`Failed to restore: ${error.message}`);
+ // }
+ // }
finally {
// Try to delete the archive to save space
try {
@@ -232,18 +235,21 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
}
yield (0, tar_1.extractTar)(archivePath, compressionMethod);
core.info('Cache restored successfully');
- return response.matchedKey;
- }
- catch (error) {
- const typedError = error;
- if (typedError.name === ValidationError.name) {
- throw error;
- }
- else {
- // Supress all non-validation cache related errors because caching should be optional
- core.warning(`Failed to restore: ${error.message}`);
- }
+
+ // PATCHED - Include size of restored entry
+ return new CacheEntry(response.matchedKey, archiveFileSize);;
}
+ // PATCHED - propagate errors
+ // catch (error) {
+ // const typedError = error;
+ // if (typedError.name === ValidationError.name) {
+ // throw error;
+ // }
+ // else {
+ // // Supress all non-validation cache related errors because caching should be optional
+ // core.warning(`Failed to restore: ${error.message}`);
+ // }
+ // }
finally {
try {
if (archivePath) {
@@ -334,19 +340,23 @@ function saveCacheV1(paths, key, options, enableCrossOsArchive = false) {
}
core.debug(`Saving Cache (ID: ${cacheId})`);
yield cacheHttpClient.saveCache(cacheId, archivePath, '', options);
+
+ // PATCHED - Include size of saved entry
+ return new CacheEntry(key, archiveFileSize);
}
- catch (error) {
- const typedError = error;
- if (typedError.name === ValidationError.name) {
- throw error;
- }
- else if (typedError.name === ReserveCacheError.name) {
- core.info(`Failed to save: ${typedError.message}`);
- }
- else {
- core.warning(`Failed to save: ${typedError.message}`);
- }
- }
+ // PATCHED - propagate errors
+ // catch (error) {
+ // const typedError = error;
+ // if (typedError.name === ValidationError.name) {
+ // throw error;
+ // }
+ // else if (typedError.name === ReserveCacheError.name) {
+ // core.info(`Failed to save: ${typedError.message}`);
+ // }
+ // else {
+ // core.warning(`Failed to save: ${typedError.message}`);
+ // }
+ // }
finally {
// Try to delete the archive to save space
try {
@@ -422,19 +432,23 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
}
cacheId = parseInt(finalizeResponse.entryId);
+
+ // PATCHED - Include size of saved entry
+ return new CacheEntry(key, archiveFileSize);
}
- catch (error) {
- const typedError = error;
- if (typedError.name === ValidationError.name) {
- throw error;
- }
- else if (typedError.name === ReserveCacheError.name) {
- core.info(`Failed to save: ${typedError.message}`);
- }
- else {
- core.warning(`Failed to save: ${typedError.message}`);
- }
- }
+ // PATCHED - propagate errors
+ // catch (error) {
+ // const typedError = error;
+ // if (typedError.name === ValidationError.name) {
+ // throw error;
+ // }
+ // else if (typedError.name === ReserveCacheError.name) {
+ // core.info(`Failed to save: ${typedError.message}`);
+ // }
+ // else {
+ // core.warning(`Failed to save: ${typedError.message}`);
+ // }
+ // }
finally {
// Try to delete the archive to save space
try {
@@ -447,4 +461,11 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
return cacheId;
});
}
+// PATCHED - CacheEntry class
+class CacheEntry {
+ constructor(key, size) {
+ this.key = key;
+ this.size = size;
+ }
+}
//# sourceMappingURL=cache.js.map
\ No newline at end of file

View File

@@ -1,6 +1,7 @@
import * as setupGradle from '../setup-gradle' import * as core from '@actions/core'
import * as gradle from '../execution/gradle' import * as setupGradle from '../../setup-gradle'
import * as dependencyGraph from '../dependency-graph' import * as gradle from '../../execution/gradle'
import * as dependencyGraph from '../../dependency-graph'
import {parseArgsStringToArgv} from 'string-argv' import {parseArgsStringToArgv} from 'string-argv'
import { import {
@@ -9,10 +10,11 @@ import {
DependencyGraphConfig, DependencyGraphConfig,
DependencyGraphOption, DependencyGraphOption,
GradleExecutionConfig, GradleExecutionConfig,
setActionId setActionId,
} from '../configuration' WrapperValidationConfig
import {saveDeprecationState} from '../deprecation-collector' } from '../../configuration'
import {handleMainActionError} from '../errors' import {saveDeprecationState} from '../../deprecation-collector'
import {handleMainActionError} from '../../errors'
/** /**
* The main entry point for the action, called by Github Actions for the step. * The main entry point for the action, called by Github Actions for the step.
@@ -22,7 +24,10 @@ export async function run(): Promise<void> {
setActionId('gradle/actions/dependency-submission') setActionId('gradle/actions/dependency-submission')
// Configure Gradle environment (Gradle User Home) // Configure Gradle environment (Gradle User Home)
await setupGradle.setup(new CacheConfig(), new BuildScanConfig()) await setupGradle.setup(new CacheConfig(), new BuildScanConfig(), new WrapperValidationConfig())
// Capture the enabled state of dependency-graph
const originallyEnabled = process.env['GITHUB_DEPENDENCY_GRAPH_ENABLED']
// Configure the dependency graph submission // Configure the dependency graph submission
const config = new DependencyGraphConfig() const config = new DependencyGraphConfig()
@@ -53,6 +58,9 @@ export async function run(): Promise<void> {
await dependencyGraph.complete(config) await dependencyGraph.complete(config)
// Reset the enabled state of dependency graph
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_ENABLED', originallyEnabled)
saveDeprecationState() saveDeprecationState()
} catch (error) { } catch (error) {
handleMainActionError(error) handleMainActionError(error)

View File

@@ -1,7 +1,7 @@
import * as setupGradle from '../setup-gradle' import * as setupGradle from '../../setup-gradle'
import {CacheConfig, SummaryConfig} from '../configuration' import {CacheConfig, SummaryConfig} from '../../configuration'
import {handlePostActionError} from '../errors' import {handlePostActionError} from '../../errors'
// Catch and log any unhandled exceptions. These exceptions can leak out of the uploadChunk method in // Catch and log any unhandled exceptions. These exceptions can leak out of the uploadChunk method in
// @actions/toolkit when a failed upload closes the file descriptor causing any in-process reads to // @actions/toolkit when a failed upload closes the file descriptor causing any in-process reads to

View File

@@ -1,17 +1,17 @@
import * as setupGradle from '../setup-gradle' import * as setupGradle from '../../setup-gradle'
import * as gradle from '../execution/gradle' import * as provisioner from '../../execution/provision'
import * as dependencyGraph from '../dependency-graph' import * as dependencyGraph from '../../dependency-graph'
import { import {
BuildScanConfig, BuildScanConfig,
CacheConfig, CacheConfig,
DependencyGraphConfig, DependencyGraphConfig,
GradleExecutionConfig, GradleExecutionConfig,
doValidateWrappers, WrapperValidationConfig,
getActionId, getActionId,
setActionId setActionId
} from '../configuration' } from '../../configuration'
import {recordDeprecation, saveDeprecationState} from '../deprecation-collector' import {failOnUseOfRemovedFeature, saveDeprecationState} from '../../deprecation-collector'
import {handleMainActionError} from '../errors' import {handleMainActionError} from '../../errors'
/** /**
* The main entry point for the action, called by Github Actions for the step. * The main entry point for the action, called by Github Actions for the step.
@@ -19,30 +19,22 @@ import {handleMainActionError} from '../errors'
export async function run(): Promise<void> { export async function run(): Promise<void> {
try { try {
if (getActionId() === 'gradle/gradle-build-action') { if (getActionId() === 'gradle/gradle-build-action') {
recordDeprecation( failOnUseOfRemovedFeature(
'The action `gradle/gradle-build-action` has been replaced by `gradle/actions/setup-gradle`' 'The action `gradle/gradle-build-action` has been replaced by `gradle/actions/setup-gradle`'
) )
} else {
setActionId('gradle/actions/setup-gradle')
} }
// Check for invalid wrapper JARs if requested setActionId('gradle/actions/setup-gradle')
if (doValidateWrappers()) {
await setupGradle.checkNoInvalidWrapperJars()
}
// Configure Gradle environment (Gradle User Home) // Configure Gradle environment (Gradle User Home)
await setupGradle.setup(new CacheConfig(), new BuildScanConfig()) await setupGradle.setup(new CacheConfig(), new BuildScanConfig(), new WrapperValidationConfig())
// Configure the dependency graph submission // Configure the dependency graph submission
await dependencyGraph.setup(new DependencyGraphConfig()) await dependencyGraph.setup(new DependencyGraphConfig())
const config = new GradleExecutionConfig() const config = new GradleExecutionConfig()
await gradle.provisionAndMaybeExecute( config.verifyNoArguments()
config.getGradleVersion(), await provisioner.provisionGradle(config.getGradleVersion())
config.getBuildRootDirectory(),
config.getArguments()
)
saveDeprecationState() saveDeprecationState()
} catch (error) { } catch (error) {

View File

@@ -1,9 +1,9 @@
import * as setupGradle from '../setup-gradle' import * as setupGradle from '../../setup-gradle'
import * as dependencyGraph from '../dependency-graph' import * as dependencyGraph from '../../dependency-graph'
import {CacheConfig, DependencyGraphConfig, SummaryConfig} from '../configuration' import {CacheConfig, DependencyGraphConfig, SummaryConfig} from '../../configuration'
import {handlePostActionError} from '../errors' import {handlePostActionError} from '../../errors'
import {emitDeprecationWarnings, restoreDeprecationState} from '../deprecation-collector' import {emitDeprecationWarnings, restoreDeprecationState} from '../../deprecation-collector'
// Catch and log any unhandled exceptions. These exceptions can leak out of the uploadChunk method in // Catch and log any unhandled exceptions. These exceptions can leak out of the uploadChunk method in
// @actions/toolkit when a failed upload closes the file descriptor causing any in-process reads to // @actions/toolkit when a failed upload closes the file descriptor causing any in-process reads to

View File

@@ -0,0 +1,50 @@
import * as path from 'path'
import * as core from '@actions/core'
import * as validate from '../../wrapper-validation/validate'
import {getActionId, setActionId} from '../../configuration'
import {failOnUseOfRemovedFeature, emitDeprecationWarnings} from '../../deprecation-collector'
import {handleMainActionError} from '../../errors'
export async function run(): Promise<void> {
try {
if (getActionId() === 'gradle/wrapper-validation-action') {
failOnUseOfRemovedFeature(
'The action `gradle/wrapper-validation-action` has been replaced by `gradle/actions/wrapper-validation`'
)
}
setActionId('gradle/actions/wrapper-validation')
const result = await validate.findInvalidWrapperJars(
path.resolve('.'),
core.getInput('allow-snapshots') === 'true',
core.getInput('allow-checksums').split(',')
)
if (result.isValid()) {
core.info(result.toDisplayString())
const minWrapperCount = +core.getInput('min-wrapper-count')
if (result.valid.length < minWrapperCount) {
const message =
result.valid.length === 0
? 'Wrapper validation failed: no Gradle Wrapper jars found. Did you forget to checkout the repository?'
: `Wrapper validation failed: expected at least ${minWrapperCount} Gradle Wrapper jars, but found ${result.valid.length}.`
core.setFailed(message)
}
} else {
core.setFailed(
`At least one Gradle Wrapper Jar failed validation!\n See https://github.com/gradle/actions/blob/main/docs/wrapper-validation.md#validation-failures\n${result.toDisplayString()}`
)
if (result.invalid.length > 0) {
core.setOutput('failed-wrapper', `${result.invalid.map(w => w.path).join('|')}`)
}
}
emitDeprecationWarnings(false)
} catch (error) {
handleMainActionError(error)
}
}
run()

View File

@@ -8,15 +8,40 @@ export interface BuildResult {
get gradleVersion(): string get gradleVersion(): string
get gradleHomeDir(): string get gradleHomeDir(): string
get buildFailed(): boolean get buildFailed(): boolean
get configCacheHit(): boolean
get buildScanUri(): string get buildScanUri(): string
get buildScanFailed(): boolean get buildScanFailed(): boolean
} }
export function loadBuildResults(): BuildResult[] { export class BuildResults {
return getUnprocessedResults().map(filePath => { results: BuildResult[]
constructor(results: BuildResult[]) {
this.results = results
}
anyFailed(): boolean {
return this.results.some(result => result.buildFailed)
}
anyConfigCacheHit(): boolean {
return this.results.some(result => result.configCacheHit)
}
uniqueGradleHomes(): string[] {
const allHomes = this.results.map(buildResult => buildResult.gradleHomeDir)
return Array.from(new Set(allHomes))
}
}
export function loadBuildResults(): BuildResults {
const results = getUnprocessedResults().map(filePath => {
const content = fs.readFileSync(filePath, 'utf8') const content = fs.readFileSync(filePath, 'utf8')
return JSON.parse(content) as BuildResult const buildResult = JSON.parse(content) as BuildResult
addScanResults(filePath, buildResult)
return buildResult
}) })
return new BuildResults(results)
} }
export function markBuildResultsProcessed(): void { export function markBuildResultsProcessed(): void {
@@ -24,7 +49,7 @@ export function markBuildResultsProcessed(): void {
} }
function getUnprocessedResults(): string[] { function getUnprocessedResults(): string[] {
const buildResultsDir = path.resolve(process.env['RUNNER_TEMP']!, '.build-results') const buildResultsDir = path.resolve(process.env['RUNNER_TEMP']!, '.gradle-actions', 'build-results')
if (!fs.existsSync(buildResultsDir)) { if (!fs.existsSync(buildResultsDir)) {
return [] return []
} }
@@ -39,6 +64,22 @@ function getUnprocessedResults(): string[] {
}) })
} }
function addScanResults(buildResultsFile: string, buildResult: BuildResult): void {
const buildScansDir = path.resolve(process.env['RUNNER_TEMP']!, '.gradle-actions', 'build-scans')
if (!fs.existsSync(buildScansDir)) {
return
}
const buildScanResults = path.resolve(buildScansDir, path.basename(buildResultsFile))
if (fs.existsSync(buildScanResults)) {
const content = fs.readFileSync(buildScanResults, 'utf8')
const scanResults = JSON.parse(content)
Object.assign(buildResult, scanResults)
}
return
}
function isProcessed(resultFile: string): boolean { function isProcessed(resultFile: string): boolean {
const markerFile = `${resultFile}.processed` const markerFile = `${resultFile}.processed`
return fs.existsSync(markerFile) return fs.existsSync(markerFile)

View File

@@ -1,8 +1,9 @@
import * as core from '@actions/core' import * as core from '@actions/core'
import * as exec from '@actions/exec' import * as exec from '@actions/exec'
import * as glob from '@actions/glob'
import fs from 'fs' import fs from 'fs'
import path from 'path' import path from 'path'
import * as provisioner from '../execution/provision'
export class CacheCleaner { export class CacheCleaner {
private readonly gradleUserHome: string private readonly gradleUserHome: string
@@ -13,26 +14,20 @@ export class CacheCleaner {
this.tmpDir = tmpDir this.tmpDir = tmpDir
} }
async prepare(): Promise<void> { async prepare(): Promise<string> {
// Reset the file-access journal so that files appear not to have been used recently // Save the current timestamp
fs.rmSync(path.resolve(this.gradleUserHome, 'caches/journal-1'), {recursive: true, force: true}) const timestamp = Date.now().toString()
fs.mkdirSync(path.resolve(this.gradleUserHome, 'caches/journal-1'), {recursive: true}) core.saveState('clean-timestamp', timestamp)
fs.writeFileSync( return timestamp
path.resolve(this.gradleUserHome, 'caches/journal-1/file-access.properties'),
'inceptionTimestamp=0'
)
// Set the modification time of all files to the past: this timestamp is used when there is no matching entry in the journal
await this.ageAllFiles()
// Touch all 'gc' files so that cache cleanup won't run immediately.
await this.touchAllFiles('gc.properties')
} }
async forceCleanup(): Promise<void> { async forceCleanup(): Promise<void> {
// Age all 'gc' files so that cache cleanup will run immediately. const cleanTimestamp = core.getState('clean-timestamp')
await this.ageAllFiles('gc.properties') await this.forceCleanupFilesOlderThan(cleanTimestamp)
}
// Visible for testing
async forceCleanupFilesOlderThan(cleanTimestamp: string): Promise<void> {
// Run a dummy Gradle build to trigger cache cleanup // Run a dummy Gradle build to trigger cache cleanup
const cleanupProjectDir = path.resolve(this.tmpDir, 'dummy-cleanup-project') const cleanupProjectDir = path.resolve(this.tmpDir, 'dummy-cleanup-project')
fs.mkdirSync(cleanupProjectDir, {recursive: true}) fs.mkdirSync(cleanupProjectDir, {recursive: true})
@@ -40,30 +35,52 @@ export class CacheCleaner {
path.resolve(cleanupProjectDir, 'settings.gradle'), path.resolve(cleanupProjectDir, 'settings.gradle'),
'rootProject.name = "dummy-cleanup-project"' 'rootProject.name = "dummy-cleanup-project"'
) )
fs.writeFileSync(
path.resolve(cleanupProjectDir, 'init.gradle'),
`
beforeSettings { settings ->
def cleanupTime = ${cleanTimestamp}
settings.caches {
cleanup = Cleanup.ALWAYS
releasedWrappers.setRemoveUnusedEntriesOlderThan(cleanupTime)
snapshotWrappers.setRemoveUnusedEntriesOlderThan(cleanupTime)
downloadedResources.setRemoveUnusedEntriesOlderThan(cleanupTime)
createdResources.setRemoveUnusedEntriesOlderThan(cleanupTime)
buildCache.setRemoveUnusedEntriesOlderThan(cleanupTime)
}
}
`
)
fs.writeFileSync(path.resolve(cleanupProjectDir, 'build.gradle'), 'task("noop") {}') fs.writeFileSync(path.resolve(cleanupProjectDir, 'build.gradle'), 'task("noop") {}')
const gradleCommand = `gradle -g ${this.gradleUserHome} --no-daemon --build-cache --no-scan --quiet -DGITHUB_DEPENDENCY_GRAPH_ENABLED=false noop` // Gradle >= 8.11 required for cache cleanup
await exec.exec(gradleCommand, [], { // TODO: This is ineffective: we should be using the newest version of Gradle that ran a build, or a newer version if it's available on PATH.
const executable = await provisioner.provisionGradleAtLeast('8.11.1')
await core.group('Executing Gradle to clean up caches', async () => {
core.info(`Cleaning up caches last used before ${cleanTimestamp}`)
await this.executeCleanupBuild(executable, cleanupProjectDir)
})
}
private async executeCleanupBuild(executable: string, cleanupProjectDir: string): Promise<void> {
const args = [
'-g',
this.gradleUserHome,
'-I',
'init.gradle',
'--info',
'--no-daemon',
'--no-scan',
'--build-cache',
'-DGITHUB_DEPENDENCY_GRAPH_ENABLED=false',
'noop'
]
await exec.exec(executable, args, {
cwd: cleanupProjectDir cwd: cleanupProjectDir
}) })
} }
private async ageAllFiles(fileName = '*'): Promise<void> {
core.debug(`Aging all files in Gradle User Home with name ${fileName}`)
await this.setUtimes(`${this.gradleUserHome}/**/${fileName}`, new Date(0))
}
private async touchAllFiles(fileName = '*'): Promise<void> {
core.debug(`Touching all files in Gradle User Home with name ${fileName}`)
await this.setUtimes(`${this.gradleUserHome}/**/${fileName}`, new Date())
}
private async setUtimes(pattern: string, timestamp: Date): Promise<void> {
const globber = await glob.create(pattern, {
implicitDescendants: false
})
for await (const file of globber.globGenerator()) {
fs.utimesSync(file, timestamp, timestamp)
}
}
} }

View File

@@ -73,7 +73,8 @@ export function getCacheKeyBase(cacheName: string, cacheProtocolVersion: string)
function getCacheKeyEnvironment(): string { function getCacheKeyEnvironment(): string {
const runnerOs = process.env['RUNNER_OS'] || '' const runnerOs = process.env['RUNNER_OS'] || ''
return process.env[CACHE_KEY_OS_VAR] || runnerOs const runnerArch = process.env['RUNNER_ARCH'] || ''
return process.env[CACHE_KEY_OS_VAR] || `${runnerOs}-${runnerArch}`
} }
function getCacheKeyJob(): string { function getCacheKeyJob(): string {

Some files were not shown because too many files have changed in this diff Show More