-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (73 loc) · 2.01 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Continuous integration
on:
push:
branches:
- devel
- stable
pull_request:
branches:
- devel
- stable
jobs:
tests:
strategy:
matrix:
os: [ ubuntu-20.04, macos-11 ] # list of os: https://github.com/actions/virtual-environments
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- run: git submodule update --init --recursive --force
- uses: actions/setup-go@v2
with:
go-version: 1.17.x
- name: Install dependencies
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt update && sudo apt install build-essential
fi
shell: bash
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ matrix.os }}-go-${{ hashFiles('**/go.sum') }}
- run: make all
- name: Reproducible build test
run: |
shasum -a256 ./build/bin/erigon > erigon1.sha256
make erigon
shasum -a256 ./build/bin/erigon > erigon2.sha256
if ! cmp -s erigon1.sha256 erigon2.sha256; then
echo >&2 "Reproducible build broken"; exit 1
fi
- name: Lint
if: matrix.os == 'ubuntu-20.04'
uses: golangci/golangci-lint-action@v2
with:
version: v1.42
skip-go-installation: true
skip-pkg-cache: true
skip-build-cache: true
- run: make test
win:
strategy:
matrix:
os: [ windows-2019 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- run: git submodule update --init --recursive --force
- uses: actions/setup-go@v2
with:
go-version: 1.17.x
- run: choco upgrade mingw cmake -y --no-progress
- name: Build
run: |
.\wmake.ps1
make test
shell: powershell
docker:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- run: git submodule update --init --recursive --force
- run: docker build .