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
MAKEFLAGS: -j 10
- base_buildpack_focal_small: &base_buildpack_focal_small
- base_cimg_small: &base_cimg_small
docker:
- image: buildpack-deps:focal
resource_class: small
environment:
TERM: xterm
MAKEFLAGS: -j 2
- base_buildpack_latest_small: &base_buildpack_latest_small
docker:
- image: buildpack-deps:latest
- image: cimg/base:current
resource_class: small
environment:
TERM: xterm
@ -389,10 +381,10 @@ defaults:
shell: powershell.exe
size: large
- base_win_cmd: &base_win_cmd
- base_win_bash: &base_win_bash
executor:
name: win/default
shell: cmd.exe
shell: bash.exe
- base_osx: &base_osx
macos:
@ -419,7 +411,7 @@ defaults:
- base_python_small: &base_python_small
docker:
- image: circleci/python:3.6
- image: cimg/python:3.6
resource_class: small
environment:
TERM: xterm
@ -427,7 +419,7 @@ defaults:
- base_node_small: &base_node_small
docker:
- image: circleci/node
- image: cimg/node:current
resource_class: small
environment:
TERM: xterm
@ -463,10 +455,10 @@ defaults:
requires:
- b_ubu_clang
- workflow_ubuntu2004_release: &workflow_ubuntu2004_release
- workflow_ubuntu2004_force_release: &workflow_ubuntu2004_force_release
<<: *workflow_trigger_on_tags
requires:
- b_ubu_release
- b_ubu_force_release
- workflow_ubuntu2004_static: &workflow_ubuntu2004_static
<<: *workflow_trigger_on_tags
@ -518,11 +510,6 @@ defaults:
requires:
- b_win
- workflow_win_release: &workflow_win_release
<<: *workflow_trigger_on_tags
requires:
- b_win_release
# --------------------------------------------------------------------------
# Parameterized Job Templates
@ -533,113 +520,107 @@ defaults:
project: colony
binary_type: solcjs
compile_only: 1
nodejs_version: '14'
nodejs_version: '14.20'
python2: true
- job_native_test_ext_gnosis: &job_native_test_ext_gnosis
<<: *workflow_ubuntu2004_static
name: t_native_test_ext_gnosis
project: gnosis
binary_type: native
# NOTE: Tests crash on nodejs 17: "Error: error:0308010C:digital envelope routines::unsupported"
nodejs_version: '16'
nodejs_version: '16.18'
- job_native_test_ext_zeppelin: &job_native_test_ext_zeppelin
<<: *workflow_ubuntu2004_static
name: t_native_test_ext_zeppelin
project: zeppelin
binary_type: native
# NOTE: Tests crash on nodejs 17: "Error: error:0308010C:digital envelope routines::unsupported"
nodejs_version: '16'
resource_class: large
- job_native_test_ext_ens: &job_native_test_ext_ens
<<: *workflow_ubuntu2004_static
name: t_native_test_ext_ens
project: ens
binary_type: native
nodejs_version: '16'
nodejs_version: '18.11'
- job_native_test_ext_trident: &job_native_test_ext_trident
<<: *workflow_ubuntu2004_static
name: t_native_test_ext_trident
project: trident
binary_type: native
nodejs_version: '16'
nodejs_version: '16.18'
- job_native_test_ext_euler: &job_native_test_ext_euler
<<: *workflow_ubuntu2004_static
name: t_native_test_ext_euler
project: euler
binary_type: native
nodejs_version: '16'
resource_class: medium
- job_native_test_ext_yield_liquidator: &job_native_test_ext_yield_liquidator
<<: *workflow_ubuntu2004_static
name: t_native_test_ext_yield_liquidator
project: yield-liquidator
binary_type: native
nodejs_version: '16'
- job_native_test_ext_bleeps: &job_native_test_ext_bleeps
<<: *workflow_ubuntu2004_static
name: t_native_test_ext_bleeps
project: bleeps
binary_type: native
nodejs_version: '16'
resource_class: medium
- job_native_test_ext_pool_together: &job_native_test_ext_pool_together
<<: *workflow_ubuntu2004_static
name: t_native_test_ext_pool_together
project: pool-together
binary_type: native
nodejs_version: '16'
nodejs_version: '16.18'
- job_native_test_ext_perpetual_pools: &job_native_test_ext_perpetual_pools
<<: *workflow_ubuntu2004_static
name: t_native_test_ext_perpetual_pools
project: perpetual-pools
binary_type: native
nodejs_version: '16'
nodejs_version: '18.11'
- job_native_test_ext_uniswap: &job_native_test_ext_uniswap
<<: *workflow_ubuntu2004_static
name: t_native_test_ext_uniswap
project: uniswap
binary_type: native
nodejs_version: '16'
nodejs_version: '16.18'
- job_native_test_ext_prb_math: &job_native_test_ext_prb_math
<<: *workflow_ubuntu2004_static
name: t_native_test_ext_prb_math
project: prb-math
binary_type: native
nodejs_version: '16'
nodejs_version: '18.11'
- job_native_test_ext_elementfi: &job_native_test_ext_elementfi
<<: *workflow_ubuntu2004_static
name: t_native_test_ext_elementfi
project: elementfi
binary_type: native
nodejs_version: '16'
resource_class: medium
- job_native_test_ext_brink: &job_native_test_ext_brink
<<: *workflow_ubuntu2004_static
name: t_native_test_ext_brink
project: brink
binary_type: native
nodejs_version: '16'
nodejs_version: '18.11'
- job_native_test_ext_chainlink: &job_native_test_ext_chainlink
<<: *workflow_ubuntu2004_static
name: t_native_test_ext_chainlink
project: chainlink
binary_type: native
nodejs_version: '16'
nodejs_version: '16.18'
resource_class: large # Tests run out of memory on a smaller machine
- job_native_test_ext_gp2: &job_native_test_ext_gp2
<<: *workflow_ubuntu2004_static
name: t_native_test_ext_gp2
project: gp2
binary_type: native
# NOTE: Tests crash on nodejs 17: "Error: error:0308010C:digital envelope routines::unsupported"
nodejs_version: '16'
nodejs_version: '18.11'
- job_ems_test_ext_colony: &job_ems_test_ext_colony
<<: *workflow_emscripten
name: t_ems_test_ext_colony
project: colony
binary_type: solcjs
nodejs_version: '14'
nodejs_version: '14.20'
resource_class: medium
python2: true
- job_b_ubu_asan_clang: &job_b_ubu_asan_clang
<<: *workflow_trigger_on_tags
@ -683,12 +664,14 @@ jobs:
- gitter_notify_failure_unless_pr
chk_coding_style:
<<: *base_buildpack_focal_small
<<: *base_cimg_small
steps:
- checkout
- run:
name: Install shellcheck
command: apt -q update && apt install -y shellcheck
command: |
sudo apt -q update
sudo apt install -y shellcheck
- run:
name: Check for C++ coding style
command: ./scripts/check_style.sh
@ -710,12 +693,14 @@ jobs:
- gitter_notify_failure_unless_pr
chk_pylint:
<<: *base_buildpack_focal_small
<<: *base_cimg_small
steps:
- checkout
- run:
name: Install pip
command: apt -q update && apt install -y python3-pip
command: |
sudo apt -q update
sudo apt install -y python3-pip
- run:
name: Install pylint and dependencies of the scripts that will be linted
command: python3 -m pip install
@ -734,12 +719,14 @@ jobs:
- gitter_notify_failure_unless_pr
chk_antlr_grammar:
<<: *base_buildpack_focal_small
<<: *base_cimg_small
steps:
- checkout
- run:
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:
name: Run tests
command: ./scripts/test_antlr_grammar.sh
@ -761,14 +748,14 @@ jobs:
- gitter_notify_failure_unless_pr
chk_proofs:
<<: *base_buildpack_latest_small
<<: *base_cimg_small
steps:
- checkout
- run:
name: Z3 python deps
command: |
apt-get -qq update
apt-get -qy install python3-pip
sudo apt-get -qq update
sudo apt-get -qy install python3-pip
pip3 install --user z3-solver
- run: *run_proofs
- gitter_notify_failure_unless_pr
@ -838,7 +825,7 @@ jobs:
CMAKE_OPTIONS: << parameters.cmake_options >>
<<: *steps_build
b_ubu_release: &b_ubu_release
b_ubu_force_release: &b_ubu_force_release
<<: *b_ubu
environment:
FORCE_RELEASE: ON
@ -1084,16 +1071,16 @@ jobs:
SOLTEST_FLAGS: --no-smt
<<: *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
# 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_cli: &t_ubu_cli
<<: *base_ubuntu2004_small
<<: *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_locale:
@ -1174,7 +1161,7 @@ jobs:
t_ems_ext_hardhat:
<<: *base_node_small
docker:
- image: circleci/node:16
- image: cimg/node:18.11
environment:
TERM: xterm
HARDHAT_TESTS_SOLC_PATH: /tmp/workspace/soljson.js
@ -1213,12 +1200,15 @@ jobs:
default: 0
nodejs_version:
type: string
default: latest
default: current
resource_class:
type: string
default: small
python2:
type: boolean
default: false
docker:
- image: circleci/node:<<parameters.nodejs_version>>
- image: cimg/node:<<parameters.nodejs_version>>
resource_class: <<parameters.resource_class>>
# 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.
@ -1234,7 +1224,18 @@ jobs:
name: Install lsof
command: |
# 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
- 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:
condition:
equal: [<< parameters.binary_type >>, "solcjs"]
@ -1364,11 +1365,6 @@ jobs:
- .\test\*\soltest.exe
- gitter_notify_failure_unless_pr
b_win_release:
<<: *b_win
environment:
FORCE_RELEASE: ON
t_win_soltest: &t_win_soltest
<<: *base_win_powershell
steps:
@ -1396,11 +1392,12 @@ jobs:
- store_artifacts: *artifacts_test_results
- gitter_notify_failure_unless_pr
t_win_release_soltest:
<<: *t_win_soltest
b_bytecode_ubu:
<<: *base_ubuntu2004_small
environment:
TERM: xterm
MAKEFLAGS: -j 2
LC_ALL: C
steps:
- checkout
- attach_workspace:
@ -1410,6 +1407,10 @@ jobs:
b_bytecode_osx:
<<: *base_osx
environment:
TERM: xterm
MAKEFLAGS: -j 5
LC_ALL: C
steps:
- checkout
- attach_workspace:
@ -1418,7 +1419,9 @@ jobs:
label: "osx"
b_bytecode_win:
<<: *base_win_cmd
<<: *base_win_bash
environment:
LC_ALL: C
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.
@ -1426,10 +1429,10 @@ jobs:
- checkout
- attach_workspace:
at: build
- run: mkdir test-cases\
- 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 cli --report-file ..\bytecode-report-windows-cli.txt
- run: mkdir test-cases/
- 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 cli --report-file ../bytecode-report-windows-cli.txt
- store_artifacts:
path: bytecode-report-windows-json.txt
- store_artifacts:
@ -1445,6 +1448,7 @@ jobs:
<<: *base_node_small
environment:
SOLC_EMSCRIPTEN: "On"
LC_ALL: C
steps:
- checkout
- attach_workspace:
@ -1581,9 +1585,9 @@ workflows:
- t_ubu_lsp: *workflow_ubuntu2004
# Ubuntu fake release build and tests
- b_ubu_release: *workflow_trigger_on_tags
- t_ubu_release_cli: *workflow_ubuntu2004_release
- t_ubu_release_soltest_all: *workflow_ubuntu2004_release
- b_ubu_force_release: *workflow_trigger_on_tags
- t_ubu_force_release_cli: *workflow_ubuntu2004_force_release
- t_ubu_force_release_soltest_all: *workflow_ubuntu2004_force_release
# Emscripten build and tests that take 15 minutes or less
- b_ems: *workflow_trigger_on_tags
@ -1630,9 +1634,7 @@ workflows:
# Windows build and tests
- b_win: *workflow_trigger_on_tags
- b_win_release: *workflow_trigger_on_tags
- t_win_soltest: *workflow_win
- t_win_release_soltest: *workflow_win_release
# Bytecode comparison:
- b_bytecode_ubu:
@ -1665,7 +1667,7 @@ workflows:
requires:
- b_ubu_static
- b_osx
- b_win_release
- b_win
- b_ems
nightly:

View File

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

View File

@ -35,6 +35,9 @@ REPO_ROOT=$(pwd) # make it absolute
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..."
TMPDIR=$(mktemp -d)
(

View File

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