erigon-pulse/.github/workflows/ci.yml

62 lines
1.6 KiB
YAML
Raw Normal View History

2021-06-30 12:18:22 +00:00
name: Continuous integration
on:
push:
branches:
- main
2021-12-01 13:30:16 +00:00
- stable
2022-04-22 11:56:54 +00:00
- alpha
2021-06-30 12:18:22 +00:00
pull_request:
branches:
- main
2021-12-01 13:30:16 +00:00
- stable
2022-04-22 11:56:54 +00:00
- alpha
env:
CGO_ENABLED: "1"
2022-11-20 03:41:20 +00:00
CGO_CXXFLAGS: "-g -O2 -std=c++17"
GO111MODULE: "on"
2021-06-30 12:18:22 +00:00
jobs:
tests:
strategy:
matrix:
2022-05-04 04:11:34 +00:00
os: [ ubuntu-20.04, macos-11, windows-2022 ] # list of os: https://github.com/actions/virtual-environments
2021-06-30 12:18:22 +00:00
runs-on: ${{ matrix.os }}
steps:
- name: configure Pagefile
if: matrix.os == 'windows-2022'
2022-11-20 03:41:20 +00:00
uses: al-cheb/configure-pagefile-action@v1.3
with:
minimum-size: 8GB
2022-03-18 04:27:44 +00:00
- uses: actions/checkout@v3
2022-05-24 18:00:09 +00:00
with:
submodules: recursive
fetch-depth: 0 # fetch git tags for "git describe"
2022-03-18 04:27:44 +00:00
- uses: actions/setup-go@v3
2021-06-30 12:18:22 +00:00
with:
go-version: 1.18.x
2022-04-11 01:54:34 +00:00
- uses: actions/cache@v3
2021-06-30 12:18:22 +00:00
with:
path: ~/go/pkg/mod
key: ${{ matrix.os }}-go-${{ hashFiles('**/go.sum') }}
2022-05-04 04:11:34 +00:00
- name: Install deps
if: matrix.os == 'ubuntu-20.04'
run: sudo apt update && sudo apt install build-essential
shell: bash
- name: Install deps
if: matrix.os == 'windows-2022'
2022-10-19 02:31:10 +00:00
run: |
choco upgrade mingw -y --no-progress --version 11.2.0.07112021
choco install cmake -y --no-progress --version 3.23.1
2022-05-04 04:11:34 +00:00
2021-06-30 12:18:22 +00:00
- name: Lint
if: matrix.os == 'ubuntu-20.04'
2022-03-11 01:49:54 +00:00
uses: golangci/golangci-lint-action@v3
2021-06-30 12:18:22 +00:00
with:
version: v1.50
args: --config=.golangci.yml --out-${NO_FUTURE}format colored-line-number
2022-05-24 18:00:09 +00:00
2022-05-04 04:11:34 +00:00
- name: Test win
if: matrix.os == 'windows-2022'
2022-11-20 03:41:20 +00:00
run: make test-no-fuzz