Add CLI version of bytecode compare to existing CI jobs

This commit is contained in:
Kamil Śliwak 2020-12-22 10:08:04 +01:00
parent 7f19339934
commit f7007ea324

View File

@ -925,13 +925,19 @@ jobs:
- checkout - checkout
- attach_workspace: - attach_workspace:
at: build at: build
- run: scripts/bytecodecompare/storebytecode.sh && cp -v report.txt bytecode-report-ubuntu.txt - run: mkdir test-cases/
- run: cd test-cases && ../scripts/isolate_tests.py ../test/
- run: cd test-cases && ../scripts/bytecodecompare/prepare_report.py ../build/solc/solc --interface standard-json && mv -v report.txt ../bytecode-report-ubuntu-json.txt
- run: cd test-cases && ../scripts/bytecodecompare/prepare_report.py ../build/solc/solc --interface cli && mv -v report.txt ../bytecode-report-ubuntu-cli.txt
- store_artifacts: - store_artifacts:
path: report.txt path: bytecode-report-ubuntu-json.txt
- store_artifacts:
path: bytecode-report-ubuntu-cli.txt
- persist_to_workspace: - persist_to_workspace:
root: . root: .
paths: paths:
- bytecode-report-ubuntu.txt - bytecode-report-ubuntu-json.txt
- bytecode-report-ubuntu-cli.txt
b_bytecode_osx: b_bytecode_osx:
macos: macos:
@ -942,13 +948,19 @@ jobs:
- checkout - checkout
- attach_workspace: - attach_workspace:
at: . at: .
- run: scripts/bytecodecompare/storebytecode.sh && cp -v report.txt bytecode-report-osx.txt - run: mkdir test-cases/
- run: cd test-cases && ../scripts/isolate_tests.py ../test/
- run: cd test-cases && ../scripts/bytecodecompare/prepare_report.py ../build/solc/solc --interface standard-json && mv -v report.txt ../bytecode-report-osx-json.txt
- run: cd test-cases && ../scripts/bytecodecompare/prepare_report.py ../build/solc/solc --interface cli && mv -v report.txt ../bytecode-report-osx-cli.txt
- store_artifacts: - store_artifacts:
path: report.txt path: bytecode-report-osx-json.txt
- store_artifacts:
path: bytecode-report-osx-cli.txt
- persist_to_workspace: - persist_to_workspace:
root: . root: .
paths: paths:
- bytecode-report-osx.txt - bytecode-report-osx-json.txt
- bytecode-report-osx-cli.txt
b_bytecode_win: b_bytecode_win:
executor: executor:
@ -961,15 +973,19 @@ jobs:
- checkout - checkout
- attach_workspace: - attach_workspace:
at: build at: build
- run: python scripts\isolate_tests.py test\ - run: mkdir test-cases\
- run: python scripts\bytecodecompare\prepare_report.py build\solc\Release\solc.exe - run: cd test-cases\ && python ..\scripts\isolate_tests.py ..\test\
- run: cp report.txt bytecode-report-windows.txt - run: cd test-cases\ && python ..\scripts\bytecodecompare\prepare_report.py ..\build\solc\Release\solc.exe --interface standard-json && move report.txt ..\bytecode-report-windows-json.txt
- run: cd test-cases\ && python ..\scripts\bytecodecompare\prepare_report.py ..\build\solc\Release\solc.exe --interface cli && move report.txt ..\bytecode-report-windows-cli.txt
- store_artifacts: - store_artifacts:
path: report.txt path: bytecode-report-windows-json.txt
- store_artifacts:
path: bytecode-report-windows-cli.txt
- persist_to_workspace: - persist_to_workspace:
root: . root: .
paths: paths:
- bytecode-report-windows.txt - bytecode-report-windows-json.txt
- bytecode-report-windows-cli.txt
b_bytecode_ems: b_bytecode_ems:
docker: docker:
@ -980,9 +996,9 @@ jobs:
- checkout - checkout
- attach_workspace: - attach_workspace:
at: emscripten_build/libsolc at: emscripten_build/libsolc
- run: scripts/bytecodecompare/storebytecode.sh && cp -v report.txt bytecode-report-emscripten.txt - run: scripts/bytecodecompare/storebytecode.sh && mv -v report.txt bytecode-report-emscripten.txt
- store_artifacts: - store_artifacts:
path: report.txt path: bytecode-report-emscripten.txt
- persist_to_workspace: - persist_to_workspace:
root: . root: .
paths: paths:
@ -994,7 +1010,15 @@ jobs:
steps: steps:
- attach_workspace: - attach_workspace:
at: . at: .
- run: diff --report-identical-files --from-file bytecode-report-emscripten.txt bytecode-report-ubuntu.txt bytecode-report-osx.txt bytecode-report-windows.txt - run: |
diff --report-identical-files --from-file \
bytecode-report-emscripten.txt \
bytecode-report-ubuntu-json.txt \
bytecode-report-ubuntu-cli.txt \
bytecode-report-osx-json.txt \
bytecode-report-osx-cli.txt \
bytecode-report-windows-json.txt \
bytecode-report-windows-cli.txt
workflows: workflows:
version: 2 version: 2