mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
ci: clean GOCACHE before build (#17808)
this is basically to avoid Fear/Uncertainty/Doubt the github action actions/setup-go (and, with a different chache key, hashicorp/setup-golang) caches both GOMODCACHE (go source files), which is good, and GOCACHE (build outputs), which *might* be bad, if the cache was built on an OS with an older glibc than we want to support. from `go help cache`: > [...] the build cache does not detect changes to > C libraries imported with cgo.
This commit is contained in:
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@@ -118,6 +118,7 @@ jobs:
|
||||
GO_TAGS: ${{ env.GO_TAGS }}
|
||||
CGO_ENABLED: 1
|
||||
run: |
|
||||
go clean -cache
|
||||
make pkg/${{ matrix.goos }}_${{ matrix.goarch }}.zip
|
||||
mv pkg/${{ matrix.goos }}_${{ matrix.goarch }}.zip ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
|
||||
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
||||
@@ -189,6 +190,7 @@ jobs:
|
||||
GO_TAGS: ${{ env.GO_TAGS }}
|
||||
CGO_ENABLED: 1
|
||||
run: |
|
||||
go clean -cache
|
||||
make pkg/${{ matrix.goos }}_${{ matrix.goarch }}.zip
|
||||
mv pkg/${{ matrix.goos }}_${{ matrix.goarch }}.zip ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
|
||||
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
||||
@@ -274,6 +276,7 @@ jobs:
|
||||
GO_TAGS: "${{ env.GO_TAGS }} netcgo"
|
||||
CGO_ENABLED: 1
|
||||
run: |
|
||||
go clean -cache
|
||||
make pkg/${{ matrix.goos }}_${{ matrix.goarch }}.zip
|
||||
mv pkg/${{ matrix.goos }}_${{ matrix.goarch }}.zip ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
|
||||
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
||||
|
||||
Reference in New Issue
Block a user