diff --git a/.github/workflows/buildtest.yml b/.github/workflows/buildtest.yml index 5c609c7bf..6bec17884 100644 --- a/.github/workflows/buildtest.yml +++ b/.github/workflows/buildtest.yml @@ -9,7 +9,7 @@ jobs: build: strategy: matrix: - go-version: [1.13.x, 1.14.x, 1.15.x, 1.16.x] + go-version: [1.17.x, 1.18.x] os: [ubuntu-latest] runs-on: ${{ matrix.os }} env: @@ -17,7 +17,7 @@ jobs: TARGET: amd64 steps: - name: Set up Go - uses: actions/setup-go@v1 + uses: actions/setup-go@v3 with: go-version: ${{ matrix.go-version }} diff --git a/Makefile b/Makefile index 8965a81f1..8c6a027f2 100644 --- a/Makefile +++ b/Makefile @@ -62,24 +62,24 @@ $(BUILDDIR)/$(BINARY_NAME): $(GOFILES) | $(BUILDDIR) # Tools GOLINT = $(GOBIN)/golint -$(GOBIN)/golint: | $(BASE) ; $(info Building golint...) - $Q go get -u golang.org/x/lint/golint +$(GOBIN)/golint: | $(BASE) ; $(info Installing golint...) + $Q go install golang.org/x/lint/golint GOCOVMERGE = $(GOBIN)/gocovmerge -$(GOBIN)/gocovmerge: | $(BASE) ; $(info Building gocovmerge...) - $Q go get github.com/wadey/gocovmerge +$(GOBIN)/gocovmerge: | $(BASE) ; $(info Installing gocovmerge...) + $Q go install github.com/wadey/gocovmerge GOCOV = $(GOBIN)/gocov -$(GOBIN)/gocov: | $(BASE) ; $(info Building gocov...) - $Q go get github.com/axw/gocov/... +$(GOBIN)/gocov: | $(BASE) ; $(info Installing gocov...) + $Q go install github.com/axw/gocov/... GOCOVXML = $(GOBIN)/gocov-xml -$(GOBIN)/gocov-xml: | $(BASE) ; $(info Building gocov-xml...) - $Q go get github.com/AlekSi/gocov-xml +$(GOBIN)/gocov-xml: | $(BASE) ; $(info Installing gocov-xml...) + $Q go install github.com/AlekSi/gocov-xml GO2XUNIT = $(GOBIN)/go2xunit -$(GOBIN)/go2xunit: | $(BASE) ; $(info Building go2xunit...) - $Q go get github.com/tebeka/go2xunit +$(GOBIN)/go2xunit: | $(BASE) ; $(info Installing go2xunit...) + $Q go install github.com/tebeka/go2xunit # Tests @@ -140,6 +140,10 @@ image: | $(BASE) ; $(info Building Docker image...) @ ## Build SR-IOV CNI docker # Misc +.PHONY: deps-update +deps-update: ; $(info Updating dependencies...) @ ## Update dependencies + @go mod tidy && go mod vendor + .PHONY: clean clean: | $(BASE) ; $(info Cleaning...) @ ## Cleanup everything @cd $(BASE) && $(GO) clean --modcache --cache --testcache diff --git a/README.md b/README.md index 81aeb067f..741c84131 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ SR-IOV CNI plugin works with [SR-IOV device plugin](https://github.com/k8snetwor ## Build -This plugin uses Go modules for dependency management and requires Go 1.13+ to build. +This plugin uses Go modules for dependency management and requires Go 1.17+ to build. To build the plugin binary: diff --git a/go.mod b/go.mod index e33b2fb26..93a6087b1 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/k8snetworkplumbingwg/sriov-cni -go 1.13 +go 1.17 require ( github.com/containernetworking/cni v0.8.1 @@ -9,5 +9,15 @@ require ( github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a github.com/stretchr/testify v1.4.0 github.com/vishvananda/netlink v1.0.1-0.20190924205540-07ace697bea4 +) + +require ( + github.com/coreos/go-iptables v0.4.5 // indirect + github.com/davecgh/go-spew v1.1.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8 // indirect + github.com/stretchr/objx v0.1.0 // indirect + github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc // indirect golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect + gopkg.in/yaml.v2 v2.2.2 // indirect )