| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 4b1b3d4 commit 08e4e81
67 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,113 @@ | |||
| 1 | + name: Validate cache | ||
| 2 | + on: | ||
| 3 | + push: | ||
| 4 | + branches: | ||
| 5 | + - main | ||
| 6 | + - releases/* | ||
| 7 | + paths-ignore: | ||
| 8 | + - '**.md' | ||
| 9 | + pull_request: | ||
| 10 | + paths-ignore: | ||
| 11 | + - '**.md' | ||
| 12 | + | ||
| 13 | + defaults: | ||
| 14 | + run: | ||
| 15 | + shell: bash | ||
| 16 | + | ||
| 17 | + jobs: | ||
| 18 | + gradle-save: | ||
| 19 | + runs-on: ${{ matrix.os }} | ||
| 20 | + strategy: | ||
| 21 | + fail-fast: false | ||
| 22 | + matrix: | ||
| 23 | + os: [macos-latest, windows-latest, ubuntu-latest] | ||
| 24 | + steps: | ||
| 25 | + - name: Checkout | ||
| 26 | + uses: actions/checkout@v2 | ||
| 27 | + - name: Run setup-java with the cache for gradle | ||
| 28 | + uses: ./ | ||
| 29 | + id: setup-java | ||
| 30 | + with: | ||
| 31 | + distribution: 'adopt' | ||
| 32 | + java-version: '11' | ||
| 33 | + cache: gradle | ||
| 34 | + - name: Create files to cache | ||
| 35 | + # Need to avoid using Gradle daemon to stabilize the save process on Windows | ||
| 36 | + # https://github.com/actions/cache/issues/454#issuecomment-840493935 | ||
| 37 | + run: | | ||
| 38 | + gradle downloadDependencies --no-daemon -p __tests__/cache/gradle | ||
| 39 | + if [ ! -d ~/.gradle/caches ]; then | ||
| 40 | + echo "::error::The ~/.gradle/caches directory does not exist unexpectedly" | ||
| 41 | + exit 1 | ||
| 42 | + fi | ||
| 43 | + gradle-restore: | ||
| 44 | + runs-on: ${{ matrix.os }} | ||
| 45 | + strategy: | ||
| 46 | + fail-fast: false | ||
| 47 | + matrix: | ||
| 48 | + os: [macos-latest, windows-latest, ubuntu-latest] | ||
| 49 | + needs: gradle-save | ||
| 50 | + steps: | ||
| 51 | + - name: Checkout | ||
| 52 | + uses: actions/checkout@v2 | ||
| 53 | + - name: Run setup-java with the cache for gradle | ||
| 54 | + uses: ./ | ||
| 55 | + id: setup-java | ||
| 56 | + with: | ||
| 57 | + distribution: 'adopt' | ||
| 58 | + java-version: '11' | ||
| 59 | + cache: gradle | ||
| 60 | + - name: Confirm that ~/.gradle/caches directory has been made | ||
| 61 | + run: | | ||
| 62 | + if [ ! -d ~/.gradle/caches ]; then | ||
| 63 | + echo "::error::The ~/.gradle/caches directory does not exist unexpectedly" | ||
| 64 | + exit 1 | ||
| 65 | + fi | ||
| 66 | + ls ~/.gradle/caches/ | ||
| 67 | + maven-save: | ||
| 68 | + runs-on: ${{ matrix.os }} | ||
| 69 | + strategy: | ||
| 70 | + fail-fast: false | ||
| 71 | + matrix: | ||
| 72 | + os: [macos-latest, windows-latest, ubuntu-latest] | ||
| 73 | + steps: | ||
| 74 | + - name: Checkout | ||
| 75 | + uses: actions/checkout@v2 | ||
| 76 | + - name: Run setup-java with the cache for maven | ||
| 77 | + uses: ./ | ||
| 78 | + id: setup-java | ||
| 79 | + with: | ||
| 80 | + distribution: 'adopt' | ||
| 81 | + java-version: '11' | ||
| 82 | + cache: maven | ||
| 83 | + - name: Create files to cache | ||
| 84 | + run: | | ||
| 85 | + mvn verify -f __tests__/cache/maven/pom.xml | ||
| 86 | + if [ ! -d ~/.m2/repository ]; then | ||
| 87 | + echo "::error::The ~/.m2/repository directory does not exist unexpectedly" | ||
| 88 | + exit 1 | ||
| 89 | + fi | ||
| 90 | + maven-restore: | ||
| 91 | + runs-on: ${{ matrix.os }} | ||
| 92 | + strategy: | ||
| 93 | + fail-fast: false | ||
| 94 | + matrix: | ||
| 95 | + os: [macos-latest, windows-latest, ubuntu-latest] | ||
| 96 | + needs: maven-save | ||
| 97 | + steps: | ||
| 98 | + - name: Checkout | ||
| 99 | + uses: actions/checkout@v2 | ||
| 100 | + - name: Run setup-java with the cache for maven | ||
| 101 | + uses: ./ | ||
| 102 | + id: setup-java | ||
| 103 | + with: | ||
| 104 | + distribution: 'adopt' | ||
| 105 | + java-version: '11' | ||
| 106 | + cache: maven | ||
| 107 | + - name: Confirm that ~/.m2/repository directory has been made | ||
| 108 | + run: | | ||
| 109 | + if [ ! -d ~/.m2/repository ]; then | ||
| 110 | + echo "::error::The ~/.m2/repository directory does not exist unexpectedly" | ||
| 111 | + exit 1 | ||
| 112 | + fi | ||
| 113 | + ls ~/.m2/repository | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,6 +3,7 @@ sources: | |||
| 3 | 3 | ||
| 4 | 4 | allowed: | |
| 5 | 5 | - apache-2.0 | |
| 6 | + - 0bsd | ||
| 6 | 7 | - bsd-2-clause | |
| 7 | 8 | - bsd-3-clause | |
| 8 | 9 | - isc | |
| Back | FazBrowse Home | New Git URL |
0 commit comments