-
Notifications
You must be signed in to change notification settings - Fork 22
70 lines (60 loc) · 1.7 KB
/
main.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
---
name: Main CI
on: # yamllint disable-line rule:truthy
workflow_dispatch:
push:
branches:
- main
pull_request:
jobs:
test:
name: Test IBFT
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
- name: Checkout code
uses: actions/[email protected]
with:
submodules: recursive
- name: Go test
run: go test -test.short -covermode=atomic -shuffle=on -coverprofile coverage.out -timeout 15m ./...
- name: Upload coverage file to Codecov
uses: codecov/codecov-action@v3
with:
files: coverage.out
go_test_race:
name: Test IBFT with Race
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
- name: Checkout Code
uses: actions/[email protected]
with:
submodules: recursive
- name: Run Go Test with race
run: go test -test.short -race -shuffle=on -timeout 15m ./...
reproducible-builds:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
- name: Checkout code
uses: actions/[email protected]
with:
submodules: recursive
- name: Reproducible build test
run: |
make builds-dummy
shasum -a256 ./build/ibft1 | cut -d " " -f 1 > ibft1.sha256
shasum -a256 ./build/ibft2 | cut -d " " -f 1 > ibft2.sha256
if ! cmp ibft1.sha256 ibft2.sha256; then
echo >&2 "Reproducible build broken"; cat ibft1.sha256; cat ibft2.sha256; exit 1
fi