ci: fix caching by removing comments
The action/cache configuration uses a multi-line string which is split on new
lines rather than using a YAML list, so the comments were included in the path
values preventing any match.
MODIFY
.github/workflows/ci.yml
.github/workflows/ci.yml
@@ -56,24 +56,28 @@ jobs:
with:
go-version: ${{ matrix.go-version }}
+ - name: Checkout code
+ uses: actions/checkout@v2
+ with:
+ path: ${{ env.GOPATH }}/src/gonum.org/v1/gonum
+
- name: Cache-Go
- uses: actions/cache@v1
+ uses: actions/cache@v2
with:
+ # In order:
+ # * Module download cache
+ # * Build cache (Linux)
+ # * Build cache (Mac)
+ # * Build cache (Windows)
path: |
- ~/go/pkg/mod # Module download cache
- ~/.cache/go-build # Build cache (Linux)
- ~/Library/Caches/go-build # Build cache (Mac)
- '%LocalAppData%\go-build' # Build cache (Windows)
-
+ ~/go/pkg/mod
+ ~/.cache/go-build
+ ~/Library/Caches/go-build
+ '%LocalAppData%\go-build'
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- - name: Checkout code
- uses: actions/checkout@v2
- with:
- path: ${{ env.GOPATH }}/src/gonum.org/v1/gonum
-
- name: Check copyrights+imports+formatting+generate
if: matrix.platform == 'ubuntu-latest' && matrix.tags == ''
run: |

MODIFY
.github/workflows/codecov.yml
.github/workflows/codecov.yml
@@ -36,24 +36,28 @@ jobs:
with:
go-version: ${{ matrix.go-version }}
+ - name: Checkout code
+ uses: actions/checkout@v2
+ with:
+ path: ${{ env.GOPATH }}/src/gonum.org/v1/gonum
+
- name: Cache-Go
- uses: actions/cache@v1
+ uses: actions/cache@v2
with:
+ # In order:
+ # * Module download cache
+ # * Build cache (Linux)
+ # * Build cache (Mac)
+ # * Build cache (Windows)
path: |
- ~/go/pkg/mod # Module download cache
- ~/.cache/go-build # Build cache (Linux)
- ~/Library/Caches/go-build # Build cache (Mac)
- '%LocalAppData%\go-build' # Build cache (Windows)
-
+ ~/go/pkg/mod
+ ~/.cache/go-build
+ ~/Library/Caches/go-build
+ '%LocalAppData%\go-build'
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- - name: Checkout code
- uses: actions/checkout@v2
- with:
- path: ${{ env.GOPATH }}/src/gonum.org/v1/gonum
-
- name: Coverage
if: matrix.platform == 'ubuntu-latest'
run: |

ci: fix caching by removing comments

The action/cache configuration uses a multi-line string which is split on new
lines rather than using a YAML list, so the comments were included in the path
values preventing any match.