From 502e2d5c60a6bd241a78e1b43ca7fdce7197f542 Mon Sep 17 00:00:00 2001 From: Nikolai Laevskii Date: Fri, 5 May 2023 00:52:39 +0200 Subject: [PATCH 1/6] Add trigger workflows script --- tw.ps1 | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tw.ps1 diff --git a/tw.ps1 b/tw.ps1 new file mode 100644 index 000000000..7e8881cec --- /dev/null +++ b/tw.ps1 @@ -0,0 +1,4 @@ +New-Item -Name "trigger_workflows" -Value ((Get-Content trigger_workflows) / 1 + 1) -Force; +git add .; +git commit -m "trigger_workflows"; +git push origin (git rev-parse --abbrev-ref HEAD); \ No newline at end of file From c99f29aca81518167900cc7cbd42aa971223d8c2 Mon Sep 17 00:00:00 2001 From: Nikolai Laevskii Date: Fri, 5 May 2023 00:53:38 +0200 Subject: [PATCH 2/6] trigger_workflows --- trigger_workflows | 1 + 1 file changed, 1 insertion(+) create mode 100644 trigger_workflows diff --git a/trigger_workflows b/trigger_workflows new file mode 100644 index 000000000..56a6051ca --- /dev/null +++ b/trigger_workflows @@ -0,0 +1 @@ +1 \ No newline at end of file From d8b56d2e4bfa9b8cd8e9129d7666244425ae4491 Mon Sep 17 00:00:00 2001 From: Nikolai Laevskii Date: Fri, 5 May 2023 00:56:02 +0200 Subject: [PATCH 3/6] Put checkout first to enable caching --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1bc66129e..5ede5040f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,14 +20,14 @@ jobs: go_version: [1.20.x] steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + - name: Set up Go 1.x uses: actions/setup-go@v4 with: go-version: ${{ matrix.go_version }} - - name: Check out code into the Go module directory - uses: actions/checkout@v3 - - name: Test run: go test -v ./... From 9802d7aa1ac6f224eaa8f6578b3fb94702bd1b3e Mon Sep 17 00:00:00 2001 From: Nikolai Laevskii Date: Fri, 5 May 2023 01:12:11 +0200 Subject: [PATCH 4/6] Add caching via actions/cache --- .github/workflows/ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ede5040f..1676a53a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,20 @@ jobs: with: go-version: ${{ matrix.go_version }} + - name: Verify go dependency paths + run: | + echo "$(go env GOMODCACHE)"; + echo "$(go env GOCACHE)" + + - name: Cache Go dependencies + uses: actions/cache@v3 + with: + key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} + restore-keys: ${{ runner.os }}-go-${{ matrix.go-version }}- + path: | + /home/runner/go/pkg/mod + /home/runner/.cache/go-build + - name: Test run: go test -v ./... From 211095c69b9be35006ca0bc166dfe92ec47d1499 Mon Sep 17 00:00:00 2001 From: Nikolai Laevskii Date: Fri, 5 May 2023 01:17:53 +0200 Subject: [PATCH 5/6] Update dpenedency file paths --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1676a53a3..947ded9c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,7 @@ jobs: uses: actions/setup-go@v4 with: go-version: ${{ matrix.go_version }} + cache-dependency-path: './go.sum' - name: Verify go dependency paths run: | @@ -36,7 +37,7 @@ jobs: - name: Cache Go dependencies uses: actions/cache@v3 with: - key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} + key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('./go.sum') }} restore-keys: ${{ runner.os }}-go-${{ matrix.go-version }}- path: | /home/runner/go/pkg/mod From 73be0eadd1c96eddaee2d29f15750b224ad97fe7 Mon Sep 17 00:00:00 2001 From: Nikolai Laevskii Date: Fri, 5 May 2023 01:20:50 +0200 Subject: [PATCH 6/6] Disable setup-go cache --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 947ded9c9..ef6a725bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v4 with: + cache: false go-version: ${{ matrix.go_version }} cache-dependency-path: './go.sum'