-
Notifications
You must be signed in to change notification settings - Fork 834
Introduce the dependency caching for Maven and Gradle #193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
fef7d58
4a7bf99
945940e
0591f86
f537562
b047f97
3e2fde2
a5a0c52
1872d8e
313e1ad
8687e45
6977c03
7fe6c4d
fae2927
f6a3b97
5f3f74c
53f73ba
862dedb
098a656
cb966d0
6edf849
0082baa
ea721b3
807e574
33dfe17
67b74a1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| name: Validate cache | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - releases/* | ||
| paths-ignore: | ||
| - '**.md' | ||
| pull_request: | ||
| paths-ignore: | ||
| - '**.md' | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: bash | ||
|
|
||
| jobs: | ||
| gradle-save: | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [macos-latest, windows-latest, ubuntu-latest] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
| - name: Run setup-java with the cache for gradle | ||
| uses: ./ | ||
| id: setup-java | ||
| with: | ||
| distribution: 'adopt' | ||
| java-version: '11' | ||
| cache: gradle | ||
| - name: Create files to cache | ||
| # Need to avoid using Gradle daemon to stabilize the save process on Windows | ||
| # https://github.com/actions/cache/issues/454#issuecomment-840493935 | ||
| run: | | ||
| gradle downloadDependencies --no-daemon -p __tests__/cache/gradle | ||
| if [ ! -d ~/.gradle/caches ]; then | ||
| echo "::error::The ~/.gradle/caches directory does not exist unexpectedly" | ||
| exit 1 | ||
| fi | ||
| gradle-restore: | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [macos-latest, windows-latest, ubuntu-latest] | ||
| needs: gradle-save | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
| - name: Run setup-java with the cache for gradle | ||
| uses: ./ | ||
| id: setup-java | ||
| with: | ||
| distribution: 'adopt' | ||
| java-version: '11' | ||
| cache: gradle | ||
| - name: Confirm that ~/.gradle/caches directory has been made | ||
| run: | | ||
| if [ ! -d ~/.gradle/caches ]; then | ||
| echo "::error::The ~/.gradle/caches directory does not exist unexpectedly" | ||
| exit 1 | ||
| fi | ||
| ls ~/.gradle/caches/ | ||
| maven-save: | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [macos-latest, windows-latest, ubuntu-latest] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
| - name: Run setup-java with the cache for maven | ||
| uses: ./ | ||
| id: setup-java | ||
| with: | ||
| distribution: 'adopt' | ||
| java-version: '11' | ||
| cache: maven | ||
| - name: Create files to cache | ||
| run: | | ||
| mvn verify -f __tests__/cache/maven/pom.xml | ||
| if [ ! -d ~/.m2/repository ]; then | ||
| echo "::error::The ~/.m2/repository directory does not exist unexpectedly" | ||
| exit 1 | ||
| fi | ||
| maven-restore: | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [macos-latest, windows-latest, ubuntu-latest] | ||
| needs: maven-save | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
| - name: Run setup-java with the cache for maven | ||
| uses: ./ | ||
| id: setup-java | ||
| with: | ||
| distribution: 'adopt' | ||
| java-version: '11' | ||
| cache: maven | ||
| - name: Confirm that ~/.m2/repository directory has been made | ||
| run: | | ||
| if [ ! -d ~/.m2/repository ]; then | ||
| echo "::error::The ~/.m2/repository directory does not exist unexpectedly" | ||
| exit 1 | ||
| fi | ||
| ls ~/.m2/repository | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ sources: | |
|
|
||
| allowed: | ||
| - apache-2.0 | ||
| - 0bsd | ||
| - bsd-2-clause | ||
| - bsd-3-clause | ||
| - isc | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.