fix revert unsupported precompileds #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: VM | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
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: | |
vm-api: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
cache: 'npm' | |
- run: npm i | |
working-directory: ${{github.workspace}} | |
- run: npm run lint | |
- run: npm run coverage | |
- run: npm run test:API:browser | |
- uses: codecov/codecov-action@v2 | |
with: | |
files: ${{ env.cwd }}/coverage/lcov.info | |
flags: vm | |
vm-state: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
fork: ['London', 'Berlin', 'Istanbul', 'MuirGlacier'] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
cache: 'npm' | |
- run: npm i | |
working-directory: ${{github.workspace}} | |
- run: npm run test:state -- --fork=${{ matrix.fork }} --verify-test-amount-alltests | |
vm-state-extended: | |
if: contains(join(github.event.pull_request.labels.*.name, ' '), 'Test all hardforks') | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
fork: | |
[ | |
'London', | |
'Berlin', | |
'MuirGlacier', | |
'Istanbul', | |
'Petersburg', | |
'Constantinople', | |
'Byzantium', | |
'SpuriousDragon', | |
'TangerineWhistle', | |
'Homestead', | |
'Chainstart', | |
] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
cache: 'npm' | |
- run: npm i | |
working-directory: ${{github.workspace}} | |
- run: npm run test:state -- --fork=${{ matrix.fork }} --verify-test-amount-alltests | |
vm-blockchain: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# Args to pass to the tester. Note that some have split the slow tests and only | |
# run on forks where applicable (see PR #489 for numbers on these) | |
# Tests were split with --dir and --excludeDir to balance execution times below the 9min mark. | |
args: | |
[ | |
'--fork=Istanbul --dir=GeneralStateTests/stTimeConsuming --expected-test-amount=15561', | |
'--fork=Istanbul --excludeDir=stTimeConsuming --expected-test-amount=19817', | |
'--fork=Berlin --dir=GeneralStateTests/stTimeConsuming', | |
'--fork=Berlin --excludeDir=stTimeConsuming', | |
'--fork=London --dir=GeneralStateTests/stTimeConsuming', | |
'--fork=London --excludeDir=stTimeConsuming', | |
] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
cache: 'npm' | |
- run: npm i | |
working-directory: ${{github.workspace}} | |
- run: npm run test:blockchain -- ${{ matrix.args }} | |
vm-blockchain-extended: | |
if: contains(join(github.event.pull_request.labels.*.name, ' '), 'Test all hardforks') | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# Args to pass to the tester. Note that some have split the slow tests and only | |
# run on forks where applicable (see PR #489 for numbers on these) | |
# Tests were split with --dir and --excludeDir to balance execution times below the 9min mark. | |
args: | |
[ | |
'--fork=Berlin --expected-test-amount=33', | |
'--fork=Constantinople --dir=GeneralStateTests/stTimeConsuming --expected-test-amount=15561', | |
'--fork=Constantinople --excludeDir=stTimeConsuming --expected-test-amount=16836', | |
'--fork=Petersburg --dir=GeneralStateTests/stTimeConsuming --expected-test-amount=15561', | |
'--fork=Petersburg --excludeDir=stTimeConsuming --expected-test-amount=16821', | |
'--fork=Homestead --expected-test-amount=6623', | |
'--fork=Chainstart --expected-test-amount=4044', | |
] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
cache: 'npm' | |
- run: npm i | |
working-directory: ${{github.workspace}} | |
- run: npm run test:blockchain -- ${{ matrix.args }} | |
vm-benchmarks: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
cache: 'npm' | |
- run: npm i | |
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 | |
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: 'false' | |
# 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…" |