Skip to content

Commit

Permalink
ci: adopt Go 1.23
Browse files Browse the repository at this point in the history
  • Loading branch information
tri-adam committed Aug 19, 2024
1 parent c34066c commit cbb74bc
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
go-version: ['~1.21.0', '~1.22.0', '~1.23.0-rc.1']
go-version: ['~1.22.0', '~1.23.0']

steps:
- uses: actions/checkout@v4
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '~1.22.0'
- run: go mod tidy
- run: git diff --exit-code --
go-version: '~1.23.0'
- run: go mod tidy -diff

check-test-corpus:
name: Check Test Corpus
Expand All @@ -27,7 +26,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '~1.22.0'
go-version: '~1.23.0'
- run: sudo apt-get install -qy squashfs-tools-ng
- run: go run ./test/images/gen_images.go ./test/images
- run: git diff --exit-code --
Expand All @@ -40,7 +39,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '~1.22.0'
go-version: '~1.23.0'
- uses: goreleaser/goreleaser-action@v6
with:
args: check
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '~1.22.0'
go-version: '~1.23.0'
- uses: goreleaser/goreleaser-action@v6
with:
args: release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '~1.22.0'
go-version: '~1.23.0'
- uses: golangci/golangci-lint-action@v6
with:
version: v1.59
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
go-version: ['~1.21.0', '~1.22.0', '~1.23.0-rc.1']
go-version: ['~1.22.0', '~1.23.0']

steps:
- uses: actions/checkout@v4
Expand All @@ -31,7 +31,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '~1.22.0'
go-version: '~1.23.0'
- uses: goreleaser/goreleaser-action@v6
with:
args: release --snapshot --skip=publish
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/sylabs/oci-tools

go 1.21.0
go 1.22.0

require (
github.com/google/go-containerregistry v0.20.2
Expand Down
8 changes: 4 additions & 4 deletions test/images/gen_images.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,10 @@ func generateTARImages(path string) error {
}

func generateManyLayerImage(path string) error {
var ls []v1.Layer

// Generate 50 unique layers.
for i := 0; i < 50; i++ {
ls := make([]v1.Layer, 50)

for i := range len(ls) {
layer := []tarEntry{
{Typeflag: tar.TypeReg, Name: strconv.Itoa(i)},
}
Expand All @@ -450,7 +450,7 @@ func generateManyLayerImage(path string) error {
return err
}

ls = append(ls, l)
ls[i] = l
}

img, err := mutate.AppendLayers(empty.Image, ls...)
Expand Down

0 comments on commit cbb74bc

Please sign in to comment.