;ci: github: windows: tweak caching
This commit is contained in:
		
							parent
							
								
									d19ea62297
								
							
						
					
					
						commit
						0d4158dfe0
					
				
							
								
								
									
										28
									
								
								.github/workflows/windows-nightly.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										28
									
								
								.github/workflows/windows-nightly.yml
									
									
									
									
										vendored
									
									
								
							| @ -67,20 +67,21 @@ jobs: | |||||||
|     # declare/restore cached things |     # declare/restore cached things | ||||||
| 
 | 
 | ||||||
|     - name: Cache stack global db   # downloaded ghcs, package indexes, third-party haskell deps |     - name: Cache stack global db   # downloaded ghcs, package indexes, third-party haskell deps | ||||||
|  |       id:   stack-global-db | ||||||
|       uses: actions/cache@v1 |       uses: actions/cache@v1 | ||||||
|       with: |       with: | ||||||
|         path: C:\Users\runneradmin\AppData\Local\Programs\stack\ |         path: C:\Users\runneradmin\AppData\Local\Programs\stack\ | ||||||
|         # which files signal a change in the global stack dir ? |         # which files signal a change in stack's global db ? | ||||||
|         # **.yaml includes *.package.yaml and all stack.yamls (too many) |         # **.yaml includes */package.yaml and stack.yaml* (too many), and hopefully no other changing yamls | ||||||
|         # and hopefully no other changing yamls |  | ||||||
|         key:          ${{ runner.os }}-appdata-local-programs-stack-${{ hashFiles('**.yaml') }} |         key:          ${{ runner.os }}-appdata-local-programs-stack-${{ hashFiles('**.yaml') }} | ||||||
|         restore-keys: ${{ runner.os }}-appdata-local-programs-stack |         restore-keys: ${{ runner.os }}-appdata-local-programs-stack | ||||||
| 
 | 
 | ||||||
|     - name: Cache stack local bin dir |     - name: Cache stack local bin dir | ||||||
|  |       id:   stack-local-bin-dir | ||||||
|       uses: actions/cache@v1 |       uses: actions/cache@v1 | ||||||
|       with: |       with: | ||||||
|         path: C:\Users\runneradmin\AppData\Roaming\stack\ |         path: C:\Users\runneradmin\AppData\Roaming\stack\ | ||||||
|         key: ${{ runner.os }}-appdata-roaming-stack-${{ hashFiles('**.yaml') }} |         key:          ${{ runner.os }}-appdata-roaming-stack-${{ hashFiles('**.yaml') }} | ||||||
|         restore-keys: ${{ runner.os }}-appdata-roaming-stack |         restore-keys: ${{ runner.os }}-appdata-roaming-stack | ||||||
| 
 | 
 | ||||||
|     # stack's local package dbs for the project and each package |     # stack's local package dbs for the project and each package | ||||||
| @ -88,46 +89,48 @@ jobs: | |||||||
|       uses: actions/cache@v1 |       uses: actions/cache@v1 | ||||||
|       with: |       with: | ||||||
|         path: .stack-work |         path: .stack-work | ||||||
|         key: ${{ runner.os }}-stack-work-${{ hashFiles('**.yaml') }} |         key:          ${{ runner.os }}-stack-work-${{ hashFiles('**.yaml') }} | ||||||
|         restore-keys: ${{ runner.os }}-stack-work |         restore-keys: ${{ runner.os }}-stack-work | ||||||
| 
 | 
 | ||||||
|     - name: Cache hledger-lib/.stack-work |     - name: Cache hledger-lib/.stack-work | ||||||
|       uses: actions/cache@v1 |       uses: actions/cache@v1 | ||||||
|       with: |       with: | ||||||
|         path: hledger-lib/.stack-work |         path: hledger-lib/.stack-work | ||||||
|         key: ${{ runner.os }}-hledger-lib-stack-work-${{ hashFiles('hledger-lib/package.yaml') }} |         key:          ${{ runner.os }}-hledger-lib-stack-work-${{ hashFiles('hledger-lib/package.yaml') }} | ||||||
|         restore-keys: ${{ runner.os }}-hledger-lib-stack-work |         restore-keys: ${{ runner.os }}-hledger-lib-stack-work | ||||||
| 
 | 
 | ||||||
