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