forked from drand/drand
-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (81 loc) · 2.58 KB
/
regression.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
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Regression
on:
pull_request:
branches: [ master ]
concurrency:
group: ci-${{ github.ref }}-regression
cancel-in-progress: true
env:
DISABLE_VERSION_CHECK: 1
# TODO Remove after https://github.com/drand/drand/pull/956 is merged, this is to get around the regression test failure
MAJOR: 1
MINOR: 4
PATCH: 0
jobs:
regression:
runs-on: ubuntu-latest
continue-on-error: true
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
db_type: ["boltdb", "memdb", "postgres"]
scheme_id: [ "pedersen-bls-chained", "pedersen-bls-unchained", "bls-unchained-on-g1" ]
steps:
# Deps
- name: Install Go
uses: actions/[email protected]
with:
go-version: '1.19.5'
- name: Dir Setup
run: mkdir -p ~/go/bin
# Master branch
- name: Checkout master branch
uses: actions/[email protected]
with:
ref: 'master'
- name: Check cache for master
uses: actions/[email protected]
id: cache_master
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build Master
run: make build && cp drand ~/go/bin/drand-existing
# Candidate branch
- name: Checkout candidate branch
uses: actions/[email protected]
- name: Check cache for candidate
uses: actions/[email protected]
id: cache_candidate
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build Candidate
run: make build && cp drand ~/go/bin/drand-candidate
# Regression test
- name: Run regression with ${{ matrix.db_type }} database
id: regression
env:
SCHEME_ID: ${{ matrix.scheme_id }}
CI: "true"
run: go run ./demo/regression -db=${{ matrix.db_type }} -release ~/go/bin/drand-existing -candidate ~/go/bin/drand-candidate
# Report
- id: report
if: ${{ failure() }}
name: Save report
run: |
GITHUB_OUTPUT=$(cat report.md)
GITHUB_OUTPUT="${GITHUB_OUTPUT//'%'/'%25'}"
GITHUB_OUTPUT="${GITHUB_OUTPUT//$'\n'/'%0A'}"
GITHUB_OUTPUT="${GITHUB_OUTPUT//$'\r'/'%0D'}"
- name: Record Comment
if: ${{ failure() }}
uses: marocchino/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
message: ${{ steps.report.outputs.result }}