Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
env:
# Go version we currently use to build containerd across all CI.
# Note: don't forget to update `Binaries` step, as it contains the matrix of all supported Go versions.
GO_VERSION: "1.23.9"
GO_VERSION: "1.25"

permissions: # added using https://github.com/step-security/secure-workflows
contents: read
Expand All @@ -29,7 +29,7 @@ jobs:

strategy:
matrix:
os: [ubuntu-22.04, macos-13, windows-2022]
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/setup-go@v5
Expand All @@ -38,19 +38,17 @@ jobs:
cache: false # see actions/setup-go#368

- uses: actions/checkout@v4
- uses: golangci/golangci-lint-action@v6
- uses: golangci/golangci-lint-action@v7
with:
version: v1.61.0
skip-cache: true
args: --timeout=5m
version: v2.1.5

#
# Project checks
#
project:
name: Project Checks
if: github.repository == 'containerd/platforms'
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
Expand All @@ -76,7 +74,7 @@ jobs:

strategy:
matrix:
os: [ubuntu-22.04, macos-13, windows-2022]
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v4
Expand Down
37 changes: 15 additions & 22 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,25 @@
version: "2"
linters:
enable:
- copyloopvar
- gofmt
- goimports
- dupword
- gosec
- ineffassign
- misspell
- nolintlint
- revive
- staticcheck
- tenv # Detects using os.Setenv instead of t.Setenv since Go 1.17
- unconvert
- unused
- govet
- dupword # Checks for duplicate words in the source code
disable:
- errcheck

run:
timeout: 5m

issues:
exclude-dirs:
- api
- cluster
- design
- docs
- docs/man
- releases
- reports
- test # e2e scripts
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
formatters:
enable:
- gofmt
- goimports
exclusions:
generated: lax
7 changes: 4 additions & 3 deletions cpuinfo_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ func getCPUVariant() (string, error) {

var variant string

if runtime.GOOS == "windows" || runtime.GOOS == "darwin" {
switch runtime.GOOS {
case "windows", "darwin":
// Windows/Darwin only supports v7 for ARM32 and v8 for ARM64 and so we can use
// runtime.GOARCH to determine the variants
switch runtime.GOARCH {
Expand All @@ -38,7 +39,7 @@ func getCPUVariant() (string, error) {
default:
variant = "unknown"
}
} else if runtime.GOOS == "freebsd" {
case "freebsd":
// FreeBSD supports ARMv6 and ARMv7 as well as ARMv4 and ARMv5 (though deprecated)
// detecting those variants is currently unimplemented
switch runtime.GOARCH {
Expand All @@ -47,7 +48,7 @@ func getCPUVariant() (string, error) {
default:
variant = "unknown"
}
} else {
default:
return "", fmt.Errorf("getCPUVariant for OS %s: %v", runtime.GOOS, errNotImplemented)
}

Expand Down
Loading