-
Notifications
You must be signed in to change notification settings - Fork 0
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
[sc-24168] Add cargo-dylint #9
[sc-24168] Add cargo-dylint #9
Conversation
Looks good to me but I'd like the thing to be tested before you tag tools and modify First you need to build an Then you need to copy it in your working copy of Then you need to patch the --- a/Dockerfile
+++ b/Dockerfile
@@ -55,12 +55,10 @@ ENV RUSTUP_HOME=/root/.rustup
WORKDIR /usr/src/impero
RUN curl https://sh.rustup.rs -sSf \
| sh -s -- --profile minimal --default-toolchain "$RUST_TOOLCHAIN" -y
+Copy x86_64.zip x86_64.zip
# Fetch tools needed for development
RUN ARCH="$(uname -m)"; \
- TAG="5.1"; \
- URL="https://github.com/impero-com/docker-image-tools/releases/download/$TAG/$ARCH.zip"; \
MOLD_VERSION="1.4.1"; \
- curl -OL -H 'Accept: application/octet-stream' $URL && \
unzip $ARCH.zip && rm $ARCH.zip && \
chmod -R +x $ARCH && mv $ARCH/* $HOME/.cargo/bin/ && rm -r $ARCH && \
curl -OL "https://github.com/rui314/mold/releases/download/v$MOLD_VERSION/mold-$MOLD_VERSION-$ARCH-linux.tar.gz" && \ Then you need to build the image on your machine. And then you need to test by patching the Once happy:
|
803fbdb
to
e4c84ad
Compare
.github/workflows/ci.yml
Outdated
file /tmp/x86_64-unknown-linux-gnu/penguin | ||
/tmp/x86_64-unknown-linux-gnu/sccache --help | ||
/tmp/x86_64-unknown-linux-gnu/diesel --help | ||
/tmp/x86_64-unknown-linux-gnu/diesel_ext --help | ||
/tmp/x86_64-unknown-linux-gnu/cargo-audit --help | ||
/tmp/x86_64-unknown-linux-gnu/cargo-watch --help | ||
RUSTUP_TOOLCHAIN="stable" /tmp/x86_64-unknown-linux-gnu/cargo-dylint --help |
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 is on purpose - dylint tools relies on rustup
(even for --help, I made a ticket in GH for that), and since we don't have rustup
in the worker (we do have inside of a docker), we can fake it by setting this env variable.
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.
e4c84ad
to
7c37ce6
Compare
cargo-dylint is a tool for compiling, linking and running dynamically linked, custom lints in our workspace.
Tested on:
cargo dylint --all
- with a success.