-
Notifications
You must be signed in to change notification settings - Fork 12
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
ci(circleci): move forward to CircleCI #49
Conversation
- restore_cargo_package_cache | ||
- run: | ||
name: Run Tests | ||
command: cargo test --all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- restore_cargo_package_cache | ||
- run: | ||
name: clippy check | ||
command: cargo clippy --all-targets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* ci(cache): download sccahce binary directly * ci(cach): sudo privilege to moving sccache binary * ci(cache): use x86_64 sccache for the testing machine * ci(cache): correct the url of sccache resource * ci(sccache): clean the indent * ci(security): requires reust_setup only * ci(cache): use optional feature to run rust_setup conditionally * ci(rust_setup): fix installing sccache * ci(rust_setup): clean rust_setup * ci(workflow): requires prefetch-cache * ci(format): add rust_setup to format job * ci(cache): add sccache to rust_setup * ci(curl): fix the test script about downloading from links * ci(condition): use if-else * ci(prefetch): remove prefetch-crates * ci(security): force installing rust-toolchain in job security * ci(cache): use cache for security checking * ci(security): remove os deps in security check * ci(chore): uppercase job names
Finished, @mattsse , it could be faster if we cache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! however I've configured Circleci only a couple of time so I may have missed something.
- docker-publish-latest | ||
filters: | ||
tags: | ||
only: /^v.*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this tag for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will trigger publishing chainsafe/pint:x.x.x
images everytime we tagging PINT with vx.x.x
in github
IMAGE_NAME: chainsafe/pint | ||
CARGO_AUDIT: /home/circleci/.cargo/bin/cargo-audit | ||
RUSTC_WRAPPER: /home/circleci/.cargo/bin/sccache | ||
RUSTC_TOOLCHAIN: nightly-2021-04-18 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's best practice for selecting nightly toolchain. lastest
can be incomplete sometimes, right? Is there any downside of setting this randomly to a recent date like we do here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using $ curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
follows installation with specified nightly
channel will download the lastest nightly rust.
But I think using a specified version of rust can help us reduce the time modifying CI, substrate updates really fast, and sometimes the latest toolchains have bugs for compiling substrate.
For example, there was a big change in the rust compiler after 2020-10-05
, substrate could not be compiled with the latest toolchains for months, and rust toolchains after 2020-03-13
, have bugs compiling the debug info in wasm32-unknown-unknown target
Changes
Use CircleCI instead of Github actions
Both of the above are squashed into the
.circleci/config.yml
nowTests
Here is a testing CI on my fork clearloop/PINTIssues
This PR moved the docker CI to CircleCI as welltarget/**/*
, but it's not elegantCloses #47