Commit graph

36 commits

Author SHA1 Message Date
Daz DeBoer
4d37378696
Consolidate cache-enabled options 2021-09-05 21:38:33 -06:00
Daz DeBoer
777a6fc967
Generate cache key based on Job invocation
Attempt to capture as much context as possible about the job run
to generate a unique cache key. Unfortunately much of the matrix context
is not available to the action implementation.
2021-09-05 21:35:17 -06:00
Daz DeBoer
436390bd4e
Test coverage: Verify configuration-cache is restored with project-dot-gradle 2021-08-27 12:53:02 -06:00
Daz DeBoer
a587e93714
Test coverage: Verify local build cache is restored with gradle-user-home 2021-08-27 12:53:02 -06:00
Daz DeBoer
75e00ee3d1
Test coverage: Verify dependency caching by running offline build 2021-08-27 12:53:02 -06:00
Daz DeBoer
c01af7a6f6
Test coverage: verify correct Gradle version is being used 2021-08-27 12:53:02 -06:00
Daz DeBoer
b85ac67c9a
Seed the cache key with workflow id in CI
This will eliminate cache entries from previous workflow runs, allowing
us to test cache functionality in isolation. If the `CACHE_KEY_SEED` environment
variable is not set, this will have no impact.
2021-08-27 12:52:01 -06:00
Daz DeBoer
fa0c026e07
Always execute Gradle with --no-daemon
The Gradle daemon is not useful for ephemeral builds, and the process
can hold file locks which interfere with cache entry generation.

In the case where multiple Gradle invocations occur in the same job,
we could provide a way for users to override this behaviour, taking care
of stopping any daemon process at the end of the job.
2021-08-27 12:21:46 -06:00
Daz DeBoer
986024f0b7
Adapt README and workflow for new caching 2021-08-26 17:25:50 -06:00
Daz DeBoer
d9cc0aeccf
Remove old caching code 2021-08-24 12:54:21 -06:00
Daz DeBoer
a148b21183
Improve prod workflow
- Use a separate job to test read-only cache
- Use dependency jobs to avoid cache race conditions
2021-08-22 14:42:01 -06:00
Daz DeBoer
a693ccda4b
Allow use of caches 'read-only'
To avoid evicting useful entries, some pipeline may benefit from using existing
cache entries without writing any changes back to the cache.

Fixes #62
2021-08-22 14:28:34 -06:00
Daz DeBoer
543cacb256
Allow manual trigger of prod workflow 2021-08-20 14:00:30 -06:00
Paul Merlin
41aebc770d Fix typo in test workflow
Signed-off-by: Paul Merlin <paul@gradle.com>
2021-07-27 08:22:05 +02:00
Daz DeBoer
1f57b4dd2d
Re-add workflow jobs for dependencies and configuration caches 2021-07-26 15:45:00 -06:00
Daz DeBoer
b9684c0cf5
Prefer ‘release-candidate’ instead of ‘rc’
This makes the version alias match other places where we reference a release candidate version.
The 'rc' alias is still supported, but emits a deprecation warning.
2021-07-26 14:54:59 -06:00
Daz DeBoer
5423935c9b
Deprecate the 'wrapper-directory' input and recommend 'gradle-executable' instead
Use of a wrapper in a non-standard directory is uncommon, and is effectively handled
by referencing the `gradlew` script as the `gradle-executable`.
2021-07-26 14:54:59 -06:00
Daz DeBoer
15a8123fbc Validate presense of gradle wrapper to provide better feedback
- Provide a more useful error message when no Gradle wrapper can be located,
  and 'gradle-version' or 'gradle-executable' is not used.
- Add test for case where wrapper is missing.
  This isn't really a "test" per-se, but this failing build invocation makes it
  easy to verify the GitHub action behaviour when the build is misconfigured.
2021-07-08 08:01:44 -06:00
Daz DeBoer
f0c6ac01d3 Add test for gradle-executable parameter
Use matrix to allow different script suffix on windows
2021-07-06 13:29:55 -06:00
Daz DeBoer
63fea55da4 Add a very-limited ‘no-wrapper’ test Gradle build
Will use this for testing Gradle execution with different versions and mechanisms.
2021-07-06 13:29:55 -06:00
Daz DeBoer
26b92e3f5c Separate unit-test data from integ-test samples
- Upgraded `samples/basic` to use latest Gradle version.
2021-07-06 13:29:55 -06:00
Daz DeBoer
643092d2fc Ensure that test invocations are targeted at a specific use-case
- Remove the 'gradle --stop' step from the prod workflow.
  We either need to stop all instances started, or rely on GitHub to clean up processes on completion.
- Remove configuration-cache and dependencies-cache from basic tests. We will later need to add
  tests invocations specific for these features.
2021-07-06 13:29:55 -06:00
Daz DeBoer
18c8a679dc Look for gradle wrapper in build-root-directory by default
This removes the need to specify `wrapper-directory` when using a Gradle
project that is not located in the root of the workspace.

Fixes #44.
2021-07-06 09:56:27 -06:00
Paul Merlin
c8c53f54bb Let CI exercises using latest Gradle RC 2020-09-13 13:25:31 +02:00
Paul Merlin
053f389907 CI prod check workflow stops Gradle daemon at the end
to allow for dependency caching to work on windows
2020-06-15 20:08:27 +02:00
Paul Merlin
4f9b5202aa Faster CI 2020-06-15 20:03:30 +02:00
Paul Merlin
aefd8348d2 Enable configuration cache on CI 2020-06-15 16:03:04 +02:00
Paul Merlin
f2de61db4e Enable configuration cache on CI 2020-06-15 15:58:50 +02:00
Paul Merlin
806543fb3a Enable dependencies cache on CI 2020-06-15 15:57:47 +02:00
Paul Merlin
95e20daa83 Automatic caching of dependencies
in a best effort manner by default
allowing to specify files to hash for computing the cache key
2020-06-15 13:04:42 +02:00
Paul Merlin
b35e929b1d Simplify CI 2020-06-14 12:36:06 +02:00
Paul Merlin
83e6d042d7 Run CI on linux, macos and windows 2020-06-14 12:22:21 +02:00
Paul Merlin
2bf5eec3b6 Test dist download on CI 2020-06-13 14:33:32 +02:00
Paul Merlin
5c61ab77ec Add back CI check for uncommited changes 2020-06-13 13:46:53 +02:00
Paul Merlin
b55d63f1f8 Refine CI workflows 2020-06-13 13:17:04 +02:00
Paul Merlin
8f6be44bf5 Split dev/prod CI workflows 2020-06-13 13:14:52 +02:00