瀏覽代碼

require at least go 1.18 to build (#1884)

mmetc 2 年之前
父節點
當前提交
5bdd3bbfcb
共有 3 個文件被更改,包括 8 次插入4 次删除
  1. 6 2
      .github/workflows/go-tests.yml
  2. 1 1
      Makefile
  3. 1 1
      pkg/cstest/filenotfound_unix.go

+ 6 - 2
.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

+ 1 - 1
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= \

+ 1 - 1
pkg/cstest/filenotfound_unix.go

@@ -1,4 +1,4 @@
-//go:build unix
+//go:build unix || linux || freebsd || netbsd || openbsd || solaris
 
 package cstest