Skip to content

Commit

Permalink
update golang version of project and testimages to 1.19
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian Wienand <[email protected]>
  • Loading branch information
RiSKeD committed Oct 13, 2022
1 parent dcbb18f commit 01ebc9b
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 27 deletions.
22 changes: 11 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@ templates:
golang-template:
&golang-template
docker:
- image: uroottest/test-image-amd64:v5.0.0
working_directory: /go/src/github.com/u-root/u-root
- image: uroottest/test-image-amd64:v5.1.0
working_directory: /home/circleci/go/src/github.com/u-root/u-root
environment:
- UROOT_SOURCE: /go/src/github.com/u-root/u-root
- UROOT_SOURCE: /home/circleci/go/src/github.com/u-root/u-root
- CGO_ENABLED: 0
# x7 all timeouts for QEMU VM tests since they run without KVM.
- UROOT_QEMU_TIMEOUT_X: 7

integration-template:
&integration-template
working_directory: /go/src/github.com/u-root/u-root
working_directory: /home/circleci/go/src/github.com/u-root/u-root
environment:
- UROOT_SOURCE: /go/src/github.com/u-root/u-root
- UROOT_SOURCE: /home/circleci/go/src/github.com/u-root/u-root
- CGO_ENABLED: 0
# x7 all timeouts for QEMU VM tests since they run without KVM.
- UROOT_QEMU_TIMEOUT_X: 7
steps:
- checkout
- run:
name: Test integration
command: UROOT_SOURCE=/go/src/github.com/u-root/u-root
command: UROOT_SOURCE=/home/circleci/go/src/github.com/u-root/u-root
UROOT_QEMU_COVERPROFILE=coverage.txt go test -a -v -timeout=15m
-ldflags='-s' -failfast ./integration/...
no_output_timeout: 15m
Expand Down Expand Up @@ -60,14 +60,14 @@ jobs:
- checkout
- run:
name: Test Packages
command: UROOT_SOURCE=/go/src/github.com/u-root/u-root go test -v -a
command: UROOT_SOURCE=/home/circleci/go/src/github.com/u-root/u-root go test -v -a
-timeout=20m -ldflags='-s' -failfast -coverprofile=coverage_pkg.txt
-covermode=atomic -coverpkg=./pkg/... ./pkg/...
no_output_timeout: 15m

- run:
name: Test coverage
command: UROOT_SOURCE=/go/src/github.com/u-root/u-root
command: UROOT_SOURCE=/home/circleci/go/src/github.com/u-root/u-root
UROOT_QEMU_COVERPROFILE=vmcoverage.txt go test -timeout=20m
-failfast -coverprofile=coverage.txt -covermode=atomic -cover
./cmds/... ./pkg/...
Expand All @@ -94,7 +94,7 @@ jobs:
- checkout
- run:
name: Race detector
command: UROOT_SOURCE=/go/src/github.com/u-root/u-root go test -race
command: UROOT_SOURCE=/home/circleci/go/src/github.com/u-root/u-root go test -race
-timeout=15m -failfast ./cmds/... ./pkg/...

compile_cmds:
Expand Down Expand Up @@ -154,14 +154,14 @@ jobs:
test-integration-amd64:
<<: *integration-template
docker:
- image: uroottest/test-image-amd64:v5.0.0
- image: uroottest/test-image-amd64:v5.1.0
# The resource_class feature allows configuring CPU and RAM resources for each job. Different resource classes are available for different executors. https://circleci.com/docs/2.0/configuration-reference/#resourceclass
resource_class: large

test-integration-arm:
<<: *integration-template
docker:
- image: uroottest/test-image-arm:v5.0.0
- image: uroottest/test-image-arm:v5.1.0

# This arch needs a different working dir, so don't use integration-template
test-integration-arm64:
Expand Down
10 changes: 5 additions & 5 deletions .circleci/images/test-image-amd64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

FROM circleci/golang:1.17
FROM cimg/go:1.19

# Install dependencies
RUN sudo apt-get update && \
Expand Down Expand Up @@ -73,13 +73,13 @@ RUN set -eux; \

# Build Multiboot kernel
RUN set -eux; \
git clone --depth=1 --branch=v1.01 \
https://github.com/u-root/multiboot-test-kernel; \
git clone --depth=1 \
https://github.com/u-root/multiboot-test-kernel; \
cd multiboot-test-kernel; \
git checkout 1c7e4f4722077dcab308cd1df9818eab011e58c4; \
make; \
cd ~; \
cp multiboot-test-kernel/kernel ./; \
gzip -k kernel; \
cp multiboot-test-kernel/kernel.gz ./; \
rm -rf multiboot-test-kernel/

SHELL ["/bin/bash", "-c"]
Expand Down
2 changes: 1 addition & 1 deletion .circleci/images/test-image-arm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

FROM circleci/golang:1.17
FROM cimg/go:1.19

# Install dependencies
RUN sudo apt-get update && \
Expand Down
2 changes: 1 addition & 1 deletion .circleci/images/test-image-arm64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

FROM cimg/go:1.17
FROM cimg/go:1.19

# Install dependencies
RUN sudo apt-get update && \
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.19
- name: Install golangci-lint
run: |
cd ..
go get golang.org/x/lint/golint
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0
go install golang.org/x/lint/golint@latest
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.50.0
- name: Install ineffassign
run: (cd .. && go get github.com/gordonklaus/ineffassign)
run: (cd .. && go install github.com/gordonklaus/ineffassign@latest)
- name: Check vendored dependencies
run: |
go mod tidy
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.19

- name: Build
run: go build -mod=mod -v ./...
Expand All @@ -83,7 +83,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.19

- name: Build fail
id: buildfail
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ like `./u-root -uroot-source ./`

# Usage

Make sure your Go version is >=1.17.
Make sure your Go version is >=1.19.

Download and install u-root either via git:

Expand Down
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/u-root/u-root

go 1.17
go 1.19

require (
github.com/beevik/ntp v0.3.0
Expand Down
2 changes: 1 addition & 1 deletion u-root.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func main() {
}

var recommendedVersions = []string{
"go1.17",
"go1.19",
}

func isRecommendedVersion(v string) bool {
Expand Down

0 comments on commit 01ebc9b

Please sign in to comment.