-
Notifications
You must be signed in to change notification settings - Fork 25
134 lines (105 loc) · 3.8 KB
/
build.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: Build Test Results Dashboard
on:
workflow_dispatch:
inputs:
runall_params:
description: 'Custom runall params'
required: false
type: string
dump_logs:
description: 'dump logs'
required: false
type: boolean
verbose:
description: 'verbose script logging'
type: choice
required: false
options:
-
- true
skip_test:
description: 'skip test - check github update'
required: false
type: boolean
ignore_cache:
description: 'ignore cache'
required: false
type: boolean
skip_push_results:
description: 'skip push results'
required: false
type: boolean
# push:
# branches:
# - '*'
pull_request:
types: [opened, reopened, synchronize]
# Allows external webhook trigger
repository_dispatch:
types:
- webhook
env:
FORCE_COLORS: 1
jobs:
runall:
runs-on: ubuntu-latest
steps:
- run: curl -sSL https://raw.githubusercontent.com/pdm-project/pdm/main/install-pdm.py | python3 -
- run: pip install jq yq
- run: which xq
- uses: actions/checkout@v4
with:
show-progress: false
# - uses: actions/checkout@v3
# with:
# repository: eth-infinitism/bundler-spec-tests
# path: bundler-spec-tests
# submodules: true
- run: test -d bundler-spec-tests || git clone -b releases/v0.6 --recurse-submodules https://github.com/eth-infinitism/bundler-spec-tests
name: clone bundler-spec-tests
- run: cd bundler-spec-tests && (git describe --tags; git submodule ) | tee .git.status
name: check bundler-spec-tests and submodules status
# restore cache of bundler-spec-tests, and its submodules
- uses: actions/cache@v4
if: ${{ ! inputs.ignore_cache }}
with:
path: bundler-spec-tests
key: ${{ runner.os }}-${{ hashFiles('bundler-spec-tests/pdm.lock', 'bundler-spec-tests/@account-abstraction/contracts/**/*.sol') }}
- run: cd bundler-spec-tests; git checkout
name: "re-checkout bundler-spec-tests (on top of cache)"
#for faster "update-deps" for spec
- run: yarn --cwd bundler-spec-tests/spec remove gatsby || echo "already removed"
- run: "cd bundler-spec-tests && pdm install && pdm update-deps"
name: update submodules of bundler-spec-tests
- run: VERBOSE=${{ inputs.verbose }} ./runall.sh ${{ inputs.runall_params }}
if: ${{ ! inputs.skip_test }}
name: Run all tests ${{ inputs.runall_params }}
- name: "Test summary"
run: "grep -r '===.* in ' `find build -path '*build/out*txt'`| sed -e 's/===*//g' "
- name: Push build output to artifacts
uses: actions/upload-artifact@v4
with:
name: build
path: ./build
retention-days: 30
- name: dump logs
if: ${{ inputs.dump_logs }}
run: for d in build/*/*.log; do echo === $d:; cat $d | perl -pe 's/(?:runbundler-)?(\S+?)(?:-1)?[\s|]+(\S+)/$2 $1 /' | sort ; done
- name: Clone and update results repo
if: ${{ ! inputs.skip_push_results }}
run: ./update-results.sh out-results
- name: Push update to results repo
if: ${{ ! inputs.skip_push_results }}
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: 'out-results'
destination-github-username: 'eth-infinitism'
destination-repository-name: 'bundler-test-results'
user-email: dror.tirosh@gmail.com
target-branch: ${{ github.ref_name }}
# Allow one concurrent deployment
concurrency:
group: "deploy"
cancel-in-progress: true