generated from Dargon789/ethereumjs-monorepo
-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (95 loc) · 3.14 KB
/
vm-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
name: VM
on:
push:
branches: [master, develop]
tags: ['*']
env:
cwd: ${{github.workspace}}/packages/vm
defaults:
run:
working-directory: packages/vm
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test-vm-api:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
- run: npm ci
working-directory: ${{github.workspace}}
- run: npm run lint
- run: npm run coverage
# - run: npm run test:API:browser
- uses: codecov/codecov-action@v3
with:
files: ${{ env.cwd }}/coverage/lcov.info
flags: vm
test-vm-state:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
- run: npm ci
working-directory: ${{github.workspace}}
- run: npm run test:state:selectedForks
test-vm-blockchain:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
- run: npm ci
working-directory: ${{github.workspace}}
- run: npm run test:blockchain
vm-benchmarks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
- run: npm ci
working-directory: ${{github.workspace}}
- run: npm run build:benchmarks
working-directory: ${{ env.cwd }}
- run: npm run benchmarks -- mainnetBlocks:10 | tee output.txt
working-directory: ${{ env.cwd }}
# Run git stash in case github-action-benchmark has trouble switching to gh-pages branch due to differing package-locks
- run: git stash
- name: Compare benchmarks
uses: rhysd/github-action-benchmark@v1
if: github.ref == 'refs/heads/master'
with:
tool: 'benchmarkjs'
# Where the output from the benchmark tool is stored
output-file-path: ${{ env.cwd }}/output.txt
# Location of data in gh-pages branch
benchmark-data-dir-path: dev/bench/vm
# Enable alert commit comment (default alert threshold: 200%)
comment-on-alert: true
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Push and deploy to GitHub pages branch automatically (if on master)
auto-push: 'true'
# Only keep and display the last 30 commits worth of benchmark data
max-items-in-chart: 30
# Re-apply git stash to prepare for saving back to cache.
# Avoids exit code 1 by checking if there are changes to be stashed first
- run: STASH_LIST=`git stash list` && [ ! -z $STASH_LIST ] && git stash apply || echo "No files to stash-apply. Skipping…"