-
-
Notifications
You must be signed in to change notification settings - Fork 48
Minor CI improvements #703
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
Changes from all commits
c865cb7
4b47aba
f06f07f
4336fb0
c09609f
f208370
ca1713a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,17 +27,13 @@ RUN apk add \ | |
| openssh | ||
|
|
||
| # The default `cargo` and `rust` packages in Alpine repo don't include important | ||
| # rust dev components like `rust-src` (std lib sources), `rustfmt`, `clippy`, etc. | ||
| # In any case, it's much better to use rustup for rust toolchain management. | ||
| # Also, this lives in a separate RUN statement to cache this step separately, as | ||
| # it's quite slow to install. | ||
| RUN --mount=source=./scripts/lib.sh,target=./scripts/lib.sh \ | ||
| --mount=source=./scripts/install/rust.sh,target=./scripts/install/rust.sh \ | ||
| --mount=source=./rust-toolchain.toml,target=./rust-toolchain.toml \ | ||
| ./scripts/install/rust.sh | ||
|
|
||
| RUN --mount=source=./scripts,target=./scripts \ | ||
| ./scripts/install/shellcheck.sh \ | ||
| # components like `rust-src` (std lib sources), `rustfmt`, and `clippy`. | ||
| # It's also more conventional to use rustup for rust toolchain management. | ||
| COPY scripts scripts | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The comment above gives some reasoning to keep rust installation in a separate RUN statement. So let's either follow that comment or remove it as it became stale.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Edited the comment |
||
| COPY rust-toolchain.toml rust-toolchain.toml | ||
|
|
||
| RUN ./scripts/install/rust.sh \ | ||
| && ./scripts/install/shellcheck.sh \ | ||
| && ./scripts/install/typos.sh | ||
|
|
||
| # `/shell-history` dir is persisted across container rebuilds/restarts | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| ** | ||
| !docker/app/Dockerfile | ||
| !scripts | ||
| !rust-toolchain.toml |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| ** | ||
| !docker/mediaproc/Dockerfile | ||
| !docker/mediaproc/safe-rsvg-convert | ||
| !native/philomena | ||
| native/philomena/target |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| ** | ||
| !docker/web/Dockerfile |
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.
Not sure what the problem is with a build mount. This way scripts used only during build don't end up in the final image, which anyway uses a volume mount of the repo workspace at the same location and thus shadows these scripts
Uh oh!
There was an error while loading. Please reload this page.
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.
It comes from a previous attempt to use buildx with GHA cache in which having a build-time bind mount present completely prevents caching the layer (since the inputs to the build are no longer static and can't be digested)
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.
Makes sense