From e8c4d0e324fc86b60da3d27918b8a0de6f8d91fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Thu, 15 Jun 2023 12:43:37 +0200 Subject: [PATCH 1/2] More consistent file naming for bytecode compare artifacts - This will make it easier to have a single variable specifying the interface. --- .circleci/config.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 65222f082749..f0af5e7a9d15 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -81,17 +81,16 @@ commands: steps: - run: mkdir test-cases/ - run: cd test-cases && python3 ../scripts/isolate_tests.py ../test/ - - run: cd test-cases && python3 ../scripts/bytecodecompare/prepare_report.py << parameters.binary_path >> --interface standard-json --report-file "../bytecode-report-<< parameters.label >>-json.txt" + - run: cd test-cases && python3 ../scripts/bytecodecompare/prepare_report.py << parameters.binary_path >> --interface standard-json --report-file "../bytecode-report-<< parameters.label >>-standard-json.txt" - run: cd test-cases && python3 ../scripts/bytecodecompare/prepare_report.py << parameters.binary_path >> --interface cli --report-file "../bytecode-report-<< parameters.label >>-cli.txt" - store_artifacts: - path: bytecode-report-<< parameters.label >>-json.txt + path: bytecode-report-<< parameters.label >>-standard-json.txt - store_artifacts: path: bytecode-report-<< parameters.label >>-cli.txt - persist_to_workspace: root: . paths: - - bytecode-report-<< parameters.label >>-json.txt - - bytecode-report-<< parameters.label >>-cli.txt + - bytecode-report-<< parameters.label >>-*.txt - matrix_notify_failure_unless_pr install_python3: @@ -1553,13 +1552,13 @@ jobs: environment: REPORT_FILES: | bytecode-report-emscripten.txt - bytecode-report-ubuntu2004-static-json.txt + bytecode-report-ubuntu2004-static-standard-json.txt bytecode-report-ubuntu2004-static-cli.txt - bytecode-report-ubuntu-json.txt + bytecode-report-ubuntu-standard-json.txt bytecode-report-ubuntu-cli.txt - bytecode-report-osx-json.txt + bytecode-report-osx-standard-json.txt bytecode-report-osx-cli.txt - bytecode-report-windows-json.txt + bytecode-report-windows-standard-json.txt bytecode-report-windows-cli.txt steps: - attach_workspace: From 3b80aa2ea401ba70f50d9f6be23c74bd280a2191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Thu, 15 Jun 2023 14:06:32 +0200 Subject: [PATCH 2/2] Run Standard JSON and CLI bytecode report generation in parallel --- .circleci/config.yml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f0af5e7a9d15..7e568f9d1365 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -80,9 +80,22 @@ commands: type: string steps: - run: mkdir test-cases/ - - run: cd test-cases && python3 ../scripts/isolate_tests.py ../test/ - - run: cd test-cases && python3 ../scripts/bytecodecompare/prepare_report.py << parameters.binary_path >> --interface standard-json --report-file "../bytecode-report-<< parameters.label >>-standard-json.txt" - - run: cd test-cases && python3 ../scripts/bytecodecompare/prepare_report.py << parameters.binary_path >> --interface cli --report-file "../bytecode-report-<< parameters.label >>-cli.txt" + - run: + name: Prepare input files + command: | + cd test-cases/ + python3 ../scripts/isolate_tests.py ../test/ + - run: + name: Generate bytecode report + command: | + cd test-cases/ + interface=$(echo -e "standard-json\ncli" | circleci tests split) + echo "Selected interface: ${interface}" + + python3 ../scripts/bytecodecompare/prepare_report.py \ + << parameters.binary_path >> \ + --interface "$interface" \ + --report-file "../bytecode-report-<< parameters.label >>-${interface}.txt" - store_artifacts: path: bytecode-report-<< parameters.label >>-standard-json.txt - store_artifacts: @@ -1476,6 +1489,7 @@ jobs: TERM: xterm MAKEFLAGS: -j 2 LC_ALL: C + parallelism: 2 # For prepare_bytecode_report steps: - checkout - attach_workspace: @@ -1490,6 +1504,7 @@ jobs: TERM: xterm MAKEFLAGS: -j 2 LC_ALL: C + parallelism: 2 # For prepare_bytecode_report steps: - checkout - attach_workspace: @@ -1504,6 +1519,7 @@ jobs: TERM: xterm MAKEFLAGS: -j 5 LC_ALL: C + parallelism: 2 # For prepare_bytecode_report steps: - checkout - attach_workspace: @@ -1516,6 +1532,7 @@ jobs: <<: *base_win environment: LC_ALL: C + parallelism: 2 # For prepare_bytecode_report steps: # NOTE: For bytecode generation we need the input files to be byte-for-byte identical on all # platforms so line ending conversions must absolutely be disabled.