Merge pull request #13068 from ethereum/circleci-review-fixes

CI config tweaks after CircleCI review
This commit is contained in:
Kamil Śliwak 2022-11-02 17:30:09 +01:00 committed by GitHub
commit 46a7ebd5b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 85 additions and 77 deletions

View File

@ -347,17 +347,9 @@ defaults:
TERM: xterm TERM: xterm
MAKEFLAGS: -j 10 MAKEFLAGS: -j 10
- base_buildpack_focal_small: &base_buildpack_focal_small - base_cimg_small: &base_cimg_small
docker: docker:
- image: buildpack-deps:focal - image: cimg/base:current
resource_class: small
environment:
TERM: xterm
MAKEFLAGS: -j 2
- base_buildpack_latest_small: &base_buildpack_latest_small
docker:
- image: buildpack-deps:latest
resource_class: small resource_class: small
environment: environment:
TERM: xterm TERM: xterm
@ -389,10 +381,10 @@ defaults:
shell: powershell.exe shell: powershell.exe
size: large size: large
- base_win_cmd: &base_win_cmd - base_win_bash: &base_win_bash
executor: executor:
name: win/default name: win/default
shell: cmd.exe shell: bash.exe
- base_osx: &base_osx - base_osx: &base_osx
macos: macos:
@ -419,7 +411,7 @@ defaults:
- base_python_small: &base_python_small - base_python_small: &base_python_small
docker: docker:
- image: circleci/python:3.6 - image: cimg/python:3.6
resource_class: small resource_class: small
environment: environment:
TERM: xterm TERM: xterm
@ -427,7 +419,7 @@ defaults:
- base_node_small: &base_node_small - base_node_small: &base_node_small
docker: docker:
- image: circleci/node - image: cimg/node:current
resource_class: small resource_class: small
environment: environment:
TERM: xterm TERM: xterm
@ -463,10 +455,10 @@ defaults:
requires: requires:
- b_ubu_clang - b_ubu_clang
- workflow_ubuntu2004_release: &workflow_ubuntu2004_release - workflow_ubuntu2004_force_release: &workflow_ubuntu2004_force_release
<<: *workflow_trigger_on_tags <<: *workflow_trigger_on_tags
requires: requires:
- b_ubu_release - b_ubu_force_release
- workflow_ubuntu2004_static: &workflow_ubuntu2004_static - workflow_ubuntu2004_static: &workflow_ubuntu2004_static
<<: *workflow_trigger_on_tags <<: *workflow_trigger_on_tags
@ -518,11 +510,6 @@ defaults:
requires: requires:
- b_win - b_win
- workflow_win_release: &workflow_win_release
<<: *workflow_trigger_on_tags
requires:
- b_win_release
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
# Parameterized Job Templates # Parameterized Job Templates
@ -533,113 +520,107 @@ defaults:
project: colony project: colony
binary_type: solcjs binary_type: solcjs
compile_only: 1 compile_only: 1
nodejs_version: '14' nodejs_version: '14.20'
python2: true
- job_native_test_ext_gnosis: &job_native_test_ext_gnosis - job_native_test_ext_gnosis: &job_native_test_ext_gnosis
<<: *workflow_ubuntu2004_static <<: *workflow_ubuntu2004_static
name: t_native_test_ext_gnosis name: t_native_test_ext_gnosis
project: gnosis project: gnosis
binary_type: native binary_type: native
# NOTE: Tests crash on nodejs 17: "Error: error:0308010C:digital envelope routines::unsupported" nodejs_version: '16.18'
nodejs_version: '16'
- job_native_test_ext_zeppelin: &job_native_test_ext_zeppelin - job_native_test_ext_zeppelin: &job_native_test_ext_zeppelin
<<: *workflow_ubuntu2004_static <<: *workflow_ubuntu2004_static
name: t_native_test_ext_zeppelin name: t_native_test_ext_zeppelin
project: zeppelin project: zeppelin
binary_type: native binary_type: native
# NOTE: Tests crash on nodejs 17: "Error: error:0308010C:digital envelope routines::unsupported"
nodejs_version: '16'
resource_class: large resource_class: large
- job_native_test_ext_ens: &job_native_test_ext_ens - job_native_test_ext_ens: &job_native_test_ext_ens
<<: *workflow_ubuntu2004_static <<: *workflow_ubuntu2004_static
name: t_native_test_ext_ens name: t_native_test_ext_ens
project: ens project: ens
binary_type: native binary_type: native
nodejs_version: '16' nodejs_version: '18.11'
- job_native_test_ext_trident: &job_native_test_ext_trident - job_native_test_ext_trident: &job_native_test_ext_trident
<<: *workflow_ubuntu2004_static <<: *workflow_ubuntu2004_static
name: t_native_test_ext_trident name: t_native_test_ext_trident
project: trident project: trident
binary_type: native binary_type: native
nodejs_version: '16' nodejs_version: '16.18'
- job_native_test_ext_euler: &job_native_test_ext_euler - job_native_test_ext_euler: &job_native_test_ext_euler
<<: *workflow_ubuntu2004_static <<: *workflow_ubuntu2004_static
name: t_native_test_ext_euler name: t_native_test_ext_euler
project: euler project: euler
binary_type: native binary_type: native
nodejs_version: '16'
resource_class: medium resource_class: medium
- job_native_test_ext_yield_liquidator: &job_native_test_ext_yield_liquidator - job_native_test_ext_yield_liquidator: &job_native_test_ext_yield_liquidator
<<: *workflow_ubuntu2004_static <<: *workflow_ubuntu2004_static
name: t_native_test_ext_yield_liquidator name: t_native_test_ext_yield_liquidator
project: yield-liquidator project: yield-liquidator
binary_type: native binary_type: native
nodejs_version: '16'
- job_native_test_ext_bleeps: &job_native_test_ext_bleeps - job_native_test_ext_bleeps: &job_native_test_ext_bleeps
<<: *workflow_ubuntu2004_static <<: *workflow_ubuntu2004_static
name: t_native_test_ext_bleeps name: t_native_test_ext_bleeps
project: bleeps project: bleeps
binary_type: native binary_type: native
nodejs_version: '16'
resource_class: medium resource_class: medium
- job_native_test_ext_pool_together: &job_native_test_ext_pool_together - job_native_test_ext_pool_together: &job_native_test_ext_pool_together
<<: *workflow_ubuntu2004_static <<: *workflow_ubuntu2004_static
name: t_native_test_ext_pool_together name: t_native_test_ext_pool_together
project: pool-together project: pool-together
binary_type: native binary_type: native
nodejs_version: '16' nodejs_version: '16.18'
- job_native_test_ext_perpetual_pools: &job_native_test_ext_perpetual_pools - job_native_test_ext_perpetual_pools: &job_native_test_ext_perpetual_pools
<<: *workflow_ubuntu2004_static <<: *workflow_ubuntu2004_static
name: t_native_test_ext_perpetual_pools name: t_native_test_ext_perpetual_pools
project: perpetual-pools project: perpetual-pools
binary_type: native binary_type: native
nodejs_version: '16' nodejs_version: '18.11'
- job_native_test_ext_uniswap: &job_native_test_ext_uniswap - job_native_test_ext_uniswap: &job_native_test_ext_uniswap
<<: *workflow_ubuntu2004_static <<: *workflow_ubuntu2004_static
name: t_native_test_ext_uniswap name: t_native_test_ext_uniswap
project: uniswap project: uniswap
binary_type: native binary_type: native
nodejs_version: '16' nodejs_version: '16.18'
- job_native_test_ext_prb_math: &job_native_test_ext_prb_math - job_native_test_ext_prb_math: &job_native_test_ext_prb_math
<<: *workflow_ubuntu2004_static <<: *workflow_ubuntu2004_static
name: t_native_test_ext_prb_math name: t_native_test_ext_prb_math
project: prb-math project: prb-math
binary_type: native binary_type: native
nodejs_version: '16' nodejs_version: '18.11'
- job_native_test_ext_elementfi: &job_native_test_ext_elementfi - job_native_test_ext_elementfi: &job_native_test_ext_elementfi
<<: *workflow_ubuntu2004_static <<: *workflow_ubuntu2004_static
name: t_native_test_ext_elementfi name: t_native_test_ext_elementfi
project: elementfi project: elementfi
binary_type: native binary_type: native
nodejs_version: '16'
resource_class: medium resource_class: medium
- job_native_test_ext_brink: &job_native_test_ext_brink - job_native_test_ext_brink: &job_native_test_ext_brink
<<: *workflow_ubuntu2004_static <<: *workflow_ubuntu2004_static
name: t_native_test_ext_brink name: t_native_test_ext_brink
project: brink project: brink
binary_type: native binary_type: native
nodejs_version: '16' nodejs_version: '18.11'
- job_native_test_ext_chainlink: &job_native_test_ext_chainlink - job_native_test_ext_chainlink: &job_native_test_ext_chainlink
<<: *workflow_ubuntu2004_static <<: *workflow_ubuntu2004_static
name: t_native_test_ext_chainlink name: t_native_test_ext_chainlink
project: chainlink project: chainlink
binary_type: native binary_type: native
nodejs_version: '16' nodejs_version: '16.18'
resource_class: large # Tests run out of memory on a smaller machine resource_class: large # Tests run out of memory on a smaller machine
- job_native_test_ext_gp2: &job_native_test_ext_gp2 - job_native_test_ext_gp2: &job_native_test_ext_gp2
<<: *workflow_ubuntu2004_static <<: *workflow_ubuntu2004_static
name: t_native_test_ext_gp2 name: t_native_test_ext_gp2
project: gp2 project: gp2
binary_type: native binary_type: native
# NOTE: Tests crash on nodejs 17: "Error: error:0308010C:digital envelope routines::unsupported" nodejs_version: '18.11'
nodejs_version: '16'
- job_ems_test_ext_colony: &job_ems_test_ext_colony - job_ems_test_ext_colony: &job_ems_test_ext_colony
<<: *workflow_emscripten <<: *workflow_emscripten
name: t_ems_test_ext_colony name: t_ems_test_ext_colony
project: colony project: colony
binary_type: solcjs binary_type: solcjs
nodejs_version: '14' nodejs_version: '14.20'
resource_class: medium resource_class: medium
python2: true
- job_b_ubu_asan_clang: &job_b_ubu_asan_clang - job_b_ubu_asan_clang: &job_b_ubu_asan_clang
<<: *workflow_trigger_on_tags <<: *workflow_trigger_on_tags
@ -683,12 +664,14 @@ jobs:
- gitter_notify_failure_unless_pr - gitter_notify_failure_unless_pr
chk_coding_style: chk_coding_style:
<<: *base_buildpack_focal_small <<: *base_cimg_small
steps: steps:
- checkout - checkout
- run: - run:
name: Install shellcheck name: Install shellcheck
command: apt -q update && apt install -y shellcheck command: |
sudo apt -q update
sudo apt install -y shellcheck
- run: - run:
name: Check for C++ coding style name: Check for C++ coding style
command: ./scripts/check_style.sh command: ./scripts/check_style.sh
@ -710,12 +693,14 @@ jobs:
- gitter_notify_failure_unless_pr - gitter_notify_failure_unless_pr
chk_pylint: chk_pylint:
<<: *base_buildpack_focal_small <<: *base_cimg_small
steps: steps:
- checkout - checkout
- run: - run:
name: Install pip name: Install pip
command: apt -q update && apt install -y python3-pip command: |
sudo apt -q update
sudo apt install -y python3-pip
- run: - run:
name: Install pylint and dependencies of the scripts that will be linted name: Install pylint and dependencies of the scripts that will be linted
command: python3 -m pip install command: python3 -m pip install
@ -734,12 +719,14 @@ jobs:
- gitter_notify_failure_unless_pr - gitter_notify_failure_unless_pr
chk_antlr_grammar: chk_antlr_grammar:
<<: *base_buildpack_focal_small <<: *base_cimg_small
steps: steps:
- checkout - checkout
- run: - run:
name: Install Java name: Install Java
command: apt -q update && apt install -y openjdk-16-jdk command: |
sudo apt -q update
sudo apt install -y openjdk-17-jdk
- run: - run:
name: Run tests name: Run tests
command: ./scripts/test_antlr_grammar.sh command: ./scripts/test_antlr_grammar.sh
@ -761,14 +748,14 @@ jobs:
- gitter_notify_failure_unless_pr - gitter_notify_failure_unless_pr
chk_proofs: chk_proofs:
<<: *base_buildpack_latest_small <<: *base_cimg_small
steps: steps:
- checkout - checkout
- run: - run:
name: Z3 python deps name: Z3 python deps
command: | command: |
apt-get -qq update sudo apt-get -qq update
apt-get -qy install python3-pip sudo apt-get -qy install python3-pip
pip3 install --user z3-solver pip3 install --user z3-solver
- run: *run_proofs - run: *run_proofs
- gitter_notify_failure_unless_pr - gitter_notify_failure_unless_pr
@ -838,7 +825,7 @@ jobs:
CMAKE_OPTIONS: << parameters.cmake_options >> CMAKE_OPTIONS: << parameters.cmake_options >>
<<: *steps_build <<: *steps_build
b_ubu_release: &b_ubu_release b_ubu_force_release: &b_ubu_force_release
<<: *b_ubu <<: *b_ubu
environment: environment:
FORCE_RELEASE: ON FORCE_RELEASE: ON
@ -1084,16 +1071,16 @@ jobs:
SOLTEST_FLAGS: --no-smt SOLTEST_FLAGS: --no-smt
<<: *steps_soltest <<: *steps_soltest
t_ubu_release_soltest_all: &t_ubu_release_soltest_all t_ubu_force_release_soltest_all: &t_ubu_force_release_soltest_all
# NOTE: This definition is identical to t_ubu_soltest_all but in the workflow we make it depend on # NOTE: This definition is identical to t_ubu_soltest_all but in the workflow we make it depend on
# a different job (b_ubu_release) so the workspace it attaches contains a different executable. # a different job (b_ubu_force_release) so the workspace it attaches contains a different executable.
<<: *t_ubu_soltest_all <<: *t_ubu_soltest_all
t_ubu_cli: &t_ubu_cli t_ubu_cli: &t_ubu_cli
<<: *base_ubuntu2004_small <<: *base_ubuntu2004_small
<<: *steps_cmdline_tests <<: *steps_cmdline_tests
t_ubu_release_cli: &t_ubu_release_cli t_ubu_force_release_cli: &t_ubu_force_release_cli
<<: *t_ubu_cli <<: *t_ubu_cli
t_ubu_locale: t_ubu_locale:
@ -1174,7 +1161,7 @@ jobs:
t_ems_ext_hardhat: t_ems_ext_hardhat:
<<: *base_node_small <<: *base_node_small
docker: docker:
- image: circleci/node:16 - image: cimg/node:18.11
environment: environment:
TERM: xterm TERM: xterm
HARDHAT_TESTS_SOLC_PATH: /tmp/workspace/soljson.js HARDHAT_TESTS_SOLC_PATH: /tmp/workspace/soljson.js
@ -1213,12 +1200,15 @@ jobs:
default: 0 default: 0
nodejs_version: nodejs_version:
type: string type: string
default: latest default: current
resource_class: resource_class:
type: string type: string
default: small default: small
python2:
type: boolean
default: false
docker: docker:
- image: circleci/node:<<parameters.nodejs_version>> - image: cimg/node:<<parameters.nodejs_version>>
resource_class: <<parameters.resource_class>> resource_class: <<parameters.resource_class>>
# NOTE: Each external test runs up to 6 independent settings presets. If parallelism is higher than # NOTE: Each external test runs up to 6 independent settings presets. If parallelism is higher than
# actual preset count, some runs will exit immediately. If it's lower, some runs will get more than one preset. # actual preset count, some runs will exit immediately. If it's lower, some runs will get more than one preset.
@ -1234,7 +1224,18 @@ jobs:
name: Install lsof name: Install lsof
command: | command: |
# lsof is used by Colony in its stop-blockchain-client.sh script # lsof is used by Colony in its stop-blockchain-client.sh script
sudo apt update
sudo apt-get --quiet --assume-yes --no-install-recommends install lsof sudo apt-get --quiet --assume-yes --no-install-recommends install lsof
- when:
condition: << parameters.python2 >>
steps:
- run:
name: Install Python 2 and make it the default
command: |
# python is used by node-gyp to build native modules (needed for Colony).
# In the 14.x image node-gyp still requires Python 2.
sudo apt install python2 --assume-yes --no-install-recommends
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 1
- when: - when:
condition: condition:
equal: [<< parameters.binary_type >>, "solcjs"] equal: [<< parameters.binary_type >>, "solcjs"]
@ -1364,11 +1365,6 @@ jobs:
- .\test\*\soltest.exe - .\test\*\soltest.exe
- gitter_notify_failure_unless_pr - gitter_notify_failure_unless_pr
b_win_release:
<<: *b_win
environment:
FORCE_RELEASE: ON
t_win_soltest: &t_win_soltest t_win_soltest: &t_win_soltest
<<: *base_win_powershell <<: *base_win_powershell
steps: steps:
@ -1396,11 +1392,12 @@ jobs:
- store_artifacts: *artifacts_test_results - store_artifacts: *artifacts_test_results
- gitter_notify_failure_unless_pr - gitter_notify_failure_unless_pr
t_win_release_soltest:
<<: *t_win_soltest
b_bytecode_ubu: b_bytecode_ubu:
<<: *base_ubuntu2004_small <<: *base_ubuntu2004_small
environment:
TERM: xterm
MAKEFLAGS: -j 2
LC_ALL: C
steps: steps:
- checkout - checkout
- attach_workspace: - attach_workspace:
@ -1410,6 +1407,10 @@ jobs:
b_bytecode_osx: b_bytecode_osx:
<<: *base_osx <<: *base_osx
environment:
TERM: xterm
MAKEFLAGS: -j 5
LC_ALL: C
steps: steps:
- checkout - checkout
- attach_workspace: - attach_workspace:
@ -1418,7 +1419,9 @@ jobs:
label: "osx" label: "osx"
b_bytecode_win: b_bytecode_win:
<<: *base_win_cmd <<: *base_win_bash
environment:
LC_ALL: C
steps: steps:
# NOTE: For bytecode generation we need the input files to be byte-for-byte identical on all # 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. # platforms so line ending conversions must absolutely be disabled.
@ -1426,10 +1429,10 @@ jobs:
- checkout - checkout
- attach_workspace: - attach_workspace:
at: build at: build
- run: mkdir test-cases\ - run: mkdir test-cases/
- run: cd test-cases\ && python ..\scripts\isolate_tests.py ..\test\ - run: cd test-cases/ && python ../scripts/isolate_tests.py ../test/
- run: cd test-cases\ && python ..\scripts\bytecodecompare\prepare_report.py ..\build\solc\Release\solc.exe --interface standard-json --report-file ..\bytecode-report-windows-json.txt - run: cd test-cases/ && python ../scripts/bytecodecompare/prepare_report.py ../build/solc/Release/solc.exe --interface standard-json --report-file ../bytecode-report-windows-json.txt
- run: cd test-cases\ && python ..\scripts\bytecodecompare\prepare_report.py ..\build\solc\Release\solc.exe --interface cli --report-file ..\bytecode-report-windows-cli.txt - run: cd test-cases/ && python ../scripts/bytecodecompare/prepare_report.py ../build/solc/Release/solc.exe --interface cli --report-file ../bytecode-report-windows-cli.txt
- store_artifacts: - store_artifacts:
path: bytecode-report-windows-json.txt path: bytecode-report-windows-json.txt
- store_artifacts: - store_artifacts:
@ -1445,6 +1448,7 @@ jobs:
<<: *base_node_small <<: *base_node_small
environment: environment:
SOLC_EMSCRIPTEN: "On" SOLC_EMSCRIPTEN: "On"
LC_ALL: C
steps: steps:
- checkout - checkout
- attach_workspace: - attach_workspace:
@ -1581,9 +1585,9 @@ workflows:
- t_ubu_lsp: *workflow_ubuntu2004 - t_ubu_lsp: *workflow_ubuntu2004
# Ubuntu fake release build and tests # Ubuntu fake release build and tests
- b_ubu_release: *workflow_trigger_on_tags - b_ubu_force_release: *workflow_trigger_on_tags
- t_ubu_release_cli: *workflow_ubuntu2004_release - t_ubu_force_release_cli: *workflow_ubuntu2004_force_release
- t_ubu_release_soltest_all: *workflow_ubuntu2004_release - t_ubu_force_release_soltest_all: *workflow_ubuntu2004_force_release
# Emscripten build and tests that take 15 minutes or less # Emscripten build and tests that take 15 minutes or less
- b_ems: *workflow_trigger_on_tags - b_ems: *workflow_trigger_on_tags
@ -1630,9 +1634,7 @@ workflows:
# Windows build and tests # Windows build and tests
- b_win: *workflow_trigger_on_tags - b_win: *workflow_trigger_on_tags
- b_win_release: *workflow_trigger_on_tags
- t_win_soltest: *workflow_win - t_win_soltest: *workflow_win
- t_win_release_soltest: *workflow_win_release
# Bytecode comparison: # Bytecode comparison:
- b_bytecode_ubu: - b_bytecode_ubu:
@ -1665,7 +1667,7 @@ workflows:
requires: requires:
- b_ubu_static - b_ubu_static
- b_osx - b_osx
- b_win_release - b_win
- b_ems - b_ems
nightly: nightly:

