diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 056f53b1ad..b16c95f7f9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,6 +22,24 @@ jobs: **/**.go go.mod go.sum + - name: Get data from build cache + uses: actions/cache@v2 + with: + # In order: + # * Module download cache + # * Linter cache (Linux) + # * Build cache (Linux) + # * Build cache (Mac) + # * Build cache (Windows) + path: | + ~/go/pkg/mod + ~/.cache/golangci-lint + ~/.cache/go-build + ~/Library/Caches/go-build + ~\AppData\Local\go-build + key: ${{ runner.os }}-go-linter-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go-linter-${{ matrix.go-version }}- - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: diff --git a/.github/workflows/test-race.yml b/.github/workflows/test-race.yml index 1b92805875..9307e82c3c 100644 --- a/.github/workflows/test-race.yml +++ b/.github/workflows/test-race.yml @@ -101,6 +101,22 @@ jobs: **/**.go go.mod go.sum + - name: Get data from build cache + uses: actions/cache@v2 + with: + # In order: + # * Module download cache + # * Build cache (Linux) + # * Build cache (Mac) + # * Build cache (Windows) + path: | + ~/go/pkg/mod + ~/.cache/go-build + ~/Library/Caches/go-build + ~\AppData\Local\go-build + key: ${{ runner.os }}-go-race-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go-race-${{ matrix.go-version }}- - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-${{ matrix.part }}" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b5234cc89e..a5d5f0cbec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -112,6 +112,24 @@ jobs: **/**.go go.mod go.sum + - name: Get data from build cache + uses: actions/cache@v2 + with: + # In order: + # * Module download cache + # * Linter cache (Linux) + # * Build cache (Linux) + # * Build cache (Mac) + # * Build cache (Windows) + path: | + ~/go/pkg/mod + ~/.cache/golangci-lint + ~/.cache/go-build + ~/Library/Caches/go-build + ~\AppData\Local\go-build + key: ${{ runner.os }}-go-linter-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go-linter-${{ matrix.go-version }}- - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-${{ matrix.part }}" @@ -189,6 +207,23 @@ jobs: **/**.go go.mod go.sum + - name: Get data from build cache + uses: actions/cache@v2 + with: + # In order: + # * Module download cache + # * Build cache (Linux) + # * Build cache (Mac) + # * Build cache (Windows) + path: | + ~/go/pkg/mod + ~/.cache/golangci-lint + ~/.cache/go-build + ~/Library/Caches/go-build + ~\AppData\Local\go-build + key: ${{ runner.os }}-go-rosetta-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go-rosetta-${{ matrix.go-version }}- - name: test rosetta run: | make test-rosetta @@ -209,6 +244,22 @@ jobs: **/**.go go.mod go.sum + - name: Get data from build cache + uses: actions/cache@v2 + with: + # In order: + # * Module download cache + # * Build cache (Linux) + # * Build cache (Mac) + # * Build cache (Windows) + path: | + ~/go/pkg/mod + ~/.cache/go-build + ~/Library/Caches/go-build + ~\AppData\Local\go-build + key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go-${{ matrix.go-version }}- - name: start localnet run: | make clean localnet-start @@ -250,6 +301,22 @@ jobs: **/**.go go.mod go.sum + - name: Get data from build cache + uses: actions/cache@v2 + with: + # In order: + # * Module download cache + # * Build cache (Linux) + # * Build cache (Mac) + # * Build cache (Windows) + path: | + ~/go/pkg/mod + ~/.cache/go-build + ~/Library/Caches/go-build + ~\AppData\Local\go-build + key: ${{ runner.os }}-go-sim-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go-sim-${{ matrix.go-version }}- - uses: actions/cache@v3 with: path: ~/go/bin