CI: Make jobs extend base environments instead of redefining them

- Also remove variables that are now redundant.
- Note that this adds new variables for jobs that previously did not have them. This should not affect behavior because we were simply omitting those variables where they were not necessary.
This commit is contained in:
Kamil Śliwak 2023-06-23 12:57:02 +02:00
parent 793adc8106
commit 8b64195d4b

View File

@ -884,17 +884,15 @@ jobs:
# Runs slightly faster on large and xlarge but we only run it nightly so efficiency matters more. # Runs slightly faster on large and xlarge but we only run it nightly so efficiency matters more.
<<: *base_ubuntu2204 <<: *base_ubuntu2204
environment: environment:
<<: *base_ubuntu2204_env
CMAKE_OPTIONS: -DSANITIZE=address CMAKE_OPTIONS: -DSANITIZE=address
MAKEFLAGS: -j 3
CMAKE_BUILD_TYPE: Release CMAKE_BUILD_TYPE: Release
<<: *steps_build <<: *steps_build
b_ubu_clang: &b_ubu_clang b_ubu_clang: &b_ubu_clang
<<: *base_ubuntu2204_clang_large <<: *base_ubuntu2204_clang_large
environment: environment:
TERM: xterm <<: *base_ubuntu2204_clang_large_env
CC: clang
CXX: clang++
MAKEFLAGS: -j 10 MAKEFLAGS: -j 10
<<: *steps_build <<: *steps_build
@ -905,18 +903,15 @@ jobs:
type: string type: string
<<: *base_ubuntu2204_clang <<: *base_ubuntu2204_clang
environment: environment:
TERM: xterm <<: *base_ubuntu2204_clang_env
CC: clang
CXX: clang++
MAKEFLAGS: -j 3
CMAKE_OPTIONS: << parameters.cmake_options >> CMAKE_OPTIONS: << parameters.cmake_options >>
<<: *steps_build <<: *steps_build
b_ubu_force_release: &b_ubu_force_release b_ubu_force_release: &b_ubu_force_release
<<: *b_ubu <<: *b_ubu
environment: environment:
<<: *base_ubuntu2204_xlarge_env
FORCE_RELEASE: ON FORCE_RELEASE: ON
MAKEFLAGS: -j 10
b_ubu_static: b_ubu_static:
# We temporarily keep building static release binaries on ubuntu 20.04 # We temporarily keep building static release binaries on ubuntu 20.04
@ -925,8 +920,7 @@ jobs:
# On large runs 2x faster than on medium. 3x on xlarge. # On large runs 2x faster than on medium. 3x on xlarge.
<<: *base_ubuntu2004_xlarge <<: *base_ubuntu2004_xlarge
environment: environment:
TERM: xterm <<: *base_ubuntu2204_xlarge_env
MAKEFLAGS: -j 10
CMAKE_OPTIONS: -DCMAKE_BUILD_TYPE=Release -DUSE_Z3_DLOPEN=ON -DUSE_CVC4=OFF -DSOLC_STATIC_STDLIBS=ON CMAKE_OPTIONS: -DCMAKE_BUILD_TYPE=Release -DUSE_Z3_DLOPEN=ON -DUSE_CVC4=OFF -DSOLC_STATIC_STDLIBS=ON
steps: steps:
- checkout - checkout
@ -948,9 +942,9 @@ jobs:
# Runs ~30% faster on large but we only run it nightly so efficiency matters more. # Runs ~30% faster on large but we only run it nightly so efficiency matters more.
<<: *base_ubuntu2204 <<: *base_ubuntu2204
environment: environment:
<<: *base_ubuntu2204_env
COVERAGE: ON COVERAGE: ON
CMAKE_BUILD_TYPE: Debug CMAKE_BUILD_TYPE: Debug
MAKEFLAGS: -j 3
steps: steps:
- checkout - checkout
- run: *run_build - run: *run_build
@ -960,6 +954,7 @@ jobs:
t_ubu_codecov: t_ubu_codecov:
<<: *base_ubuntu2204_large <<: *base_ubuntu2204_large
environment: environment:
<<: *base_ubuntu2204_large_env
EVM: << pipeline.parameters.evm-version >> EVM: << pipeline.parameters.evm-version >>
OPTIMIZE: 1 OPTIMIZE: 1
steps: steps:
@ -984,6 +979,7 @@ jobs:
b_ubu_cxx20: b_ubu_cxx20:
<<: *base_ubuntu2204_large <<: *base_ubuntu2204_large
environment: environment:
<<: *base_ubuntu2204_large_env
CMAKE_BUILD_TYPE: Debug CMAKE_BUILD_TYPE: Debug
CMAKE_OPTIONS: -DCMAKE_CXX_STANDARD=20 -DUSE_CVC4=OFF CMAKE_OPTIONS: -DCMAKE_CXX_STANDARD=20 -DUSE_CVC4=OFF
MAKEFLAGS: -j 10 MAKEFLAGS: -j 10
@ -1019,8 +1015,7 @@ jobs:
b_archlinux: b_archlinux:
<<: *base_archlinux_large <<: *base_archlinux_large
environment: environment:
TERM: xterm <<: *base_archlinux_large_env
MAKEFLAGS: -j 5
# This can be switched off if we run out of sync with Arch. # This can be switched off if we run out of sync with Arch.
USE_Z3: ON USE_Z3: ON
steps: steps:
@ -1037,9 +1032,8 @@ jobs:
b_osx: b_osx:
<<: *base_osx_large <<: *base_osx_large
environment: environment:
TERM: xterm <<: *base_osx_large_env
CMAKE_BUILD_TYPE: Release CMAKE_BUILD_TYPE: Release
MAKEFLAGS: -j10
steps: steps:
- checkout - checkout
- when: - when:
@ -1059,9 +1053,9 @@ jobs:
t_osx_soltest: &t_osx_soltest t_osx_soltest: &t_osx_soltest
<<: *base_osx <<: *base_osx
environment: environment:
<<: *base_osx_env
EVM: << pipeline.parameters.evm-version >> EVM: << pipeline.parameters.evm-version >>
OPTIMIZE: 0 OPTIMIZE: 0
TERM: xterm
steps: steps:
- checkout - checkout
- when: - when:
@ -1091,7 +1085,7 @@ jobs:
b_ems: b_ems:
<<: *base_ems_large <<: *base_ems_large
environment: environment:
TERM: xterm <<: *base_ems_large_env
MAKEFLAGS: -j 10 MAKEFLAGS: -j 10
steps: steps:
- checkout - checkout
@ -1138,9 +1132,9 @@ jobs:
<<: *base_archlinux <<: *base_archlinux
parallelism: 20 parallelism: 20
environment: environment:
<<: *base_archlinux_env
EVM: << pipeline.parameters.evm-version >> EVM: << pipeline.parameters.evm-version >>
OPTIMIZE: 0 OPTIMIZE: 0
TERM: xterm
# For Archlinux we do not have prebuilt docker images and we would need to build evmone from source, # For Archlinux we do not have prebuilt docker images and we would need to build evmone from source,
# thus we forgo semantics tests to speed things up. # thus we forgo semantics tests to speed things up.
SOLTEST_FLAGS: --no-semantic-tests --no-smt SOLTEST_FLAGS: --no-semantic-tests --no-smt
@ -1157,6 +1151,7 @@ jobs:
<<: *base_ubuntu2204_clang <<: *base_ubuntu2204_clang
parallelism: 20 parallelism: 20
environment: environment:
<<: *base_ubuntu2204_clang_env
EVM: << pipeline.parameters.evm-version >> EVM: << pipeline.parameters.evm-version >>
OPTIMIZE: 0 OPTIMIZE: 0
# The high parallelism in this job is causing the SMT tests to run out of memory, # The high parallelism in this job is causing the SMT tests to run out of memory,
@ -1191,7 +1186,7 @@ jobs:
<<: *base_ubuntu2204 <<: *base_ubuntu2204
parallelism: 7 # Should match number of tests in .circleci/cli.sh parallelism: 7 # Should match number of tests in .circleci/cli.sh
environment: environment:
TERM: xterm <<: *base_ubuntu2204_env
ASAN_OPTIONS: check_initialization_order=true:detect_stack_use_after_return=true:strict_init_order=true:strict_string_checks=true:detect_invalid_pointer_pairs=2 ASAN_OPTIONS: check_initialization_order=true:detect_stack_use_after_return=true:strict_init_order=true:strict_string_checks=true:detect_invalid_pointer_pairs=2
# Suppress CLN memory leak. # Suppress CLN memory leak.
# See: https://github.com/ethereum/solidity/issues/13891 for details. # See: https://github.com/ethereum/solidity/issues/13891 for details.
@ -1202,6 +1197,7 @@ jobs:
<<: *base_ubuntu2204 <<: *base_ubuntu2204
parallelism: 20 parallelism: 20
environment: environment:
<<: *base_ubuntu2204_env
EVM: << pipeline.parameters.evm-version >> EVM: << pipeline.parameters.evm-version >>
OPTIMIZE: 0 OPTIMIZE: 0
SOLTEST_FLAGS: --no-smt SOLTEST_FLAGS: --no-smt
@ -1215,6 +1211,7 @@ jobs:
<<: *base_ubuntu2204_clang <<: *base_ubuntu2204_clang
parallelism: 20 parallelism: 20
environment: environment:
<<: *base_ubuntu2204_clang_env
EVM: << pipeline.parameters.evm-version >> EVM: << pipeline.parameters.evm-version >>
OPTIMIZE: 0 OPTIMIZE: 0
SOLTEST_FLAGS: --no-smt SOLTEST_FLAGS: --no-smt
@ -1225,6 +1222,7 @@ jobs:
<<: *base_ubuntu2204_clang <<: *base_ubuntu2204_clang
parallelism: 20 parallelism: 20
environment: environment:
<<: *base_ubuntu2204_clang_env
EVM: << pipeline.parameters.evm-version >> EVM: << pipeline.parameters.evm-version >>
SOLTEST_FLAGS: --no-smt SOLTEST_FLAGS: --no-smt
<<: *steps_soltest <<: *steps_soltest
@ -1260,7 +1258,7 @@ jobs:
docker: docker:
- image: cimg/node:18.16 - image: cimg/node:18.16
environment: environment:
TERM: xterm <<: *base_node_small_env
HARDHAT_TESTS_SOLC_PATH: /tmp/workspace/soljson.js HARDHAT_TESTS_SOLC_PATH: /tmp/workspace/soljson.js
steps: steps:
- checkout - checkout
@ -1581,9 +1579,8 @@ jobs:
t_bytecode_compare: t_bytecode_compare:
<<: *base_ubuntu2204_small <<: *base_ubuntu2204_small
environment: environment:
<<: *base_ubuntu2204_small_env
<<: *bytecode_compare_env_presets <<: *bytecode_compare_env_presets
TERM: xterm
MAKEFLAGS: -j 2
steps: steps:
- checkout - checkout
- attach_workspace: - attach_workspace: