2021-03-29 23:17:19 +00:00
|
|
|
name: Continuous integration
|
2021-05-07 21:43:04 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2021-06-05 10:05:02 +00:00
|
|
|
- devel
|
2021-05-07 21:43:04 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
2021-06-05 10:05:02 +00:00
|
|
|
- devel
|
2021-03-29 23:17:19 +00:00
|
|
|
jobs:
|
2021-03-30 16:16:07 +00:00
|
|
|
tests:
|
2021-03-29 23:17:19 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-06-01 09:00:10 +00:00
|
|
|
os: [ ubuntu-16.04, ubuntu-20.04, macos-10.15 ] # list of os: https://github.com/actions/virtual-environments
|
2021-03-29 23:17:19 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: 1.16.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') }}
|
2021-05-20 16:46:12 +00:00
|
|
|
- run: make all
|
2021-06-01 09:00:10 +00:00
|
|
|
- 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
|
2021-03-29 23:17:19 +00:00
|
|
|
- name: Lint
|
2021-05-17 02:42:24 +00:00
|
|
|
if: matrix.os == 'ubuntu-20.04'
|
2021-03-29 23:17:19 +00:00
|
|
|
uses: golangci/golangci-lint-action@v2
|
|
|
|
with:
|
2021-06-02 07:03:50 +00:00
|
|
|
version: v1.40
|
2021-03-29 23:17:19 +00:00
|
|
|
skip-go-installation: true
|
|
|
|
skip-pkg-cache: true
|
|
|
|
skip-build-cache: true
|
2021-05-20 16:46:12 +00:00
|
|
|
- run: make test
|
|
|
|
|
|
|
|
win:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-06-01 09:00:10 +00:00
|
|
|
os: [ windows-2019 ]
|
2021-05-20 16:46:12 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: 1.16.x
|
|
|
|
- run: choco upgrade mingw cmake -y --no-progress
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
cd ethdb/mdbx/dist
|
|
|
|
cmake -G "MinGW Makefiles" . -D MDBX_BUILD_SHARED_LIBRARY:BOOL=ON -D MDBX_WITHOUT_MSVC_CRT:BOOOL=OFF -D CMAKE_C_FLAGS:STRING="-Wno-unused-variable -Wno-unused-parameter -Wno-unused-function" -D CMAKE_CXX_FLAGS:STRING="-Wno-unused-variable -Wno-unused-parameter -Wno-unused-function"
|
|
|
|
cmake --build .
|
|
|
|
cp libmdbx.dll (Join-Path $env:SystemRoot system32)
|
2021-06-17 08:08:19 +00:00
|
|
|
go mod download
|
|
|
|
go mod vendor
|
2021-05-20 16:46:12 +00:00
|
|
|
|
2021-03-30 16:16:07 +00:00
|
|
|
docker:
|
2021-05-03 09:59:35 +00:00
|
|
|
runs-on: ubuntu-18.04
|
2021-03-30 16:16:07 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
2021-05-17 02:42:24 +00:00
|
|
|
- run: docker build .
|