View File

@ -92,7 +92,7 @@ do
done done
# wait for individual processes to get their exit status # wait for individual processes to get their exit status
for pid in ${PIDs[*]} for pid in "${PIDs[@]}"
do do
wait "$pid" wait "$pid"
done done

View File

@ -35,6 +35,9 @@ REPO_ROOT=$(pwd) # make it absolute
BUILD_DIR="${1:-${REPO_ROOT}/build}" BUILD_DIR="${1:-${REPO_ROOT}/build}"
# Set locale to C to prevent it from affecting glob sort order.
export LC_ALL=C
echo "Compiling all test contracts into bytecode..." echo "Compiling all test contracts into bytecode..."
TMPDIR=$(mktemp -d) TMPDIR=$(mktemp -d)
( (

View File

@ -104,6 +104,9 @@ tmp_dir=$(mktemp -d -t bytecode-reports-XXXXXX)
solcjs_dir="$tmp_dir/solcjs" solcjs_dir="$tmp_dir/solcjs"
script_dir="$solidity_dir/scripts" script_dir="$solidity_dir/scripts"
# Set locale to C to prevent it from affecting glob sort order.
export LC_ALL=C
cd "$tmp_dir" cd "$tmp_dir"
git clone https://github.com/ethereum/solc-js.git "$solcjs_dir" git clone https://github.com/ethereum/solc-js.git "$solcjs_dir"