defaults: &defaults
resource_class: large
docker:
- - image: bepsays/ci-hugoreleaser:1.22500.20400
+ - image: bepsays/ci-hugoreleaser:1.22600.20000
environment: &buildenv
GOMODCACHE: /root/project/gomodcache
version: 2
environment:
<<: [*buildenv]
docker:
- - image: bepsays/ci-hugoreleaser-linux-arm64:1.22500.20400
+ - image: bepsays/ci-hugoreleaser-linux-arm64:1.22600.20000
steps:
- *restore-cache
- &attach-workspace
test:
strategy:
matrix:
- go-version: [1.24.x, 1.25.x]
+ go-version: [1.25.x, 1.26.x]
os: [ubuntu-latest, windows-latest] # macos disabled for now because of disk space issues.
runs-on: ${{ matrix.os }}
steps:
# Twitter: https://twitter.com/gohugoio
# Website: https://gohugo.io/
-ARG GO_VERSION="1.25"
+ARG GO_VERSION="1.26"
ARG ALPINE_VERSION="3.22"
ARG DART_SASS_VERSION="1.79.3"
}
c.r.Println("Congratulations!", fileCount, "post(s) imported!")
- c.r.Println("Now, start Hugo by yourself:\n")
+ c.r.Println("Now, start Hugo by yourself:")
c.r.Println("cd " + args[1])
c.r.Println("git init")
c.r.Println("git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke themes/ananke")
software.sslmate.com/src/go-pkcs12 v0.2.0 // indirect
)
-go 1.24.0
+go 1.25.0
goVersion = goVersion[:strings.LastIndex(goVersion, ".")]
}
+ goModVersion := goVersion
+ // From Go 1.26.0 on, the version used in go.mod on go mod init is the current version minus one.
+ if htesting.GoMinorVersion() >= 26 {
+ goModVersion = "1.25.0"
+ }
+
keyVals = append(keyVals, "GOVERSION", goVersion)
+ keyVals = append(keyVals, "GOMODVERSION", goModVersion)
envhelpers.SetEnvVars(&env.Vars, keyVals...)
return nil
import (
"testing"
+ "github.com/gohugoio/hugo/htesting"
"github.com/gohugoio/hugo/hugolib"
)
}
func TestColorsIssue14453(t *testing.T) {
+ // Go changed their JPEG implementation in Go 1.26, so we cannot run this test on earlier versions. See https://go.dev/doc/go1.26#imagejpegpkgimagejpeg
+ if htesting.GoMinorVersion() < 26 {
+ t.Skip("Go 1.26+ required")
+ }
files := `
-- hugo.toml --
-- assets/sunset.jpg --
cfg.NeedsOsFS = true
cfg.WorkingDir = tempDir
}))
- b.AssertFileContent("public/index.html", "Colors: [#2e2f34 #a39e94 #d39e57 #a96b3a #747b84 #7c838a]|")
+ b.AssertFileContent("public/index.html", "Colors: [#2e2f34 #a39e94 #d29e58 #ab6b3a #747b84 #7c838a]|")
}
}
}
// We don't have a CI test environment for these, and there are known dithering issues that makes these time consuming to maintain.
-var SkipGoldenTests = runtime.GOARCH == "ppc64" || runtime.GOARCH == "ppc64le" || runtime.GOARCH == "s390x"
+// Go changed their JPEG implementation in Go 1.26, so we cannot run the golden tests on earlier versions. See https://go.dev/doc/go1.26#imagejpegpkgimagejpeg
+var SkipGoldenTests = htesting.GoMinorVersion() < 26 || runtime.GOARCH == "ppc64" || runtime.GOARCH == "ppc64le" || runtime.GOARCH == "s390x"
// UsesFMA indicates whether "fused multiply and add" (FMA) instruction is
// used. The command "grep FMADD go/test/codegen/floats.go" can help keep
-- golden/go.mod.testsubmod --
module testsubmod
-go ${GOVERSION}
+go ${GOMODVERSION}
-- golden/go.mod.testsubmod --
module testsubmod
-go ${GOVERSION}
\ No newline at end of file
+go ${GOMODVERSION}
\ No newline at end of file