Skip to content

Commit 5551f4d

Browse files
committed
Add CLI version of bytecode compare to existing CI jobs
1 parent ab339d4 commit 5551f4d

File tree

1 file changed

+36
-12
lines changed

1 file changed

+36
-12
lines changed

.circleci/config.yml

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -902,13 +902,19 @@ jobs:
902902
- checkout
903903
- attach_workspace:
904904
at: build
905-
- run: scripts/bytecodecompare/storebytecode.sh && cp -v report.txt bytecode-report-ubuntu.txt
905+
- run: mkdir test-cases/
906+
- run: cd test-cases && ../scripts/isolate_tests.py ../test/
907+
- run: cd test-cases && ../scripts/bytecodecompare/prepare_report.py ../build/solc/solc --interface standard-json && mv -v report.txt ../bytecode-report-ubuntu-json.txt
908+
- run: cd test-cases && ../scripts/bytecodecompare/prepare_report.py ../build/solc/solc --interface cli && mv -v report.txt ../bytecode-report-ubuntu-cli.txt
906909
- store_artifacts:
907-
path: report.txt
910+
path: report-json.txt
911+
- store_artifacts:
912+
path: report-cli.txt
908913
- persist_to_workspace:
909914
root: .
910915
paths:
911-
- bytecode-report-ubuntu.txt
916+
- bytecode-report-ubuntu-json.txt
917+
- bytecode-report-ubuntu-cli.txt
912918

913919
b_bytecode_osx:
914920
macos:
@@ -919,13 +925,19 @@ jobs:
919925
- checkout
920926
- attach_workspace:
921927
at: .
922-
- run: scripts/bytecodecompare/storebytecode.sh && cp -v report.txt bytecode-report-osx.txt
928+
- run: mkdir test-cases/
929+
- run: cd test-cases && ../scripts/isolate_tests.py ../test/
930+
- run: cd test-cases && ../scripts/bytecodecompare/prepare_report.py ../build/solc/solc --interface standard-json && mv -v report.txt ../bytecode-report-osx-json.txt
931+
- run: cd test-cases && ../scripts/bytecodecompare/prepare_report.py ../build/solc/solc --interface cli && mv -v report.txt ../bytecode-report-osx-cli.txt
923932
- store_artifacts:
924-
path: report.txt
933+
path: report-json.txt
934+
- store_artifacts:
935+
path: report-cli.txt
925936
- persist_to_workspace:
926937
root: .
927938
paths:
928-
- bytecode-report-osx.txt
939+
- bytecode-report-osx-json.txt
940+
- bytecode-report-osx-cli.txt
929941

930942
b_bytecode_win:
931943
executor:
@@ -935,15 +947,19 @@ jobs:
935947
- checkout
936948
- attach_workspace:
937949
at: build
938-
- run: python scripts\isolate_tests.py test\
939-
- run: python scripts\bytecodecompare\prepare_report.py build\solc\Release\solc.exe
940-
- run: cp report.txt bytecode-report-windows.txt
950+
- run: mkdir test-cases\
951+
- run: cd test-cases\ && python ..\scripts\isolate_tests.py ..\test\
952+
- 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
953+
- 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
941954
- store_artifacts:
942-
path: report.txt
955+
path: report-json.txt
956+
- store_artifacts:
957+
path: report-cli.txt
943958
- persist_to_workspace:
944959
root: .
945960
paths:
946-
- bytecode-report-windows.txt
961+
- bytecode-report-windows-json.txt
962+
- bytecode-report-windows-cli.txt
947963

948964
b_bytecode_ems:
949965
docker:
@@ -968,7 +984,15 @@ jobs:
968984
steps:
969985
- attach_workspace:
970986
at: .
971-
- run: diff --report-identical-files --from-file bytecode-report-emscripten.txt bytecode-report-ubuntu.txt bytecode-report-osx.txt bytecode-report-windows.txt
987+
- run: |
988+
diff --report-identical-files --from-file \
989+
bytecode-report-emscripten.txt \
990+
bytecode-report-ubuntu-json.txt \
991+
bytecode-report-ubuntu-cli.txt \
992+
bytecode-report-osx-json.txt \
993+
bytecode-report-osx-cli.txt \
994+
bytecode-report-windows-json.txt \
995+
bytecode-report-windows-cli.txt
972996
973997
workflows:
974998
version: 2

0 commit comments

Comments
 (0)