Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify and deduplicate CircleCI config #11846

Open
10 tasks
cameel opened this issue Aug 26, 2021 · 2 comments
Open
10 tasks

Simplify and deduplicate CircleCI config #11846

cameel opened this issue Aug 26, 2021 · 2 comments

Comments

@cameel
Copy link
Task lists! Give feedback
Member

@cameel cameel commented Aug 26, 2021

This came up in #11823.

Our .circleci/config.yml file is pretty long. I went through the file and here's a bunch of changes that we could do to improve it.

Deduplication:

  • t_archlinux_soltest, t_ubu_soltest_enforce_yul, t_ubu_ubsan_clang and t_ubu_ubsan_clang_cli could use run_soltest_steps.
    • Note that run_soltest_steps cannot be added to an existing list of steps but it you could probably embed inside a step by using a when parameter of a run step.
  • Some jobs look very similar. Perhaps they could be replaced by a single job with parameters (see t_ems_ext job for an example; also Reusable Config Reference Guide). If not, it might at least be possible to extract reusable steps from them:
    • b_ubu_clang, b_ubu_asan_clang and b_ubu_ubsan_clang.
    • t_osx_soltest and t_osx_cli.
    • b_bytecode_ubu, b_bytecode_osx and b_bytecode_win.
  • Many jobs set the TERM variable to xterm. I think it would not hurt to just have it set once, globally, so that we do not have to worry about it.

Refactors:

  • All the test_ templates (e.g. test_ubuntu1604_clang or t_ubu_soltest) seem a bit pointless because their steps are almost always overwritten. And when they're not, they're misleading because it's not apparent which steps they run just from their name. For example test_ubuntu2004 runs soltest_all while test_ubuntu2004_clang runs only soltest. And after #11823 (comment) it's easy to explicitly specify their steps directly in the job anyway. I think that a better system would be to convert these templates into base dicts that just set the base docker image (maybe also parallelism and resource class). I'd remove steps from them (move them to jobs). I'd use image_ or base_ prefix instead of test_ and rename the section.

Cleanup:

  • I think we do not need to run the nightly workflow on the develop_060 branch. Do we even still have that branch? We're already at 0.8.x.
  • There are some dicts like run_soltest_all_steps that actually contain steps: key rather than run:. They should be renamed to start with steps_. E.g. steps_soltest_all
  • All the run_ steps should be moved to the Build Templates section.
  • b_ubu_asan should be moved next to b_ubu_asan_clang.
@cameel
Copy link
Member Author

@cameel cameel commented Aug 27, 2021

Great! Which one you'd like to try? I think it would be best to do it step by step, with small focused PRs, instead of creating a big one fixing it all in one go. I expect this will require some trial and error and a full CI run takes about 1h.

@mspaansen
Copy link

@mspaansen mspaansen commented Aug 31, 2021

😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Solidity
  
New issues
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants