From 5bdd3bbfcbfbeca9771b1645d31d23413dd56ee5 Mon Sep 17 00:00:00 2001 From: mmetc <92726601+mmetc@users.noreply.github.com> Date: Thu, 24 Nov 2022 11:29:54 +0100 Subject: [PATCH] require at least go 1.18 to build (#1884) --- .github/workflows/go-tests.yml | 8 ++++++-- Makefile | 2 +- pkg/cstest/filenotfound_unix.go | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/go-tests.yml b/.github/workflows/go-tests.yml index 982880f99..9cc64b567 100644 --- a/.github/workflows/go-tests.yml +++ b/.github/workflows/go-tests.yml @@ -31,6 +31,10 @@ env: jobs: build: + strategy: + matrix: + go-version: [1.18, 1.x] + name: "Build + tests" runs-on: ubuntu-latest services: @@ -108,10 +112,10 @@ jobs: steps: - - name: "Set up Go 1.19" + - name: "Set up Go ${{ matrix.go-version }}" uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: ${{ matrix.go-version }} id: go - name: Check out CrowdSec repository diff --git a/Makefile b/Makefile index 3ec6703b7..d38e479a5 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ CSCLI_BIN = cscli$(EXT) BUILD_CMD = build MINIMUM_SUPPORTED_GO_MAJOR_VERSION = 1 -MINIMUM_SUPPORTED_GO_MINOR_VERSION = 17 +MINIMUM_SUPPORTED_GO_MINOR_VERSION = 18 GO_VERSION_VALIDATION_ERR_MSG = Golang version ($(BUILD_GOVERSION)) is not supported, please use at least $(MINIMUM_SUPPORTED_GO_MAJOR_VERSION).$(MINIMUM_SUPPORTED_GO_MINOR_VERSION) LD_OPTS_VARS= \ diff --git a/pkg/cstest/filenotfound_unix.go b/pkg/cstest/filenotfound_unix.go index a5a426dd8..fcf1a4119 100644 --- a/pkg/cstest/filenotfound_unix.go +++ b/pkg/cstest/filenotfound_unix.go @@ -1,4 +1,4 @@ -//go:build unix +//go:build unix || linux || freebsd || netbsd || openbsd || solaris package cstest