2019-04-26 09:57:49 +00:00
# vim:ts=2:sw=2:et
# --------------------------------------------------------------------------
# Prefixes used in order to keep CircleCI workflow overview more readable:
# - b: build
# - t: test
# - ubu: ubuntu
# - ems: Emscripten
2019-11-19 16:09:44 +00:00
version : 2.1
parameters :
2023-02-14 13:31:11 +00:00
ubuntu-2004-docker-image :
type : string
2023-03-28 12:36:47 +00:00
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2004-17
default : "solbuildpackpusher/solidity-buildpack-deps@sha256:87c63f4c0e9be15b60417809cd3245892db281af0f80ed7378a1978f6f170029"
2023-01-11 19:55:02 +00:00
ubuntu-2204-docker-image :
2020-02-20 06:04:49 +00:00
type : string
2023-03-28 12:36:47 +00:00
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2204-2
default : "solbuildpackpusher/solidity-buildpack-deps@sha256:7f0b62da2aa0920660e67cd17fb3a7f6c57d7da72454003056f3bd27bbda2075"
2023-01-11 19:55:02 +00:00
ubuntu-2204-clang-docker-image :
2019-11-19 16:09:44 +00:00
type : string
2023-03-28 12:36:47 +00:00
# solbuildpackpusher/solidity-buildpack-deps:ubuntu2204.clang-2
default : "solbuildpackpusher/solidity-buildpack-deps@sha256:0d4fa1da806f9b3daabd2d1dc0842899af794a838e475c14045c3fb289cc8103"
2020-07-15 10:44:35 +00:00
ubuntu-1604-clang-ossfuzz-docker-image :
2020-02-20 14:32:28 +00:00
type : string
2023-03-28 12:36:47 +00:00
# solbuildpackpusher/solidity-buildpack-deps:ubuntu1604.clang.ossfuzz-23
default : "solbuildpackpusher/solidity-buildpack-deps@sha256:7a84f67829ec2fdcfc8a61ebf22f9dc27b04a9edeb1531565ab3e0ebb1cbc4a0"
2020-07-15 10:44:35 +00:00
emscripten-docker-image :
type : string
2023-03-28 12:36:47 +00:00
# solbuildpackpusher/solidity-buildpack-deps:emscripten-15
2023-03-28 12:36:56 +00:00
default : "solbuildpackpusher/solidity-buildpack-deps@sha256:e2729bd6c0734bb49d04e2688fec3dcf880394f351f69358dd2bd92c0f6fd309"
2021-08-31 10:08:35 +00:00
evm-version :
type : string
default : london
2019-04-26 09:57:49 +00:00
2020-09-15 12:47:30 +00:00
orbs :
win : circleci/windows@2.2.0
2021-10-22 16:02:12 +00:00
commands :
2023-02-27 11:35:53 +00:00
matrix_notify_unless_pr :
description : "Posts a notification to the solidity-dev room on Matrix (if not running on a PR)."
2021-10-22 16:02:12 +00:00
parameters :
event :
type : enum
2021-10-22 12:44:21 +00:00
enum : [ "failure" , "success" , "release" ]
2021-10-22 16:02:12 +00:00
condition :
type : string
steps :
- run :
2023-02-27 11:35:53 +00:00
name : "Matrix notification"
2021-10-26 08:40:45 +00:00
when : << parameters.condition >>
2021-10-22 16:02:12 +00:00
command : |
2021-11-10 16:05:23 +00:00
# FIXME: Checking $CIRCLE_PULL_REQUEST would be better than hard-coding branch names
# but it's broken. CircleCI associates runs on develop/breaking with random old PRs.
[ [ $CIRCLE_BRANCH == develop || $CIRCLE_BRANCH == breaking ]] || { echo "Running on a PR or a feature branch - notification skipped."; exit 0; }
2021-10-21 16:40:55 +00:00
2021-11-23 15:40:54 +00:00
# Workflow name is not exposed as an env variable. Has to be queried from the API.
# The name is not critical so if anything fails, use the raw workflow ID as a fallback.
workflow_info=$(curl --silent "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}") || true
2021-11-23 16:09:50 +00:00
workflow_name=$(echo "$workflow_info" | grep -E '"\s*name"\s*:\s*".*"' | cut -d \" -f 4 || echo "$CIRCLE_WORKFLOW_ID")
2021-11-23 15:40:54 +00:00
2022-01-10 15:26:14 +00:00
[ [ $CIRCLE_NODE_TOTAL == 1 ]] && job="**${CIRCLE_JOB}**"
[ [ $CIRCLE_NODE_TOTAL != 1 ]] && job="**${CIRCLE_JOB}** (run $((CIRCLE_NODE_INDEX + 1))/${CIRCLE_NODE_TOTAL})"
[ [ "<< parameters.event >>" == "failure" ]] && message=" ❌ [${workflow_name}] Job ${job} failed on **${CIRCLE_BRANCH}**. Please see [build ${CIRCLE_BUILD_NUM}](${CIRCLE_BUILD_URL}) for details."
[ [ "<< parameters.event >>" == "success" ]] && message=" ✅ [${workflow_name}] Job ${job} succeeded on **${CIRCLE_BRANCH}**. Please see [build ${CIRCLE_BUILD_NUM}](${CIRCLE_BUILD_URL}) for details."
2021-10-22 12:44:21 +00:00
[ [ "<< parameters.event >>" == "release" ]] && message=" 📦 Release binaries for version **${CIRCLE_TAG}** are ready and attached as artifacts to [build ${CIRCLE_BUILD_NUM}](${CIRCLE_BUILD_URL}). **Please make sure the whole workflow succeeded before using them.**"
# The release notification only makes sense on tagged commits. If the commit is untagged, just bail out.
[ [ "<< parameters.event >>" == "release" ]] && { [[ $CIRCLE_TAG != "" ]] || { echo "Not a tagged commit - notification skipped."; exit 0; } }
2021-10-22 16:02:12 +00:00
2023-02-27 11:35:53 +00:00
curl "https://${MATRIX_SERVER}/_matrix/client/v3/rooms/${MATRIX_NOTIFY_ROOM_ID}/send/m.room.message" \
2021-10-22 16:02:12 +00:00
--request POST \
--include \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
2023-02-27 11:35:53 +00:00
--header "Authorization: Bearer ${MATRIX_ACCESS_TOKEN}" \
--data "{\"msgtype\":\"m.text\", \"body\":\"${message}\"}"
2021-10-22 16:02:12 +00:00
2023-02-27 11:35:53 +00:00
matrix_notify_failure_unless_pr :
description : "Posts a failure notification to the main room on Matrix (if not running on a PR)."
2021-10-22 16:02:12 +00:00
steps :
2023-02-27 11:35:53 +00:00
- matrix_notify_unless_pr :
2021-10-22 16:02:12 +00:00
event : failure
condition : on_fail
2023-02-27 11:35:53 +00:00
matrix_notify_success_unless_pr :
description : "Posts a success notification to the main room on Matrix (if not running on a PR)."
2021-10-22 16:02:12 +00:00
steps :
2023-02-27 11:35:53 +00:00
- matrix_notify_unless_pr :
2021-10-22 16:02:12 +00:00
event : success
condition : on_success
2023-02-27 11:35:53 +00:00
matrix_notify_release_unless_pr :
description : "Posts a release notification to the main room on Matrix (if not running on a PR)."
2021-10-22 12:44:21 +00:00
steps :
2023-02-27 11:35:53 +00:00
- matrix_notify_unless_pr :
2021-10-22 12:44:21 +00:00
event : release
condition : on_success
2022-04-11 09:50:10 +00:00
prepare_bytecode_report :
description : "Generate bytecode report and upload it as an artifact."
parameters :
label :
type : string
2023-02-14 13:31:11 +00:00
binary_path :
type : string
2022-04-11 09:50:10 +00:00
steps :
- run : mkdir test-cases/
2023-02-14 13:31:11 +00:00
- 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 cli --report-file "../bytecode-report-<< parameters.label >>-cli.txt"
2022-04-11 09:50:10 +00:00
- store_artifacts :
path : bytecode-report-<< parameters.label >>-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
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2022-04-11 09:50:10 +00:00
2018-04-03 15:34:38 +00:00
defaults :
2019-04-26 09:57:49 +00:00
# --------------------------------------------------------------------------
# Build Templates
2018-05-02 13:42:34 +00:00
- setup_prerelease_commit_hash : &setup_prerelease_commit_hash
2018-04-26 11:38:20 +00:00
name : Store commit hash and prerelease
command : |
if [ "$CIRCLE_BRANCH" = release -o -n "$CIRCLE_TAG" ]; then echo -n > prerelease.txt; else date -u +"nightly.%Y.%-m.%-d" > prerelease.txt; fi
echo -n "$CIRCLE_SHA1" > commit_hash.txt
2019-04-26 09:57:49 +00:00
2018-04-26 11:38:20 +00:00
- run_build : &run_build
name : Build
2020-06-23 17:17:15 +00:00
command : scripts/ci/build.sh
2019-04-26 09:57:49 +00:00
2019-03-28 10:11:04 +00:00
- run_build_ossfuzz : &run_build_ossfuzz
name : Build_ossfuzz
2020-06-23 17:17:15 +00:00
command : scripts/ci/build_ossfuzz.sh
2019-04-26 09:57:49 +00:00
2019-06-19 17:25:05 +00:00
- run_proofs : &run_proofs
name : Correctness proofs for optimization rules
command : scripts/run_proofs.sh
2019-04-26 09:57:49 +00:00
2021-08-31 13:03:58 +00:00
- run_soltest : &run_soltest
name : soltest
no_output_timeout : 30m
command : ./.circleci/soltest.sh
- run_soltest_all : &run_soltest_all
name : soltest_all
no_output_timeout : 30m
command : ./.circleci/soltest_all.sh
- run_cmdline_tests : &run_cmdline_tests
name : command line tests
no_output_timeout : 30m
command : ./test/cmdlineTests.sh
- run_docs_pragma_min_version : &run_docs_pragma_min_version
name : docs pragma version check
command : ./scripts/docs_version_pragma_check.sh
2019-04-26 09:57:49 +00:00
# --------------------------------------------------------------------------
# Artifacts Templates
# compiled solc executable target
- artifacts_solc : &artifacts_solc
2018-04-26 11:38:20 +00:00
path : build/solc/solc
destination : solc
2019-04-26 09:57:49 +00:00
2020-09-16 15:19:41 +00:00
# windows artifacts
2020-09-15 12:47:30 +00:00
- artifact_solc_windows : &artifact_solc_windows
2020-09-16 15:19:41 +00:00
path : upload/
2020-09-15 12:47:30 +00:00
2021-10-21 14:51:37 +00:00
- artifact_yul_phaser : &artifact_yul_phaser
path : build/tools/yul-phaser
destination : yul-phaser
2019-04-26 09:57:49 +00:00
# compiled executable targets
- artifacts_executables : &artifacts_executables
2018-04-26 11:38:20 +00:00
root : build
paths :
- solc/solc
- test/soltest
- test/tools/solfuzzer
2019-04-26 09:57:49 +00:00
# compiled OSSFUZZ targets
- artifacts_executables_ossfuzz : &artifacts_executables_ossfuzz
2019-04-04 21:04:49 +00:00
root : build
paths :
2019-07-08 14:04:52 +00:00
- test/tools/ossfuzz/abiv2_proto_ossfuzz
2020-12-09 10:10:16 +00:00
- test/tools/ossfuzz/abiv2_isabelle_ossfuzz
2019-04-04 21:04:49 +00:00
- test/tools/ossfuzz/const_opt_ossfuzz
2021-02-05 11:29:52 +00:00
- test/tools/ossfuzz/solc_mutator_ossfuzz
- test/tools/ossfuzz/solc_ossfuzz
2021-02-04 20:52:07 +00:00
- test/tools/ossfuzz/stack_reuse_codegen_ossfuzz
2019-04-29 10:38:11 +00:00
- test/tools/ossfuzz/strictasm_assembly_ossfuzz
2019-04-04 21:04:49 +00:00
- test/tools/ossfuzz/strictasm_diff_ossfuzz
2019-04-29 10:38:11 +00:00
- test/tools/ossfuzz/strictasm_opt_ossfuzz
2019-04-04 21:04:49 +00:00
- test/tools/ossfuzz/yul_proto_diff_ossfuzz
2019-11-18 11:12:30 +00:00
- test/tools/ossfuzz/yul_proto_diff_custom_mutate_ossfuzz
2019-04-29 10:38:11 +00:00
- test/tools/ossfuzz/yul_proto_ossfuzz
2020-04-20 14:08:31 +00:00
- test/tools/ossfuzz/sol_proto_ossfuzz
2018-04-03 15:34:38 +00:00
2019-04-26 09:57:49 +00:00
# test result output directory
- artifacts_test_results : &artifacts_test_results
path : test_results/
destination : test_results/
# --------------------------------------------------------------------------
2021-10-21 15:12:03 +00:00
# Step Templates
2019-04-26 09:57:49 +00:00
# store_test_results helper
- store_test_results : &store_test_results
path : test_results/
2021-08-31 13:03:58 +00:00
- steps_soltest : &steps_soltest
2020-02-20 14:32:28 +00:00
steps :
- checkout
- attach_workspace :
at : build
2021-10-21 15:12:03 +00:00
# NOTE: Different build jobs produce different soltest executables (release/debug,
# clang/gcc, windows/linux/macos, etc.). The executable used by these steps comes from the
# attached workspace and we only see the items added to the workspace by jobs we depend on.
2020-02-20 14:32:28 +00:00
- run : *run_soltest
- store_test_results : *store_test_results
- store_artifacts : *artifacts_test_results
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2020-02-20 14:32:28 +00:00
2021-12-13 13:53:40 +00:00
- steps_test_lsp : &steps_test_lsp
steps :
- checkout
- attach_workspace :
at : build
- run :
name : Install dependencies
command : pip install --user deepdiff colorama
- run :
name : Executing solc LSP test suite
2022-05-30 17:51:43 +00:00
command : ./test/lsp.py ./build/solc/solc --non-interactive
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2021-12-13 13:53:40 +00:00
2021-09-04 10:07:18 +00:00
- steps_build : &steps_build
steps :
- checkout
- run : *run_build
- store_artifacts : *artifacts_solc
2022-02-08 13:55:49 +00:00
- store_artifacts : *artifact_yul_phaser
2021-09-04 10:07:18 +00:00
- persist_to_workspace : *artifacts_executables
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2021-09-04 10:07:18 +00:00
2021-08-31 13:03:58 +00:00
- steps_soltest_all : &steps_soltest_all
2019-09-24 12:31:22 +00:00
steps :
- checkout
- attach_workspace :
at : build
2021-08-19 10:24:51 +00:00
- run : *run_soltest_all
2019-09-24 12:31:22 +00:00
- store_test_results : *store_test_results
- store_artifacts : *artifacts_test_results
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2019-09-24 12:31:22 +00:00
2021-08-31 13:03:58 +00:00
- steps_cmdline_tests : &steps_cmdline_tests
2019-08-14 13:43:24 +00:00
steps :
- checkout
- attach_workspace :
at : build
2021-08-19 10:24:51 +00:00
- run : *run_cmdline_tests
2019-08-14 13:43:24 +00:00
- store_test_results : *store_test_results
- store_artifacts : *artifacts_test_results
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2019-04-26 09:57:49 +00:00
2021-09-04 10:07:18 +00:00
- steps_install_dependencies_osx : &steps_install_dependencies_osx
steps :
2022-04-11 12:06:42 +00:00
# FIXME: We used to cache dependencies on macOS but now it takes longer than just installing
# them each time. See https://github.com/ethereum/solidity/issues/12925.
2022-04-11 13:54:56 +00:00
- run :
name : Install build dependencies
command : ./.circleci/osx_install_dependencies.sh
2021-09-04 10:07:18 +00:00
2021-10-21 15:12:03 +00:00
# --------------------------------------------------------------------------
# Base Image Templates
2023-02-16 17:08:59 +00:00
- base_archlinux : &base_archlinux
2021-08-19 10:24:51 +00:00
docker :
2023-02-16 17:08:59 +00:00
- image : archlinux:base
2021-10-21 15:37:05 +00:00
environment :
TERM : xterm
2021-10-28 20:34:48 +00:00
MAKEFLAGS : -j 3
2023-02-16 17:08:59 +00:00
- base_archlinux_large : &base_archlinux_large
docker :
- image : archlinux:base
resource_class : large
environment :
TERM : xterm
MAKEFLAGS : -j 5
- base_cimg_small : &base_cimg_small
docker :
- image : cimg/base:current
2021-10-28 20:34:48 +00:00
resource_class : small
environment :
TERM : xterm
MAKEFLAGS : -j 2
2021-08-19 10:24:51 +00:00
2023-02-16 17:08:59 +00:00
- base_ems_large : &base_ems_large
2021-08-19 10:24:51 +00:00
docker :
2023-02-16 17:08:59 +00:00
- image : << pipeline.parameters.emscripten-docker-image >>
resource_class : large
2021-10-21 15:37:05 +00:00
environment :
TERM : xterm
2023-02-16 17:08:59 +00:00
MAKEFLAGS : -j 5
2021-10-21 15:37:05 +00:00
2023-02-16 17:08:59 +00:00
- base_node_small : &base_node_small
docker :
- image : cimg/node:current
resource_class : small
environment :
TERM : xterm
MAKEFLAGS : -j 2
- base_osx : &base_osx
macos :
xcode : "13.2.0"
environment :
TERM : xterm
MAKEFLAGS : -j5
- base_osx_large : &base_osx_large
macos :
xcode : "13.2.0"
2021-10-28 20:34:48 +00:00
resource_class : large
environment :
TERM : xterm
2023-02-16 17:08:59 +00:00
MAKEFLAGS : -j10
2021-08-19 10:24:51 +00:00
2023-02-16 17:08:59 +00:00
- base_python_small : &base_python_small
docker :
- image : cimg/python:3.6
resource_class : small
environment :
TERM : xterm
MAKEFLAGS : -j 2
- base_ubuntu1604_clang : &base_ubuntu1604_clang
2023-02-14 13:31:11 +00:00
docker :
2023-02-16 17:08:59 +00:00
- image : << pipeline.parameters.ubuntu-1604-clang-ossfuzz-docker-image >>
2023-02-14 13:31:11 +00:00
environment :
TERM : xterm
MAKEFLAGS : -j 3
2023-02-16 17:08:59 +00:00
- base_ubuntu1604_clang_small : &base_ubuntu1604_clang_small
<< : *base_ubuntu1604_clang
resource_class : small
environment :
TERM : xterm
MAKEFLAGS : -j 2
- base_ubuntu2004 : &base_ubuntu2004
docker :
- image : << pipeline.parameters.ubuntu-2004-docker-image >>
environment :
TERM : xterm
MAKEFLAGS : -j 3
2023-02-14 13:31:11 +00:00
- base_ubuntu2004_small : &base_ubuntu2004_small
<< : *base_ubuntu2004
resource_class : small
environment :
TERM : xterm
MAKEFLAGS : -j 2
- base_ubuntu2004_xlarge : &base_ubuntu2004_xlarge
<< : *base_ubuntu2004
resource_class : xlarge
environment :
TERM : xterm
MAKEFLAGS : -j 10
2023-01-11 19:55:02 +00:00
- base_ubuntu2204 : &base_ubuntu2204
2021-08-19 10:24:51 +00:00
docker :
2023-01-11 19:55:02 +00:00
- image : << pipeline.parameters.ubuntu-2204-docker-image >>
2021-10-21 15:37:05 +00:00
environment :
TERM : xterm
2021-10-28 20:34:48 +00:00
MAKEFLAGS : -j 3
2023-02-16 17:08:59 +00:00
- base_ubuntu2204_clang : &base_ubuntu2204_clang
docker :
- image : << pipeline.parameters.ubuntu-2204-clang-docker-image >>
environment :
TERM : xterm
CC : clang
CXX : clang++
MAKEFLAGS : -j 3
- base_ubuntu2204_clang_large : &base_ubuntu2204_clang_large
<< : *base_ubuntu2204_clang
resource_class : large
environment :
TERM : xterm
CC : clang
CXX : clang++
MAKEFLAGS : -j 5
2023-01-11 19:55:02 +00:00
- base_ubuntu2204_small : &base_ubuntu2204_small
<< : *base_ubuntu2204
2021-10-28 20:34:48 +00:00
resource_class : small
environment :
TERM : xterm
MAKEFLAGS : -j 2
2023-01-11 19:55:02 +00:00
- base_ubuntu2204_large : &base_ubuntu2204_large
<< : *base_ubuntu2204
2021-10-28 20:34:48 +00:00
resource_class : large
environment :
TERM : xterm
MAKEFLAGS : -j 5
2021-10-21 15:37:05 +00:00
2023-01-11 19:55:02 +00:00
- base_ubuntu2204_xlarge : &base_ubuntu2204_xlarge
<< : *base_ubuntu2204
2021-10-21 15:37:05 +00:00
resource_class : xlarge
environment :
TERM : xterm
MAKEFLAGS : -j 10
2023-02-16 17:08:59 +00:00
- base_win_bash : &base_win_bash
executor :
name : win/default
shell : bash.exe
2021-10-21 15:37:05 +00:00
- base_win_powershell : &base_win_powershell
executor :
name : win/default
shell : powershell.exe
2021-10-28 20:34:48 +00:00
- base_win_powershell_large : &base_win_powershell_large
executor :
name : win/default
shell : powershell.exe
size : large
2019-04-26 09:57:49 +00:00
# --------------------------------------------------------------------------
# Workflow Templates
- workflow_trigger_on_tags : &workflow_trigger_on_tags
filters :
tags :
only : /.*/
2021-10-22 12:07:19 +00:00
- workflow_trigger_on_releases : &workflow_trigger_on_releases
filters :
tags :
only : /^v.*/
branches :
ignore : /.*/
2023-01-11 19:55:02 +00:00
- workflow_ubuntu2204 : &workflow_ubuntu2204
2019-04-26 09:57:49 +00:00
<< : *workflow_trigger_on_tags
requires :
- b_ubu
2023-01-11 19:55:02 +00:00
- workflow_ubuntu2204_clang : &workflow_ubuntu2204_clang
2019-09-24 12:31:22 +00:00
<< : *workflow_trigger_on_tags
requires :
- b_ubu_clang
2023-01-11 19:55:02 +00:00
- workflow_ubuntu2204_force_release : &workflow_ubuntu2204_force_release
2019-09-06 14:36:16 +00:00
<< : *workflow_trigger_on_tags
requires :
2022-10-24 17:33:36 +00:00
- b_ubu_force_release
2019-09-06 14:36:16 +00:00
2023-02-14 13:31:11 +00:00
- workflow_ubuntu2004_static : &workflow_ubuntu2004_static
2021-12-07 15:34:07 +00:00
<< : *workflow_trigger_on_tags
requires :
- b_ubu_static
2020-09-08 08:28:42 +00:00
- workflow_archlinux : &workflow_archlinux
<< : *workflow_trigger_on_tags
requires :
- b_archlinux
2023-01-11 19:55:02 +00:00
- workflow_ubuntu2204_codecov : &workflow_ubuntu2204_codecov
2019-04-26 09:57:49 +00:00
<< : *workflow_trigger_on_tags
requires :
- b_ubu_codecov
- workflow_osx : &workflow_osx
<< : *workflow_trigger_on_tags
requires :
- b_osx
2023-01-11 19:55:02 +00:00
- workflow_ubuntu2204_asan : &workflow_ubuntu2204_asan
2019-04-26 09:57:49 +00:00
<< : *workflow_trigger_on_tags
requires :
- b_ubu_asan
2023-01-11 19:55:02 +00:00
- workflow_ubuntu2204_asan_clang : &workflow_ubuntu2204_asan_clang
2020-03-19 23:15:42 +00:00
<< : *workflow_trigger_on_tags
requires :
- b_ubu_asan_clang
2023-01-11 19:55:02 +00:00
- workflow_ubuntu2204_ubsan_clang : &workflow_ubuntu2204_ubsan_clang
2021-08-19 10:24:51 +00:00
<< : *workflow_trigger_on_tags
requires :
- b_ubu_ubsan_clang
2019-04-26 09:57:49 +00:00
- workflow_emscripten : &workflow_emscripten
<< : *workflow_trigger_on_tags
requires :
- b_ems
2020-02-20 14:32:28 +00:00
- workflow_ubuntu1604_ossfuzz : &workflow_ubuntu1604_ossfuzz
2019-04-26 09:57:49 +00:00
<< : *workflow_trigger_on_tags
requires :
- b_ubu_ossfuzz
2020-09-16 14:24:11 +00:00
- workflow_win : &workflow_win
<< : *workflow_trigger_on_tags
requires :
- b_win
2021-12-22 12:55:29 +00:00
# --------------------------------------------------------------------------
# Parameterized Job Templates
# Separate compile-only runs of those external tests where a full run takes much longer.
- job_ems_compile_ext_colony : &job_ems_compile_ext_colony
<< : *workflow_emscripten
name : t_ems_compile_ext_colony
project : colony
binary_type : solcjs
compile_only : 1
2022-05-24 13:23:20 +00:00
nodejs_version : '14.20'
python2 : true
2021-12-22 12:55:29 +00:00
- job_native_test_ext_gnosis : &job_native_test_ext_gnosis
2023-02-14 13:31:11 +00:00
<< : *workflow_ubuntu2004_static
2021-12-22 12:55:29 +00:00
name : t_native_test_ext_gnosis
project : gnosis
binary_type : native
2022-05-24 13:23:20 +00:00
nodejs_version : '16.18'
2021-12-22 12:55:29 +00:00
- job_native_test_ext_zeppelin : &job_native_test_ext_zeppelin
2023-02-14 13:31:11 +00:00
<< : *workflow_ubuntu2004_static
2021-12-22 12:55:29 +00:00
name : t_native_test_ext_zeppelin
project : zeppelin
binary_type : native
resource_class : large
- job_native_test_ext_ens : &job_native_test_ext_ens
2023-02-14 13:31:11 +00:00
<< : *workflow_ubuntu2004_static
2021-12-22 12:55:29 +00:00
name : t_native_test_ext_ens
project : ens
binary_type : native
2022-10-24 17:41:10 +00:00
nodejs_version : '18.11'
2021-12-22 12:55:29 +00:00
- job_native_test_ext_trident : &job_native_test_ext_trident
2023-02-14 13:31:11 +00:00
<< : *workflow_ubuntu2004_static
2021-12-22 12:55:29 +00:00
name : t_native_test_ext_trident
project : trident
binary_type : native
2022-05-24 13:23:20 +00:00
nodejs_version : '16.18'
2021-12-22 12:55:29 +00:00
- job_native_test_ext_euler : &job_native_test_ext_euler
2023-02-14 13:31:11 +00:00
<< : *workflow_ubuntu2004_static
2021-12-22 12:55:29 +00:00
name : t_native_test_ext_euler
project : euler
binary_type : native
2022-10-20 21:53:07 +00:00
resource_class : medium
2021-12-22 12:55:29 +00:00
- job_native_test_ext_yield_liquidator : &job_native_test_ext_yield_liquidator
2023-02-14 13:31:11 +00:00
<< : *workflow_ubuntu2004_static
2021-12-22 12:55:29 +00:00
name : t_native_test_ext_yield_liquidator
project : yield-liquidator
binary_type : native
- job_native_test_ext_bleeps : &job_native_test_ext_bleeps
2023-02-14 13:31:11 +00:00
<< : *workflow_ubuntu2004_static
2021-12-22 12:55:29 +00:00
name : t_native_test_ext_bleeps
project : bleeps
binary_type : native
resource_class : medium
2022-01-19 16:02:20 +00:00
- job_native_test_ext_pool_together : &job_native_test_ext_pool_together
2023-02-14 13:31:11 +00:00
<< : *workflow_ubuntu2004_static
2022-01-19 16:02:20 +00:00
name : t_native_test_ext_pool_together
project : pool-together
binary_type : native
2022-05-24 13:23:20 +00:00
nodejs_version : '16.18'
2022-01-19 16:05:43 +00:00
- job_native_test_ext_perpetual_pools : &job_native_test_ext_perpetual_pools
2023-02-14 13:31:11 +00:00
<< : *workflow_ubuntu2004_static
2022-01-19 16:05:43 +00:00
name : t_native_test_ext_perpetual_pools
project : perpetual-pools
binary_type : native
2022-10-24 17:41:10 +00:00
nodejs_version : '18.11'
2022-01-14 00:32:28 +00:00
- job_native_test_ext_uniswap : &job_native_test_ext_uniswap
2023-02-14 13:31:11 +00:00
<< : *workflow_ubuntu2004_static
2022-01-14 00:32:28 +00:00
name : t_native_test_ext_uniswap
project : uniswap
binary_type : native
2022-05-24 13:23:20 +00:00
nodejs_version : '16.18'
2022-01-24 13:01:58 +00:00
- job_native_test_ext_prb_math : &job_native_test_ext_prb_math
2023-02-14 13:31:11 +00:00
<< : *workflow_ubuntu2004_static
2022-01-17 10:26:57 +00:00
name : t_native_test_ext_prb_math
project : prb-math
binary_type : native
2022-10-24 17:41:10 +00:00
nodejs_version : '18.11'
2022-01-10 14:43:44 +00:00
- job_native_test_ext_elementfi : &job_native_test_ext_elementfi
2023-02-14 13:31:11 +00:00
<< : *workflow_ubuntu2004_static
2022-01-10 14:43:44 +00:00
name : t_native_test_ext_elementfi
project : elementfi
binary_type : native
resource_class : medium
2022-01-19 18:24:24 +00:00
- job_native_test_ext_brink : &job_native_test_ext_brink
2023-02-14 13:31:11 +00:00
<< : *workflow_ubuntu2004_static
2022-01-19 18:24:24 +00:00
name : t_native_test_ext_brink
project : brink
binary_type : native
2022-10-24 17:41:10 +00:00
nodejs_version : '18.11'
2022-01-24 12:50:30 +00:00
- job_native_test_ext_chainlink : &job_native_test_ext_chainlink
2023-02-14 13:31:11 +00:00
<< : *workflow_ubuntu2004_static
2022-01-24 12:50:30 +00:00
name : t_native_test_ext_chainlink
project : chainlink
binary_type : native
2022-05-24 13:23:20 +00:00
nodejs_version : '16.18'
2022-01-24 12:50:30 +00:00
resource_class : large # Tests run out of memory on a smaller machine
2022-01-11 19:26:28 +00:00
- job_native_test_ext_gp2 : &job_native_test_ext_gp2
2023-02-14 13:31:11 +00:00
<< : *workflow_ubuntu2004_static
2022-01-11 19:26:28 +00:00
name : t_native_test_ext_gp2
project : gp2
binary_type : native
2022-10-24 17:41:10 +00:00
nodejs_version : '18.11'
2021-12-22 12:55:29 +00:00
- job_ems_test_ext_colony : &job_ems_test_ext_colony
<< : *workflow_emscripten
name : t_ems_test_ext_colony
project : colony
binary_type : solcjs
2022-05-24 13:23:20 +00:00
nodejs_version : '14.20'
2021-12-22 12:55:29 +00:00
resource_class : medium
2022-05-24 13:23:20 +00:00
python2 : true
2021-12-22 12:55:29 +00:00
2021-09-04 10:07:18 +00:00
- job_b_ubu_asan_clang : &job_b_ubu_asan_clang
<< : *workflow_trigger_on_tags
name : b_ubu_asan_clang
cmake_options : -DSANITIZE=address
- job_b_ubu_ubsan_clang : &job_b_ubu_ubsan_clang
<< : *workflow_trigger_on_tags
name : b_ubu_ubsan_clang
2023-03-06 18:00:56 +00:00
cmake_options : -DSANITIZE=undefined
2021-09-04 10:07:18 +00:00
2019-04-26 09:57:49 +00:00
# -----------------------------------------------------------------------------------------------
2017-08-16 19:20:46 +00:00
jobs :
2019-04-26 09:57:49 +00:00
chk_spelling :
2021-10-28 20:34:48 +00:00
<< : *base_python_small
2017-08-16 19:20:46 +00:00
steps :
- checkout
2019-04-26 09:57:49 +00:00
- attach_workspace :
at : build
2017-09-14 21:13:37 +00:00
- run :
2019-04-26 09:57:49 +00:00
name : Install dependencies
2017-09-14 21:13:37 +00:00
command : |
2019-04-26 09:57:49 +00:00
pip install --user codespell
2017-09-14 21:13:37 +00:00
- run :
2019-04-26 09:57:49 +00:00
name : Check spelling
2022-08-18 13:28:12 +00:00
command : ~/.local/bin/codespell --skip "*.enc,.git,Dockerfile*,LICENSE,codespell_whitelist.txt,codespell_ignored_lines.txt" --ignore-words ./scripts/codespell_whitelist.txt --exclude-file ./scripts/codespell_ignored_lines.txt
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2019-01-31 13:22:02 +00:00
2019-08-05 11:00:30 +00:00
chk_docs_examples :
2022-02-04 23:03:53 +00:00
<< : *base_node_small
2019-08-05 11:00:30 +00:00
steps :
- checkout
- attach_workspace :
at : build
- run :
name : JS deps
command : sudo npm install -g solhint
- run :
name : Test Docs examples
command : ./test/docsCodeStyle.sh
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2019-08-05 11:00:30 +00:00
2019-04-26 09:57:49 +00:00
chk_coding_style :
2022-05-24 13:27:15 +00:00
<< : *base_cimg_small
2018-02-08 22:43:05 +00:00
steps :
- checkout
2020-03-31 18:05:58 +00:00
- run :
name : Install shellcheck
2022-05-24 13:27:15 +00:00
command : |
sudo apt -q update
sudo apt install -y shellcheck
2018-02-08 22:43:05 +00:00
- run :
2019-04-26 09:57:49 +00:00
name : Check for C++ coding style
command : ./scripts/check_style.sh
2020-03-31 18:05:58 +00:00
- run :
name : checking shell scripts
command : ./scripts/chk_shellscripts/chk_shellscripts.sh
2020-11-19 00:14:13 +00:00
- run :
name : Check for broken symlinks
command : ./scripts/check_symlinks.sh
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2019-01-31 13:22:02 +00:00
2020-05-27 10:13:37 +00:00
chk_errorcodes :
2021-10-28 20:34:48 +00:00
<< : *base_python_small
2020-05-27 10:13:37 +00:00
steps :
- checkout
- run :
name : Check for error codes
2020-06-27 23:46:42 +00:00
command : ./scripts/error_codes.py --check
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2020-05-27 10:13:37 +00:00
2020-01-15 13:19:13 +00:00
chk_pylint :
2022-05-24 13:27:15 +00:00
<< : *base_cimg_small
2020-01-15 13:19:13 +00:00
steps :
- checkout
- run :
name : Install pip
2022-05-24 13:27:15 +00:00
command : |
sudo apt -q update
sudo apt install -y python3-pip
2020-01-15 13:19:13 +00:00
- run :
2022-03-18 21:46:36 +00:00
name : Install pylint and dependencies of the scripts that will be linted
command : python3 -m pip install
pylint
z3-solver
pygments-lexer-solidity
parsec
tabulate
deepdiff
colorama
requests
2022-06-01 18:19:12 +00:00
- run : pylint --version
2020-01-15 13:19:13 +00:00
- run :
name : Linting Python Scripts
command : ./scripts/pylint_all.py
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2020-01-15 13:19:13 +00:00
2020-03-11 12:03:57 +00:00
chk_antlr_grammar :
2022-05-24 13:27:15 +00:00
<< : *base_cimg_small
2020-03-11 12:03:57 +00:00
steps :
- checkout
- run :
name : Install Java
2022-05-24 13:27:15 +00:00
command : |
sudo apt -q update
2022-10-24 17:21:05 +00:00
sudo apt install -y openjdk-17-jdk
2020-03-11 12:03:57 +00:00
- run :
name : Run tests
command : ./scripts/test_antlr_grammar.sh
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2020-03-11 12:03:57 +00:00
2019-04-26 09:57:49 +00:00
chk_buglist :
2022-02-04 23:03:53 +00:00
<< : *base_node_small
2018-02-09 16:21:36 +00:00
steps :
- checkout
- run :
2019-04-26 09:57:49 +00:00
name : JS deps
2018-02-09 16:21:36 +00:00
command : |
2019-04-26 09:57:49 +00:00
npm install download
npm install JSONPath
npm install mktemp
- run :
name : Test buglist
command : ./test/buglistTests.js
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2019-04-01 14:19:53 +00:00
2019-04-26 09:57:49 +00:00
chk_proofs :
2022-05-24 13:27:15 +00:00
<< : *base_cimg_small
2019-04-01 14:19:53 +00:00
steps :
- checkout
2017-09-14 21:13:37 +00:00
- run :
2019-04-26 09:57:49 +00:00
name : Z3 python deps
2017-09-14 21:13:37 +00:00
command : |
2022-05-24 13:27:15 +00:00
sudo apt-get -qq update
sudo apt-get -qy install python3-pip
2020-04-22 08:20:52 +00:00
pip3 install --user z3-solver
2019-04-26 09:57:49 +00:00
- run : *run_proofs
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2019-01-31 13:22:02 +00:00
2020-04-01 16:16:47 +00:00
chk_docs_pragma_min_version :
2023-01-11 19:55:02 +00:00
<< : *base_ubuntu2204_small
2020-04-01 16:16:47 +00:00
steps :
- checkout
- run : *run_docs_pragma_min_version
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2020-04-01 16:16:47 +00:00
2021-10-21 15:56:50 +00:00
t_ubu_pyscripts :
2023-01-11 19:55:02 +00:00
<< : *base_ubuntu2204_small
2021-01-19 14:48:39 +00:00
steps :
- checkout
- run :
name : Python unit tests
command : python3 test/pyscriptTests.py
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2021-01-19 14:48:39 +00:00
2021-10-21 15:56:50 +00:00
t_win_pyscripts :
2021-10-21 15:37:05 +00:00
<< : *base_win_powershell
2021-01-19 14:48:39 +00:00
steps :
- run : git config --global core.autocrlf false
- checkout
- run :
name : Python unit tests
command : python.exe test/pyscriptTests.py
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2021-01-19 14:48:39 +00:00
2021-08-31 13:03:58 +00:00
b_ubu : &b_ubu
2021-10-28 20:34:48 +00:00
# this runs 2x faster on xlarge but takes 4x more resources (compared to medium).
# Enough other jobs depend on it that it's worth it though.
2023-01-11 19:55:02 +00:00
<< : *base_ubuntu2204_xlarge
2022-02-08 13:55:49 +00:00
<< : *steps_build
2021-08-31 13:03:58 +00:00
# x64 ASAN build, for testing for memory related bugs
b_ubu_asan : &b_ubu_asan
2021-10-28 20:34:48 +00:00
# Runs slightly faster on large and xlarge but we only run it nightly so efficiency matters more.
2023-01-11 19:55:02 +00:00
<< : *base_ubuntu2204
2021-08-31 13:03:58 +00:00
environment :
CMAKE_OPTIONS : -DSANITIZE=address
2021-10-28 20:34:48 +00:00
MAKEFLAGS : -j 3
2021-08-31 13:03:58 +00:00
CMAKE_BUILD_TYPE : Release
2021-09-04 10:07:18 +00:00
<< : *steps_build
2021-08-31 13:03:58 +00:00
2021-08-25 11:20:00 +00:00
b_ubu_clang : &b_ubu_clang
2023-01-11 19:55:02 +00:00
<< : *base_ubuntu2204_clang_large
2021-11-05 16:26:52 +00:00
environment :
TERM : xterm
CC : clang
CXX : clang++
MAKEFLAGS : -j 10
2021-09-04 10:07:18 +00:00
<< : *steps_build
2019-09-24 12:31:22 +00:00
2021-09-04 10:07:18 +00:00
b_ubu_san_clang :
2021-10-28 20:34:48 +00:00
# This runs a bit faster on large and xlarge but on nightly efficiency matters more.
2021-09-04 10:07:18 +00:00
parameters :
cmake_options :
type : string
2023-01-11 19:55:02 +00:00
<< : *base_ubuntu2204_clang
2021-08-19 10:24:51 +00:00
environment :
2021-09-04 10:07:18 +00:00
TERM : xterm
2021-08-19 10:24:51 +00:00
CC : clang
CXX : clang++
MAKEFLAGS : -j 3
2021-09-04 10:07:18 +00:00
CMAKE_OPTIONS : << parameters.cmake_options >>
2021-09-04 10:07:18 +00:00
<< : *steps_build
2021-08-19 10:24:51 +00:00
2022-10-24 17:33:36 +00:00
b_ubu_force_release : &b_ubu_force_release
2021-08-25 11:20:00 +00:00
<< : *b_ubu
2019-09-06 14:36:16 +00:00
environment :
FORCE_RELEASE : ON
2020-07-28 15:30:40 +00:00
MAKEFLAGS : -j 10
2019-09-06 14:36:16 +00:00
2020-09-30 12:49:27 +00:00
b_ubu_static :
2023-02-14 13:31:11 +00:00
# We temporarily keep building static release binaries on ubuntu 20.04
# to avoid glibc incompatibilities.
# See: https://github.com/ethereum/solidity/issues/13954
2021-12-07 15:34:07 +00:00
# On large runs 2x faster than on medium. 3x on xlarge.
2023-02-14 13:31:11 +00:00
<< : *base_ubuntu2004_xlarge
2020-09-30 12:49:27 +00:00
environment :
2021-12-07 15:34:07 +00:00
TERM : xterm
MAKEFLAGS : -j 10
2020-12-03 01:06:30 +00:00
CMAKE_OPTIONS : -DCMAKE_BUILD_TYPE=Release -DUSE_Z3_DLOPEN=ON -DUSE_CVC4=OFF -DSOLC_STATIC_STDLIBS=ON
2020-09-30 12:49:27 +00:00
steps :
- checkout
- run : *run_build
- run :
name : strip binary
command : strip build/solc/solc
2023-02-14 13:31:11 +00:00
- store_artifacts :
path : build/solc/solc
destination : solc-static-linux
- run : mv build/solc/solc build/solc/solc-static-linux
- persist_to_workspace :
root : build
paths :
- solc/solc-static-linux
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2020-09-30 12:49:27 +00:00
2019-04-26 09:57:49 +00:00
b_ubu_codecov :
2021-10-28 20:34:48 +00:00
# Runs ~30% faster on large but we only run it nightly so efficiency matters more.
2023-01-11 19:55:02 +00:00
<< : *base_ubuntu2204
2019-04-01 22:38:14 +00:00
environment :
2019-04-26 09:57:49 +00:00
COVERAGE : ON
CMAKE_BUILD_TYPE : Debug
2021-10-28 20:34:48 +00:00
MAKEFLAGS : -j 3
2019-04-26 09:57:49 +00:00
steps :
- checkout
- run : *run_build
2020-10-14 20:51:22 +00:00
- persist_to_workspace : *artifacts_executables
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2019-04-26 09:57:49 +00:00
t_ubu_codecov :
2023-01-11 19:55:02 +00:00
<< : *base_ubuntu2204_large
2019-04-26 09:57:49 +00:00
environment :
2021-08-31 10:08:35 +00:00
EVM : << pipeline.parameters.evm-version >>
2019-04-26 09:57:49 +00:00
OPTIMIZE : 1
2019-04-01 22:38:14 +00:00
steps :
- checkout
- attach_workspace :
2019-04-26 09:57:49 +00:00
at : build
2019-04-01 22:38:14 +00:00
- run :
2019-04-26 09:57:49 +00:00
name : "soltest: Syntax Tests"
2019-07-17 09:05:44 +00:00
command : build/test/soltest -t 'syntaxTest*' -- --testpath test
2019-04-01 22:38:14 +00:00
- run :
2019-04-26 09:57:49 +00:00
name : "Code Coverage: Syntax Tests"
command : codecov --flags syntax --gcov-root build
- run : *run_soltest
- run :
name : "Coverage: All"
command : codecov --flags all --gcov-root build
- store_artifacts : *artifacts_test_results
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2019-04-01 22:38:14 +00:00
2019-08-09 09:28:22 +00:00
# Builds in C++20 mode and uses debug build in order to speed up.
2019-04-26 09:57:49 +00:00
# Do *NOT* store any artifacts or workspace as we don't run tests on this build.
2019-08-09 09:28:22 +00:00
b_ubu_cxx20 :
2023-01-11 19:55:02 +00:00
<< : *base_ubuntu2204_large
2018-05-10 12:43:08 +00:00
environment :
2019-04-26 09:57:49 +00:00
CMAKE_BUILD_TYPE : Debug
2020-07-22 14:20:59 +00:00
CMAKE_OPTIONS : -DCMAKE_CXX_STANDARD=20 -DUSE_CVC4=OFF
2021-11-05 16:26:52 +00:00
MAKEFLAGS : -j 10
2018-02-08 15:12:04 +00:00
steps :
- checkout
2018-05-02 13:42:34 +00:00
- run : *run_build
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2018-04-26 11:38:20 +00:00
2021-08-25 11:20:00 +00:00
b_ubu_ossfuzz : &b_ubu_ossfuzz
2021-10-21 15:37:05 +00:00
<< : *base_ubuntu1604_clang
2019-01-31 13:22:02 +00:00
steps :
- checkout
- run : *setup_prerelease_commit_hash
2019-04-26 09:57:49 +00:00
- run : *run_build_ossfuzz
- persist_to_workspace : *artifacts_executables_ossfuzz
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2019-01-31 13:22:02 +00:00
2019-04-26 09:57:49 +00:00
t_ubu_ossfuzz : &t_ubu_ossfuzz
2021-10-28 20:34:48 +00:00
<< : *base_ubuntu1604_clang_small
2018-11-08 13:28:25 +00:00
steps :
2019-04-26 09:57:49 +00:00
- checkout
- attach_workspace :
at : build
2018-11-08 13:28:25 +00:00
- run :
2019-04-26 09:57:49 +00:00
name : Regression tests
2018-11-08 13:28:25 +00:00
command : |
2020-02-18 07:18:21 +00:00
git clone https://github.com/ethereum/solidity-fuzzing-corpus /tmp/solidity-fuzzing-corpus
2019-04-26 09:57:49 +00:00
mkdir -p test_results
scripts/regressions.py -o test_results
- store_test_results : *store_test_results
- store_artifacts : *artifacts_test_results
2018-11-08 13:28:25 +00:00
2019-04-26 09:57:49 +00:00
b_archlinux :
2021-10-28 20:34:48 +00:00
<< : *base_archlinux_large
2018-10-16 12:21:18 +00:00
environment :
TERM : xterm
2021-10-28 20:34:48 +00:00
MAKEFLAGS : -j 5
2023-04-05 12:55:57 +00:00
# This can be switched off if we run out of sync with Arch.
USE_Z3 : ON
2018-10-16 12:21:18 +00:00
steps :
2019-08-06 11:50:01 +00:00
- run :
name : Install build dependencies
command : |
2022-07-26 15:38:55 +00:00
pacman --noconfirm -Syu --noprogressbar --needed base-devel boost cmake cvc4 git openssh tar
2018-10-16 12:21:18 +00:00
- checkout
- run : *run_build
2019-04-26 09:57:49 +00:00
- store_artifacts : *artifacts_solc
- persist_to_workspace : *artifacts_executables
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2018-10-16 12:21:18 +00:00
2019-04-26 09:57:49 +00:00
b_osx :
2022-01-14 21:30:55 +00:00
<< : *base_osx_large
2018-05-10 12:43:08 +00:00
environment :
TERM : xterm
2020-05-20 16:05:40 +00:00
CMAKE_BUILD_TYPE : Release
2022-01-14 21:30:55 +00:00
MAKEFLAGS : -j10
2018-04-26 11:38:20 +00:00
steps :
- checkout
2022-04-11 13:54:56 +00:00
- when :
condition : true
<< : *steps_install_dependencies_osx
2018-05-02 13:42:34 +00:00
- run : *run_build
2019-04-26 09:57:49 +00:00
- store_artifacts : *artifacts_solc
2021-10-21 14:51:37 +00:00
- store_artifacts : *artifact_yul_phaser
2020-10-14 21:24:35 +00:00
- persist_to_workspace :
root : .
paths :
- build/solc/solc
- build/test/soltest
- build/test/tools/solfuzzer
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2019-09-20 00:39:25 +00:00
2021-09-04 10:07:18 +00:00
t_osx_soltest : &t_osx_soltest
2021-10-21 15:37:05 +00:00
<< : *base_osx
2019-09-20 00:39:25 +00:00
environment :
2021-08-31 10:08:35 +00:00
EVM : << pipeline.parameters.evm-version >>
2019-09-20 00:39:25 +00:00
OPTIMIZE : 0
TERM : xterm
steps :
- checkout
2021-09-04 10:07:18 +00:00
- when :
condition : true
<< : *steps_install_dependencies_osx
2022-04-11 13:54:56 +00:00
- attach_workspace :
at : .
2019-09-20 00:39:25 +00:00
- run : *run_soltest
- store_test_results : *store_test_results
- store_artifacts : *artifacts_test_results
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2018-02-26 18:33:03 +00:00
2019-04-26 09:57:49 +00:00
t_osx_cli :
2021-10-21 15:37:05 +00:00
<< : *base_osx
2018-07-10 07:15:39 +00:00
steps :
- checkout
2021-09-04 10:07:18 +00:00
- when :
condition : true
<< : *steps_install_dependencies_osx
2022-04-11 13:54:56 +00:00
- attach_workspace :
at : .
2019-04-26 09:57:49 +00:00
- run : *run_cmdline_tests
- store_artifacts : *artifacts_test_results
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2018-09-04 15:17:07 +00:00
2019-04-26 09:57:49 +00:00
b_ems :
2021-10-28 20:34:48 +00:00
<< : *base_ems_large
2021-11-05 16:26:52 +00:00
environment :
TERM : xterm
MAKEFLAGS : -j 10
2018-08-21 14:09:53 +00:00
steps :
- checkout
- run :
2019-04-26 09:57:49 +00:00
name : Build
command : |
2020-10-19 15:57:22 +00:00
scripts/ci/build_emscripten.sh
2019-04-26 09:57:49 +00:00
- store_artifacts :
2021-11-09 17:07:15 +00:00
path : upload/soljson.js
2019-04-26 09:57:49 +00:00
destination : soljson.js
- run : mkdir -p workspace
2021-11-09 17:07:15 +00:00
- run : cp upload/soljson.js workspace/soljson.js
2019-04-26 09:57:49 +00:00
- run : scripts/get_version.sh > workspace/version.txt
- persist_to_workspace :
root : workspace
paths :
- soljson.js
- version.txt
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2018-08-03 11:55:44 +00:00
2019-04-26 09:57:49 +00:00
b_docs :
2023-01-11 19:55:02 +00:00
<< : *base_ubuntu2204_small
2018-02-26 18:33:03 +00:00
steps :
- checkout
2019-04-26 09:57:49 +00:00
- run : *setup_prerelease_commit_hash
2018-07-23 11:29:55 +00:00
- run :
2019-04-26 09:57:49 +00:00
name : Build documentation
2022-04-07 12:32:06 +00:00
command : ./docs/docs.sh
2018-10-11 15:01:06 +00:00
- store_artifacts :
2019-04-26 09:57:49 +00:00
path : docs/_build/html/
destination : docs-html
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2018-04-26 11:38:20 +00:00
2021-10-21 15:56:50 +00:00
t_ubu_soltest_all : &t_ubu_soltest_all
2023-01-11 19:55:02 +00:00
<< : *base_ubuntu2204_large
2021-12-20 18:03:48 +00:00
parallelism : 50
2021-10-21 15:12:03 +00:00
<< : *steps_soltest_all
2019-08-14 13:43:24 +00:00
2021-12-13 13:53:40 +00:00
t_ubu_lsp : &t_ubu_lsp
2023-01-11 19:55:02 +00:00
<< : *base_ubuntu2204_small
2021-12-13 13:53:40 +00:00
<< : *steps_test_lsp
2020-09-08 08:28:42 +00:00
t_archlinux_soltest : &t_archlinux_soltest
2021-10-21 15:37:05 +00:00
<< : *base_archlinux
2021-12-20 18:03:48 +00:00
parallelism : 20
2021-10-21 15:37:05 +00:00
environment :
EVM : << pipeline.parameters.evm-version >>
OPTIMIZE : 0
TERM : xterm
# 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.
2022-07-26 15:38:55 +00:00
SOLTEST_FLAGS : --no -semantic-tests --no-smt
2021-10-21 15:37:05 +00:00
steps :
- run :
name : Install runtime dependencies
command : |
pacman --noconfirm -Syu --noprogressbar --needed base-devel boost cmake z3 cvc4 git openssh tar
- when :
condition : true
<< : *steps_soltest
2020-09-08 08:28:42 +00:00
2019-09-24 12:31:22 +00:00
t_ubu_clang_soltest : &t_ubu_clang_soltest
2023-01-11 19:55:02 +00:00
<< : *base_ubuntu2204_clang
2021-12-20 18:03:48 +00:00
parallelism : 20
2019-09-24 12:31:22 +00:00
environment :
2021-08-31 10:08:35 +00:00
EVM : << pipeline.parameters.evm-version >>
2019-09-24 12:31:22 +00:00
OPTIMIZE : 0
2022-08-30 09:02:14 +00:00
# The high parallelism in this job is causing the SMT tests to run out of memory,
# so disabling for now.
SOLTEST_FLAGS : --no -smt
2021-10-21 15:12:03 +00:00
<< : *steps_soltest
2019-09-24 12:31:22 +00:00
2022-10-24 17:33:36 +00:00
t_ubu_force_release_soltest_all : &t_ubu_force_release_soltest_all
2021-10-21 15:12:03 +00:00
# NOTE: This definition is identical to t_ubu_soltest_all but in the workflow we make it depend on
2022-10-24 17:33:36 +00:00
# a different job (b_ubu_force_release) so the workspace it attaches contains a different executable.
2021-10-21 15:56:50 +00:00
<< : *t_ubu_soltest_all
2019-09-06 14:36:16 +00:00
2019-04-26 09:57:49 +00:00
t_ubu_cli : &t_ubu_cli
2023-01-11 19:55:02 +00:00
<< : *base_ubuntu2204_small
2021-08-31 13:03:58 +00:00
<< : *steps_cmdline_tests
2019-01-28 13:51:47 +00:00
2022-10-24 17:33:36 +00:00
t_ubu_force_release_cli : &t_ubu_force_release_cli
2019-09-06 14:36:16 +00:00
<< : *t_ubu_cli
2022-02-25 18:21:58 +00:00
t_ubu_locale :
2023-01-11 19:55:02 +00:00
<< : *base_ubuntu2204_small
2022-02-25 18:21:58 +00:00
steps :
- checkout
- attach_workspace :
at : build
- run : test/localeTest.sh build/solc/solc
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2022-02-25 18:21:58 +00:00
2019-04-26 09:57:49 +00:00
t_ubu_asan_cli :
2021-10-28 20:34:48 +00:00
# Runs slightly faster on medium but we only run it nightly so efficiency matters more.
2023-01-11 19:55:02 +00:00
<< : *base_ubuntu2204
2018-11-08 13:28:25 +00:00
environment :
TERM : xterm
2019-04-26 09:57:49 +00:00
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
2023-01-30 12:22:58 +00:00
# Suppress CLN memory leak.
# See: https://github.com/ethereum/solidity/issues/13891 for details.
2023-02-02 08:48:43 +00:00
LSAN_OPTIONS : suppressions=/root/project/.circleci/cln-asan.supp:print_suppressions=0
2021-08-31 13:03:58 +00:00
<< : *steps_cmdline_tests
2018-11-08 13:28:25 +00:00
2021-10-21 15:56:50 +00:00
t_ubu_asan_soltest :
2023-01-11 19:55:02 +00:00
<< : *base_ubuntu2204
2021-12-20 18:03:48 +00:00
parallelism : 20
2019-04-26 09:57:49 +00:00
environment :
2021-08-31 10:08:35 +00:00
EVM : << pipeline.parameters.evm-version >>
2019-04-26 09:57:49 +00:00
OPTIMIZE : 0
2019-11-04 08:48:35 +00:00
SOLTEST_FLAGS : --no -smt
2019-04-26 09:57:49 +00:00
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
2023-01-30 12:22:58 +00:00
# Suppress CLN memory leak.
# See: https://github.com/ethereum/solidity/issues/13891 for details.
2023-02-02 08:48:43 +00:00
LSAN_OPTIONS : suppressions=/root/project/.circleci/cln-asan.supp
2021-10-21 15:12:03 +00:00
<< : *steps_soltest
2019-04-26 09:57:49 +00:00
2021-10-21 15:56:50 +00:00
t_ubu_asan_clang_soltest :
2023-01-11 19:55:02 +00:00
<< : *base_ubuntu2204_clang
2021-12-20 18:03:48 +00:00
parallelism : 20
2020-03-19 23:15:42 +00:00
environment :
2021-08-31 10:08:35 +00:00
EVM : << pipeline.parameters.evm-version >>
2020-03-19 23:15:42 +00:00
OPTIMIZE : 0
SOLTEST_FLAGS : --no -smt
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
2021-10-21 15:12:03 +00:00
<< : *steps_soltest
2020-03-19 23:15:42 +00:00
2021-10-21 15:56:50 +00:00
t_ubu_ubsan_clang_soltest :
2023-01-11 19:55:02 +00:00
<< : *base_ubuntu2204_clang
2021-12-20 18:03:48 +00:00
parallelism : 20
2021-08-31 10:08:35 +00:00
environment :
EVM : << pipeline.parameters.evm-version >>
2022-02-14 10:48:56 +00:00
SOLTEST_FLAGS : --no -smt
2021-10-21 16:46:04 +00:00
<< : *steps_soltest
2021-08-19 10:24:51 +00:00
t_ubu_ubsan_clang_cli :
2023-01-11 19:55:02 +00:00
<< : *base_ubuntu2204_clang
2021-10-21 16:46:04 +00:00
<< : *steps_cmdline_tests
2021-08-19 10:24:51 +00:00
2019-04-26 09:57:49 +00:00
t_ems_solcjs :
2021-10-28 20:34:48 +00:00
# Unlike other t_ems jobs this one actually runs 2x faster on medium (compared to small).
2023-01-11 19:55:02 +00:00
<< : *base_ubuntu2204
2018-04-26 11:38:20 +00:00
steps :
- checkout
- attach_workspace :
2019-04-26 09:57:49 +00:00
at : /tmp/workspace
2019-09-17 14:06:43 +00:00
- run :
name : Install test dependencies
command : |
apt-get update
2021-05-19 15:35:19 +00:00
apt-get install -qqy --no-install-recommends nodejs npm
2018-04-26 11:38:20 +00:00
- run :
2019-04-26 09:57:49 +00:00
name : Test solcjs
2020-09-08 06:18:27 +00:00
no_output_timeout : 30m
2018-04-26 11:38:20 +00:00
command : |
2019-04-26 09:57:49 +00:00
node --version
npm --version
2019-09-25 13:59:52 +00:00
test/externalTests/solc-js/solc-js.sh /tmp/workspace/soljson.js $(cat /tmp/workspace/version.txt)
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2018-02-08 15:12:04 +00:00
2021-10-20 09:56:52 +00:00
t_ems_ext_hardhat :
2022-02-04 23:03:53 +00:00
<< : *base_node_small
2022-02-04 23:04:20 +00:00
docker :
2022-10-24 17:41:10 +00:00
- image : cimg/node:18.11
2021-10-20 09:56:52 +00:00
environment :
TERM : xterm
HARDHAT_TESTS_SOLC_PATH : /tmp/workspace/soljson.js
steps :
- checkout
- attach_workspace :
at : /tmp/workspace
- run : git clone --depth 1 https://github.com/nomiclabs/hardhat.git
- run :
name : Install dependencies
command : |
cd hardhat
yarn
- run :
name : Run hardhat-core test suite
command : |
HARDHAT_TESTS_SOLC_VERSION=$(scripts/get_version.sh)
export HARDHAT_TESTS_SOLC_VERSION
# NOTE: This is expected to work without running `yarn build` first.
cd hardhat/packages/hardhat-core
yarn test
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2021-10-20 09:56:52 +00:00
2020-12-09 12:07:21 +00:00
t_ems_ext :
2020-12-09 11:54:38 +00:00
parameters :
project :
type : string
2021-12-07 15:30:25 +00:00
binary_type :
type : enum
enum :
- solcjs
- native
2020-12-09 12:07:21 +00:00
compile_only :
2020-12-09 11:54:38 +00:00
type : integer
2020-12-09 12:07:21 +00:00
default : 0
2020-12-09 11:54:38 +00:00
nodejs_version :
2021-11-05 16:38:25 +00:00
type : string
2022-05-24 13:23:20 +00:00
default : current
2021-10-28 20:34:48 +00:00
resource_class :
type : string
default : small
2022-05-24 13:23:20 +00:00
python2 :
type : boolean
default : false
2019-11-20 23:00:27 +00:00
docker :
2022-05-24 13:23:20 +00:00
- image : cimg/node:<<parameters.nodejs_version>>
2021-10-28 20:34:48 +00:00
resource_class : <<parameters.resource_class>>
2021-12-09 14:35:16 +00:00
# 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.
parallelism : 6
2019-11-20 23:00:27 +00:00
environment :
TERM : xterm
2020-12-09 12:07:21 +00:00
COMPILE_ONLY : <<parameters.compile_only>>
2019-11-20 23:00:27 +00:00
steps :
- checkout
- attach_workspace :
at : /tmp/workspace
- run :
2021-12-07 15:30:25 +00:00
name : Install lsof
2020-12-02 00:39:07 +00:00
command : |
2020-12-09 11:54:38 +00:00
# lsof is used by Colony in its stop-blockchain-client.sh script
2022-05-24 13:23:20 +00:00
sudo apt update
2021-12-07 15:30:25 +00:00
sudo apt-get --quiet --assume-yes --no-install-recommends install lsof
2022-05-24 13:23:20 +00:00
- 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
2021-12-07 15:30:25 +00:00
- when :
condition :
equal : [ << parameters.binary_type >>, "solcjs"]
steps :
- run :
name : External <<parameters.project>> tests (solcjs)
command : |
test/externalTests/<<parameters.project>>.sh solcjs /tmp/workspace/soljson.js
- when :
condition :
equal : [ << parameters.binary_type >>, "native"]
steps :
- run :
name : External <<parameters.project>> tests (native)
command : |
2023-02-14 13:31:11 +00:00
test/externalTests/<<parameters.project>>.sh native /tmp/workspace/solc/solc-static-linux
2021-12-17 23:36:30 +00:00
- store_artifacts :
path : reports/externalTests/
# persist_to_workspace fails if the directory does not exist and the test script will create
# it only if it actually has benchmark results.
- run : mkdir -p reports/externalTests/
- persist_to_workspace :
root : .
paths :
- reports/externalTests/
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2020-12-02 00:39:07 +00:00
2021-12-22 16:45:20 +00:00
c_ext_benchmarks :
<< : *base_node_small
steps :
- checkout
- attach_workspace :
at : .
2022-03-21 13:26:09 +00:00
- run :
name : Install dependencies of helper scripts
command : |
sudo apt update
sudo apt install python3-pip --assume-yes --no-install-recommends
python3 -m pip install requests --user
2021-12-22 16:45:20 +00:00
- run :
name : Combine benchmark reports
command : cat reports/externalTests/benchmark-*.json | scripts/externalTests/merge_benchmarks.sh > reports/externalTests/all-benchmarks.json
- run :
name : Summarize reports
command : cat reports/externalTests/all-benchmarks.json | scripts/externalTests/summarize_benchmarks.sh > reports/externalTests/summarized-benchmarks.json
2022-03-21 13:26:09 +00:00
- run :
name : Download reports from base branch
command : |
if [[ $CIRCLE_PULL_REQUEST != "" ]]; then
mkdir reports/externalTests/base-branch/
cd reports/externalTests/base-branch/
pr_id=$(echo "$CIRCLE_PULL_REQUEST" | sed 's|\(.*\)\/||')
scripts_dir=../../../scripts
2022-06-06 18:26:57 +00:00
# Our main goal here is to provide new benchmarks, the diff is optional. When benchmarks from
# the previous run are not available for whatever reason, we still succeed and just skip the diff.
# download_benchmarks.py exits with status 2 in that case.
if "${scripts_dir}/externalTests/download_benchmarks.py" --base-of-pr "$pr_id" || [[ $? == 2 ]]; then
echo 'export SKIP_BENCHMARK_DIFF=true' >> $BASH_ENV
fi
2022-03-21 13:26:09 +00:00
fi
- run :
name : Diff benchmarks
command : |
2022-06-06 18:26:57 +00:00
if [[ $CIRCLE_PULL_REQUEST != "" && $SKIP_BENCHMARK_DIFF != "true" ]]; then
2022-03-21 13:26:09 +00:00
cd reports/externalTests/
mkdir diff/
scripts_dir=../../scripts
"${scripts_dir}/externalTests/benchmark_diff.py" table \
--output-format markdown \
--style humanized \
base-branch/summarized-benchmarks-*.json \
summarized-benchmarks.json > diff/benchmark-diff-summarized-table-markdown-humanized.md
"${scripts_dir}/externalTests/benchmark_diff.py" table \
--output-format markdown \
--style absolute \
base-branch/summarized-benchmarks-*.json \
summarized-benchmarks.json > diff/benchmark-diff-summarized-table-markdown-absolute.md
"${scripts_dir}/externalTests/benchmark_diff.py" inplace \
--style absolute \
base-branch/summarized-benchmarks-*.json \
summarized-benchmarks.json > diff/benchmark-diff-summarized-inplace-absolute.md
"${scripts_dir}/externalTests/benchmark_diff.py" inplace \
--style absolute \
base-branch/all-benchmarks-*.json \
all-benchmarks.json > diff/benchmark-diff-all-table-inplace-absolute.md
fi
2021-12-22 16:45:20 +00:00
- store_artifacts :
path : reports/externalTests/all-benchmarks.json
- store_artifacts :
path : reports/externalTests/summarized-benchmarks.json
2022-03-21 13:26:09 +00:00
- store_artifacts :
path : reports/externalTests/diff/
- store_artifacts :
path : reports/externalTests/base-branch/
2021-12-22 16:45:20 +00:00
2020-07-22 14:22:21 +00:00
b_win : &b_win
2021-10-28 20:34:48 +00:00
<< : *base_win_powershell_large
2020-09-15 12:47:30 +00:00
steps :
2021-01-20 15:46:15 +00:00
# NOTE: Not disabling git's core.autocrlf here because we want to build using the typical Windows config.
2020-09-15 12:47:30 +00:00
- checkout
- restore_cache :
keys :
2021-10-07 16:09:18 +00:00
- dependencies-win-{{ arch }}-{{ checksum "scripts/install_deps.ps1" }}
2020-10-14 20:32:08 +00:00
# DO NOT EDIT between here and save_cache, but rather edit .\scripts\install_deps.ps1
2020-10-16 09:42:20 +00:00
# WARNING! If you do edit anything here instead, remember to invalidate the cache manually.
- run :
2020-09-15 12:47:30 +00:00
name : "Installing dependencies"
2020-10-14 20:32:08 +00:00
command : .\scripts\install_deps.ps1
2020-09-15 12:47:30 +00:00
- save_cache :
2021-10-07 16:09:18 +00:00
key : dependencies-win-{{ arch }}-{{ checksum "scripts/install_deps.ps1" }}
2020-09-15 12:47:30 +00:00
paths :
2020-10-14 20:32:08 +00:00
- .\deps
2020-09-15 12:47:30 +00:00
- run :
name : "Building solidity"
command : .circleci/build_win.ps1
2020-09-17 12:46:24 +00:00
- run :
name : "Run solc.exe to make sure build was successful."
command : .\build\solc\Release\solc.exe --version
2020-09-15 12:47:30 +00:00
- store_artifacts : *artifact_solc_windows
2020-10-14 20:51:22 +00:00
- persist_to_workspace :
root : build
paths :
- .\solc\*\solc.exe
- .\test\*\soltest.exe
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2020-09-15 12:47:30 +00:00
2021-10-21 15:56:50 +00:00
t_win_soltest : &t_win_soltest
2021-10-21 15:37:05 +00:00
<< : *base_win_powershell
2020-09-16 14:24:11 +00:00
steps :
2021-01-20 15:46:15 +00:00
# NOTE: Git's default core.autocrlf is fine for running soltest. We get additional coverage
# for files using CRLF that way.
2020-09-16 14:24:11 +00:00
- checkout
- attach_workspace :
at : build
- run :
name : "Install evmone"
command : scripts/install_evmone.ps1
- run :
name : "Run soltest"
command : .circleci/soltest.ps1
2022-03-16 14:44:52 +00:00
- run :
name : Install LSP test dependencies
command : python -m pip install --user deepdiff colorama
2022-04-25 15:21:45 +00:00
- run :
name : Inspect lsp.py
command : Get-Content ./test/lsp.py
2022-03-16 14:44:52 +00:00
- run :
name : Executing solc LSP test suite
2022-05-30 17:51:43 +00:00
command : python ./test/lsp.py .\build\solc\Release\solc.exe --non-interactive
2020-10-15 17:11:17 +00:00
- store_test_results : *store_test_results
2020-09-16 14:24:11 +00:00
- store_artifacts : *artifacts_test_results
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2020-09-16 14:24:11 +00:00
2023-02-14 13:31:11 +00:00
# Note: b_bytecode_ubu_static is required because b_ubu_static and b_ubu
# are currently built on different Ubuntu base images.
# It can be safely removed once we move both to the same Ubuntu version.
b_bytecode_ubu_static :
<< : *base_ubuntu2004_small
environment :
TERM : xterm
MAKEFLAGS : -j 2
LC_ALL : C
steps :
- checkout
- attach_workspace :
at : build
- prepare_bytecode_report :
label : "ubuntu2004-static"
binary_path : "../build/solc/solc-static-linux"
2020-10-14 16:26:18 +00:00
b_bytecode_ubu :
2023-01-11 19:55:02 +00:00
<< : *base_ubuntu2204_small
2022-05-24 13:27:15 +00:00
environment :
TERM : xterm
MAKEFLAGS : -j 2
LC_ALL : C
2020-10-14 16:26:18 +00:00
steps :
- checkout
- attach_workspace :
at : build
2022-04-11 09:50:10 +00:00
- prepare_bytecode_report :
label : "ubuntu"
2023-02-14 13:31:11 +00:00
binary_path : "../build/solc/solc"
2020-10-14 16:26:18 +00:00
b_bytecode_osx :
2021-10-21 15:37:05 +00:00
<< : *base_osx
2022-05-24 13:27:15 +00:00
environment :
TERM : xterm
MAKEFLAGS : -j 5
LC_ALL : C
2020-10-14 16:26:18 +00:00
steps :
- checkout
- attach_workspace :
2020-10-14 21:24:35 +00:00
at : .
2022-04-11 09:50:10 +00:00
- prepare_bytecode_report :
label : "osx"
2023-02-14 13:31:11 +00:00
binary_path : "../build/solc/solc"
2020-10-14 16:26:18 +00:00
b_bytecode_win :
2022-05-31 13:51:50 +00:00
<< : *base_win_bash
environment :
LC_ALL : C
2020-10-14 16:26:18 +00:00
steps :
2021-01-20 15:46:15 +00:00
# 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.
- run : git config --global core.autocrlf false
2020-10-14 16:26:18 +00:00
- checkout
2023-02-14 13:31:11 +00:00
# Ensure windows has python3 alias required by prepare_bytecode_report
- run : ln -s /c/tools/miniconda3/python /c/tools/miniconda3/python3
2020-10-14 16:26:18 +00:00
- attach_workspace :
at : build
2023-02-14 13:31:11 +00:00
- prepare_bytecode_report :
label : "windows"
binary_path : "../build/solc/Release/solc.exe"
2020-10-14 16:26:18 +00:00
b_bytecode_ems :
2022-02-04 23:03:53 +00:00
<< : *base_node_small
2020-10-14 16:26:18 +00:00
environment :
SOLC_EMSCRIPTEN : "On"
2022-05-24 13:27:15 +00:00
LC_ALL : C
2020-10-14 16:26:18 +00:00
steps :
- checkout
- attach_workspace :
at : emscripten_build/libsolc
2020-12-22 09:08:04 +00:00
- run : scripts/bytecodecompare/storebytecode.sh && mv -v report.txt bytecode-report-emscripten.txt
2020-10-14 16:26:18 +00:00
- store_artifacts :
2020-12-22 09:08:04 +00:00
path : bytecode-report-emscripten.txt
2020-10-14 16:26:18 +00:00
- persist_to_workspace :
root : .
paths :
- bytecode-report-emscripten.txt
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2020-10-14 16:26:18 +00:00
t_bytecode_compare :
2023-01-11 19:55:02 +00:00
<< : *base_ubuntu2204_small
2021-04-14 18:48:35 +00:00
environment :
REPORT_FILES : |
bytecode-report-emscripten.txt
2023-02-14 13:31:11 +00:00
bytecode-report-ubuntu2004-static-json.txt
bytecode-report-ubuntu2004-static-cli.txt
2021-04-14 18:48:35 +00:00
bytecode-report-ubuntu-json.txt
bytecode-report-ubuntu-cli.txt
bytecode-report-osx-json.txt
bytecode-report-osx-cli.txt
bytecode-report-windows-json.txt
bytecode-report-windows-cli.txt
2020-10-14 16:26:18 +00:00
steps :
- attach_workspace :
at : .
2021-04-14 18:48:35 +00:00
- run :
name : Compare reports
command : diff --brief --report-identical-files --from-file $REPORT_FILES
- run :
name : Print diff
when : on_fail
command : diff --unified=0 --report-identical-files --from-file $REPORT_FILES | head --lines 50
2021-04-14 18:48:40 +00:00
- run :
name : Bundle reports into a single package
when : on_fail
command : zip all-bytecode-reports.zip $REPORT_FILES
- store_artifacts :
# NOTE: store_artifacts does not support the 'when' attribute.
# Fortunately when the artifact does not exist it just says "No artifact files found" and ignores it.
path : all-bytecode-reports.zip
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
2020-10-14 16:26:18 +00:00
2021-10-22 12:07:19 +00:00
c_release_binaries :
2023-01-11 19:55:02 +00:00
<< : *base_ubuntu2204
2021-10-22 12:07:19 +00:00
steps :
- checkout
- attach_workspace :
at : workspace
- run :
name : Gather and rename binaries from dependent jobs
command : |
mkdir github/
2023-02-14 13:31:11 +00:00
cp workspace/solc/solc-static-linux github/solc-static-linux
cp workspace/build/solc/solc github/solc-macos
cp workspace/solc/Release/solc.exe github/solc-windows.exe
cp workspace/soljson.js github/soljson.js
2021-10-22 12:07:19 +00:00
cd github/
tar --create --file ../github-binaries.tar *
- store_artifacts :
path : github-binaries.tar
- run :
name : Rename binaries to solc-bin naming convention
command : |
full_version=$(
github/solc-static-linux --version |
sed -En 's/^Version : ([0-9.]+.*\+commit\.[0-9a-f]+(\.mod)?).*$/\1/p'
)
mkdir -p solc-bin/{linux-amd64,macosx-amd64,windows-amd64,bin}
2022-06-15 16:03:14 +00:00
mv github/solc-static-linux "solc-bin/linux-amd64/solc-linux-amd64-v${full_version}"
mv github/solc-macos "solc-bin/macosx-amd64/solc-macosx-amd64-v${full_version}"
mv github/solc-windows.exe "solc-bin/windows-amd64/solc-windows-amd64-v${full_version}.exe"
mv github/soljson.js "solc-bin/bin/soljson-v${full_version}.js"
2021-10-22 12:07:19 +00:00
cd solc-bin/
tar --create --file ../solc-bin-binaries.tar *
- store_artifacts :
path : solc-bin-binaries.tar
2023-02-27 11:35:53 +00:00
- matrix_notify_failure_unless_pr
- matrix_notify_release_unless_pr
2021-10-22 12:07:19 +00:00
2018-02-08 15:12:04 +00:00
workflows :
version : 2
2019-04-26 09:57:49 +00:00
main :
2018-02-08 15:12:04 +00:00
jobs :
2019-04-26 09:57:49 +00:00
# basic checks
- chk_spelling : *workflow_trigger_on_tags
- chk_coding_style : *workflow_trigger_on_tags
2019-09-16 17:06:50 +00:00
# DISABLED FOR 0.6.0 - chk_docs_examples: *workflow_trigger_on_tags
2019-04-26 09:57:49 +00:00
- chk_buglist : *workflow_trigger_on_tags
- chk_proofs : *workflow_trigger_on_tags
2020-01-15 13:19:13 +00:00
- chk_pylint : *workflow_trigger_on_tags
2020-05-27 10:13:37 +00:00
- chk_errorcodes : *workflow_trigger_on_tags
2020-03-11 12:03:57 +00:00
- chk_antlr_grammar : *workflow_trigger_on_tags
2020-04-01 16:16:47 +00:00
- chk_docs_pragma_min_version : *workflow_trigger_on_tags
2021-10-21 15:56:50 +00:00
- t_ubu_pyscripts : *workflow_trigger_on_tags
- t_win_pyscripts : *workflow_trigger_on_tags
2019-04-26 09:57:49 +00:00
# build-only
- b_docs : *workflow_trigger_on_tags
2023-01-11 20:46:26 +00:00
# DISABLED FOR 0.8.18 - b_ubu_cxx20: *workflow_trigger_on_tags
# Issue: https://github.com/ethereum/solidity/issues/13868
2020-02-03 10:55:53 +00:00
- b_ubu_ossfuzz : *workflow_trigger_on_tags
2019-04-26 09:57:49 +00:00
# OS/X build and tests
- b_osx : *workflow_trigger_on_tags
- t_osx_cli : *workflow_osx
2019-09-20 00:39:25 +00:00
- t_osx_soltest : *workflow_osx
2019-04-26 09:57:49 +00:00
2020-09-08 08:28:42 +00:00
# ArchLinux build and tests
- b_archlinux : *workflow_trigger_on_tags
- t_archlinux_soltest : *workflow_archlinux
2020-09-30 12:49:27 +00:00
# Static build
- b_ubu_static : *workflow_trigger_on_tags
2019-08-14 13:43:24 +00:00
# Ubuntu build and tests
2019-04-26 09:57:49 +00:00
- b_ubu : *workflow_trigger_on_tags
2023-01-11 19:55:02 +00:00
- t_ubu_cli : *workflow_ubuntu2204
- t_ubu_locale : *workflow_ubuntu2204
- t_ubu_soltest_all : *workflow_ubuntu2204
2019-09-24 12:31:22 +00:00
- b_ubu_clang : *workflow_trigger_on_tags
2023-01-11 19:55:02 +00:00
- t_ubu_clang_soltest : *workflow_ubuntu2204_clang
- t_ubu_lsp : *workflow_ubuntu2204
2019-04-26 09:57:49 +00:00
2019-09-06 14:36:16 +00:00
# Ubuntu fake release build and tests
2022-10-24 17:33:36 +00:00
- b_ubu_force_release : *workflow_trigger_on_tags
2023-01-11 19:55:02 +00:00
- t_ubu_force_release_cli : *workflow_ubuntu2204_force_release
- t_ubu_force_release_soltest_all : *workflow_ubuntu2204_force_release
2019-09-06 14:36:16 +00:00
2020-12-01 22:58:29 +00:00
# Emscripten build and tests that take 15 minutes or less
2019-04-26 09:57:49 +00:00
- b_ems : *workflow_trigger_on_tags
- t_ems_solcjs : *workflow_emscripten
2021-10-20 09:56:52 +00:00
- t_ems_ext_hardhat : *workflow_emscripten
2020-12-09 11:54:38 +00:00
2021-12-22 12:55:29 +00:00
- t_ems_ext : *job_ems_compile_ext_colony
2020-12-09 11:54:38 +00:00
2021-10-26 09:12:45 +00:00
- t_ems_ext : *job_native_test_ext_gnosis
2021-12-22 12:55:29 +00:00
- t_ems_ext : *job_native_test_ext_zeppelin
- t_ems_ext : *job_native_test_ext_ens
- t_ems_ext : *job_native_test_ext_trident
- t_ems_ext : *job_native_test_ext_euler
- t_ems_ext : *job_native_test_ext_yield_liquidator
2022-02-04 14:18:37 +00:00
- t_ems_ext : *job_native_test_ext_bleeps
2022-01-19 16:02:20 +00:00
- t_ems_ext : *job_native_test_ext_pool_together
2022-01-19 16:05:43 +00:00
- t_ems_ext : *job_native_test_ext_perpetual_pools
2022-01-14 00:32:28 +00:00
- t_ems_ext : *job_native_test_ext_uniswap
2022-01-24 13:01:58 +00:00
- t_ems_ext : *job_native_test_ext_prb_math
2022-01-10 14:43:44 +00:00
- t_ems_ext : *job_native_test_ext_elementfi
2022-01-19 18:24:24 +00:00
- t_ems_ext : *job_native_test_ext_brink
2022-01-24 12:50:30 +00:00
- t_ems_ext : *job_native_test_ext_chainlink
2022-01-11 19:26:28 +00:00
- t_ems_ext : *job_native_test_ext_gp2
2019-04-26 09:57:49 +00:00
2021-12-22 16:45:20 +00:00
- c_ext_benchmarks :
<< : *workflow_trigger_on_tags
requires :
- t_ems_compile_ext_colony
2021-10-26 09:12:45 +00:00
- t_native_test_ext_gnosis
2021-12-22 16:45:20 +00:00
- t_native_test_ext_zeppelin
- t_native_test_ext_ens
- t_native_test_ext_trident
- t_native_test_ext_euler
- t_native_test_ext_yield_liquidator
- t_native_test_ext_bleeps
- t_native_test_ext_pool_together
- t_native_test_ext_perpetual_pools
- t_native_test_ext_uniswap
- t_native_test_ext_prb_math
- t_native_test_ext_elementfi
2022-01-19 18:24:24 +00:00
- t_native_test_ext_brink
2022-01-24 12:50:30 +00:00
- t_native_test_ext_chainlink
2022-01-11 19:26:28 +00:00
- t_native_test_ext_gp2
2021-12-22 16:45:20 +00:00
2020-09-15 12:47:30 +00:00
# Windows build and tests
- b_win : *workflow_trigger_on_tags
2021-10-21 15:56:50 +00:00
- t_win_soltest : *workflow_win
2020-09-15 12:47:30 +00:00
2020-10-14 16:26:18 +00:00
# Bytecode comparison:
2023-02-14 13:31:11 +00:00
- b_bytecode_ubu_static :
<< : *workflow_trigger_on_tags
requires :
- b_ubu_static
2020-10-14 16:26:18 +00:00
- b_bytecode_ubu :
2021-12-22 16:43:37 +00:00
<< : *workflow_trigger_on_tags
2020-10-14 16:26:18 +00:00
requires :
- b_ubu
- b_bytecode_win :
2021-12-22 16:43:37 +00:00
<< : *workflow_trigger_on_tags
2020-10-14 16:26:18 +00:00
requires :
- b_win
- b_bytecode_osx :
2021-12-22 16:43:37 +00:00
<< : *workflow_trigger_on_tags
2020-10-14 16:26:18 +00:00
requires :
- b_osx
- b_bytecode_ems :
2021-12-22 16:43:37 +00:00
<< : *workflow_trigger_on_tags
2020-10-14 16:26:18 +00:00
requires :
- b_ems
- t_bytecode_compare :
2021-12-22 16:43:37 +00:00
<< : *workflow_trigger_on_tags
2020-10-14 16:26:18 +00:00
requires :
2023-02-14 13:31:11 +00:00
- b_bytecode_ubu_static
2020-10-14 16:26:18 +00:00
- b_bytecode_ubu
- b_bytecode_win
- b_bytecode_osx
- b_bytecode_ems
2021-10-22 12:07:19 +00:00
# Final artifacts
- c_release_binaries :
<< : *workflow_trigger_on_releases
requires :
- b_ubu_static
- b_osx
2022-05-24 13:06:53 +00:00
- b_win
2021-10-22 12:07:19 +00:00
- b_ems
2019-04-26 09:57:49 +00:00
nightly :
2019-03-27 13:22:09 +00:00
triggers :
- schedule :
cron : "0 0 * * *"
filters :
branches :
only :
- develop
2019-04-26 09:57:49 +00:00
2019-03-27 13:22:09 +00:00
jobs :
2019-04-26 09:57:49 +00:00
# OSSFUZZ builds and (regression) tests
2020-02-03 10:55:53 +00:00
- b_ubu_ossfuzz : *workflow_trigger_on_tags
2020-02-20 14:32:28 +00:00
- t_ubu_ossfuzz : *workflow_ubuntu1604_ossfuzz
2019-04-26 09:57:49 +00:00
# Code Coverage enabled build and tests
- b_ubu_codecov : *workflow_trigger_on_tags
2023-01-11 19:55:02 +00:00
- t_ubu_codecov : *workflow_ubuntu2204_codecov
2020-08-24 18:11:02 +00:00
# ASan build and tests
- b_ubu_asan : *workflow_trigger_on_tags
2021-09-04 10:07:18 +00:00
- b_ubu_san_clang : *job_b_ubu_asan_clang
2023-01-11 19:55:02 +00:00
- t_ubu_asan_soltest : *workflow_ubuntu2204_asan
- t_ubu_asan_clang_soltest : *workflow_ubuntu2204_asan_clang
- t_ubu_asan_cli : *workflow_ubuntu2204_asan
2020-12-01 22:58:29 +00:00
2021-08-19 10:24:51 +00:00
# UBSan build and tests
2021-09-04 10:07:18 +00:00
- b_ubu_san_clang : *job_b_ubu_ubsan_clang
2023-01-11 19:55:02 +00:00
- t_ubu_ubsan_clang_soltest : *workflow_ubuntu2204_ubsan_clang
- t_ubu_ubsan_clang_cli : *workflow_ubuntu2204_ubsan_clang
2021-08-19 10:24:51 +00:00
2020-12-01 22:58:29 +00:00
# Emscripten build and tests that take more than 15 minutes to execute
- b_ems : *workflow_trigger_on_tags
2021-12-22 12:55:29 +00:00
- t_ems_ext : *job_ems_test_ext_colony