ci: update workflows' go version
This commit is contained in:
parent
16458dd934
commit
fc3aa7f181
4 changed files with 33 additions and 41 deletions
|
@ -1,17 +1,15 @@
|
|||
version: 2.1
|
||||
|
||||
executors:
|
||||
go1_16:
|
||||
docker:
|
||||
- image: cimg/go:1.16
|
||||
environment:
|
||||
GO111MODULE: "on"
|
||||
go1_17:
|
||||
docker:
|
||||
- image: cimg/go:1.17
|
||||
go1_18:
|
||||
docker:
|
||||
- image: cimg/go:1.18
|
||||
go1_19:
|
||||
docker:
|
||||
- image: cimg/go:1.19
|
||||
|
||||
commands:
|
||||
gomod:
|
||||
|
@ -39,18 +37,6 @@ jobs:
|
|||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.44.2
|
||||
make lint
|
||||
|
||||
test_1_16:
|
||||
working_directory: /home/circleci/go/src/github.com/nspcc-dev/neo-go
|
||||
executor: go1_16
|
||||
steps:
|
||||
- checkout
|
||||
- run: git submodule sync
|
||||
- run: git submodule update --init
|
||||
- gomod
|
||||
- run:
|
||||
command: go test -v -race ./...
|
||||
no_output_timeout: 15m
|
||||
|
||||
test_1_17:
|
||||
working_directory: /home/circleci/go/src/github.com/nspcc-dev/neo-go
|
||||
executor: go1_17
|
||||
|
@ -75,9 +61,21 @@ jobs:
|
|||
command: go test -v -race ./...
|
||||
no_output_timeout: 15m
|
||||
|
||||
test_1_19:
|
||||
working_directory: /home/circleci/go/src/github.com/nspcc-dev/neo-go
|
||||
executor: go1_19
|
||||
steps:
|
||||
- checkout
|
||||
- run: git submodule sync
|
||||
- run: git submodule update --init
|
||||
- gomod
|
||||
- run:
|
||||
command: go test -v -race ./...
|
||||
no_output_timeout: 15m
|
||||
|
||||
build_cli:
|
||||
working_directory: /home/circleci/go/src/github.com/nspcc-dev/neo-go
|
||||
executor: go1_18
|
||||
executor: go1_19
|
||||
steps:
|
||||
- checkout
|
||||
- gomod
|
||||
|
@ -88,7 +86,7 @@ jobs:
|
|||
|
||||
build_image:
|
||||
working_directory: /home/circleci/go/src/github.com/nspcc-dev/neo-go
|
||||
executor: go1_18
|
||||
executor: go1_19
|
||||
docker:
|
||||
- image: golang:1-alpine
|
||||
steps:
|
||||
|
@ -116,10 +114,6 @@ workflows:
|
|||
filters:
|
||||
tags:
|
||||
only: v/[0-9]+\.[0-9]+\.[0-9]+/
|
||||
- test_1_16:
|
||||
filters:
|
||||
tags:
|
||||
only: v/[0-9]+\.[0-9]+\.[0-9]+/
|
||||
- test_1_17:
|
||||
filters:
|
||||
tags:
|
||||
|
@ -128,6 +122,10 @@ workflows:
|
|||
filters:
|
||||
tags:
|
||||
only: v/[0-9]+\.[0-9]+\.[0-9]+/
|
||||
- test_1_19:
|
||||
filters:
|
||||
tags:
|
||||
only: v/[0-9]+\.[0-9]+\.[0-9]+/
|
||||
- build_cli:
|
||||
filters:
|
||||
tags:
|
||||
|
|
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
|
@ -31,9 +31,6 @@ on:
|
|||
required: false
|
||||
default: 'false'
|
||||
|
||||
env:
|
||||
GO111MODULE: "on"
|
||||
|
||||
jobs:
|
||||
build_cli:
|
||||
name: Build CLI
|
||||
|
@ -56,7 +53,7 @@ jobs:
|
|||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
go-version: 1.19
|
||||
cache: true
|
||||
|
||||
- name: Update Go modules
|
||||
|
@ -133,7 +130,7 @@ jobs:
|
|||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
go-version: 1.19
|
||||
cache: true
|
||||
|
||||
- name: Login to DockerHub
|
||||
|
|
17
.github/workflows/run_tests.yml
vendored
17
.github/workflows/run_tests.yml
vendored
|
@ -12,9 +12,6 @@ on:
|
|||
- '**/*.md'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
GO111MODULE: "on"
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint
|
||||
|
@ -103,7 +100,7 @@ jobs:
|
|||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
go-version: 1.19
|
||||
cache: true
|
||||
|
||||
- name: Update Go modules
|
||||
|
@ -125,20 +122,20 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-20.04, windows-2022, macos-12]
|
||||
go_versions: [ '1.16', '1.17', '1.18' ]
|
||||
go_versions: [ '1.17', '1.18', '1.19' ]
|
||||
exclude:
|
||||
# Only latest Go version for Windows and MacOS.
|
||||
- os: windows-2022
|
||||
go_versions: '1.16'
|
||||
go_versions: '1.17'
|
||||
- os: windows-2022
|
||||
go_versions: '1.17'
|
||||
- os: macos-12
|
||||
go_versions: '1.16'
|
||||
go_versions: '1.18'
|
||||
- os: macos-12
|
||||
go_versions: '1.17'
|
||||
- os: macos-12
|
||||
go_versions: '1.18'
|
||||
# Exclude latest Go version for Ubuntu as Coverage uses it.
|
||||
- os: ubuntu-20.04
|
||||
go_versions: '1.18'
|
||||
go_versions: '1.19'
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
|
|
@ -43,14 +43,14 @@ RUN $newPath = ('{0}\bin;C:\Program Files\Go\bin;{1}' -f $env:GOPATH, $env:PATH)
|
|||
[Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine);
|
||||
|
||||
# Keep go version in sync with Build GA job.
|
||||
ENV GOLANG_VERSION=1.18
|
||||
ENV GOLANG_VERSION=1.19
|
||||
|
||||
RUN $url = 'https://dl.google.com/go/go1.18.windows-amd64.zip'; \
|
||||
RUN $url = 'https://go.dev/dl/go1.19.windows-amd64.zip'; \
|
||||
Write-Host ('Downloading {0} ...' -f $url); \
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
||||
Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \
|
||||
\
|
||||
$sha256 = '65c5c0c709a7ca1b357091b10b795b439d8b50e579d3893edab4c7e9b384f435'; \
|
||||
$sha256 = 'bcaaf966f91980d35ae93c37a8fe890e4ddfca19448c0d9f66c027d287e2823a'; \
|
||||
Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \
|
||||
if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $sha256) { \
|
||||
Write-Host 'FAILED!'; \
|
||||
|
|
Loading…
Reference in a new issue