|     - name: Cache hledger/.stack-work |     - name: Cache hledger/.stack-work | ||||||
|       uses: actions/cache@v1 |       uses: actions/cache@v1 | ||||||
|       with: |       with: | ||||||
|         path: hledger/.stack-work |         path: hledger/.stack-work | ||||||
|         key: ${{ runner.os }}-hledger-stack-work-${{ hashFiles('hledger/package.yaml') }} |         key:          ${{ runner.os }}-hledger-stack-work-${{ hashFiles('hledger/package.yaml') }} | ||||||
|         restore-keys: ${{ runner.os }}-hledger-stack-work |         restore-keys: ${{ runner.os }}-hledger-stack-work | ||||||
| 
 | 
 | ||||||
|     - name: Cache hledger-ui/.stack-work |     - name: Cache hledger-ui/.stack-work | ||||||
|       uses: actions/cache@v1 |       uses: actions/cache@v1 | ||||||
|       with: |       with: | ||||||
|         path: hledger-ui/.stack-work |         path: hledger-ui/.stack-work | ||||||
|         key: ${{ runner.os }}-hledger-ui-stack-work-${{ hashFiles('hledger-ui/package.yaml') }} |         key:          ${{ runner.os }}-hledger-ui-stack-work-${{ hashFiles('hledger-ui/package.yaml') }} | ||||||
|         restore-keys: ${{ runner.os }}-hledger-ui-stack-work |         restore-keys: ${{ runner.os }}-hledger-ui-stack-work | ||||||
| 
 | 
 | ||||||
|     - name: Cache hledger-web/.stack-work |     - name: Cache hledger-web/.stack-work | ||||||
|       uses: actions/cache@v1 |       uses: actions/cache@v1 | ||||||
|       with: |       with: | ||||||
|         path: hledger-web/.stack-work |         path: hledger-web/.stack-work | ||||||
|         key: ${{ runner.os }}-hledger-web-stack-work-${{ hashFiles('hledger-web/package.yaml') }} |         key:          ${{ runner.os }}-hledger-web-stack-work-${{ hashFiles('hledger-web/package.yaml') }} | ||||||
|         restore-keys: ${{ runner.os }}-hledger-web-stack-work |         restore-keys: ${{ runner.os }}-hledger-web-stack-work | ||||||
| 
 | 
 | ||||||
|     # actions |     # actions | ||||||
| 
 | 
 | ||||||
|     - name: Install stack |     - name: Install stack | ||||||
|  |       if: steps.stack-local-bin-dir.outputs.cache-hit != 'true' | ||||||
|       run: | |       run: | | ||||||
|         curl -skL -o stack.zip http://www.stackage.org/stack/windows-x86_64 |         curl -skL -o stack.zip http://www.stackage.org/stack/windows-x86_64 | ||||||
|         7z x stack.zip -oC:\Windows stack.exe |         7z x stack.zip -oC:\Windows stack.exe | ||||||
|         stack --version |         stack --version | ||||||
| 
 | 
 | ||||||
|     - name: Install GHC |     - name: Install GHC | ||||||
|  |       if: steps.stack-global-db.outputs.cache-hit != 'true' | ||||||
|       run: | |       run: | | ||||||
|         stack --no-terminal setup --install-ghc |         stack --no-terminal setup --install-ghc | ||||||
| 
 | 
 | ||||||
| @ -137,13 +140,10 @@ jobs: | |||||||
| 
 | 
 | ||||||
|     - name: Install haskell deps |     - name: Install haskell deps | ||||||
|       run: | |       run: | | ||||||
|         stack --no-terminal build --test --only-dependencies |         stack --no-terminal build --only-dependencies | ||||||
|       #  --bench --install-ghc |  | ||||||
| 
 | 
 | ||||||
|     - name: Build hledger |     - name: Build hledger | ||||||
|       run: | |       run: stack --no-terminal install --ghc-options=-Werror | ||||||
|         stack P--no-terminal install --ghc-options=-Werror --test |  | ||||||
|       #  --bench --no-run-benchmarks --haddock --no-haddock-deps |  | ||||||
| 
 | 
 | ||||||
|     # run hledger-lib/hledger functional tests, skipping the ones for addons |     # run hledger-lib/hledger functional tests, skipping the ones for addons | ||||||
|     #- COLUMNS=80 stack exec -- shelltest --execdir -j16 tests -x /bin -x /addons |     #- COLUMNS=80 stack exec -- shelltest --execdir -j16 tests -x /bin -x /addons | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user