-
Notifications
You must be signed in to change notification settings - Fork 377
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
Add cross-dev and cross-util commands. #767
Conversation
I've separated this into many different commits, since this is a large PR and refactors some logic. Each I think is a relatively independent commit, and some of them (such as the removal of the duplicate This also changes the target-info the use Rust rather than bash on the host machine, so the logic is simpler as was mentioned in comment (although using a bash script inside the container still makes sense). |
Is this better now? I incorporated some of the changes, but thought it would be a bit better to provide a The changes I've made include:
#[derive(Debug, PartialOrd, Ord, PartialEq, Eq)]
struct Image {
repository: String,
tag: String,
// need to remove images by ID, not just tag
id: String,
} If all is good, I'll squash the commits to remove some unnecessary ones. |
.github/workflows/ci.yml
Outdated
@@ -249,6 +249,10 @@ jobs: | |||
if: matrix.deploy | |||
run: cargo install --path . --force | |||
|
|||
- name: Install cross-dev | |||
if: matrix.deploy | |||
run: cargo install --path cross-dev --force |
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.
run: cargo install --path cross-dev --force | |
run: cargo install --bin cross-dev --path . --force --features dev |
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.
actually, this is wrong, we should just make sure to always check if it builds
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.
So remove matrix.deploy
, and then just add cargo build --features=dev
?
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.
specifying --bin cross-dev
should be done too, to avoid unsync between needed features and the ci stage
Add `list-images` and `remove-images` subcommands. `list-images` lists all cross images, including local development files. `remove-images` removes cross images. ```bash cross-util list-images cross-util remove-images cross-util remove-images arm-unknown-linux-gnueabihf ``` `remove-images` also accepts the following flags: - `-f`, `--force`: force removal of images. - `-l`, `--local`: also remove local development images. - `-e`, `--execute`: remove the images, rather than a dry run. Both commands accept the additional flags: - `-v`, `--verbose`: print verbose diagnostic output. - `--engine`: specify the container engine to use.
Add `target-info` subcommands. This provides the target info for the provided targets, or all targets if none are provided. ```bash cross-dev target-info cross-dev target-info arm-unknown-linux-gnueabihf ``` `target-info` also accepts the following flags: - `-v`, `--verbose`: print verbose diagnostic output. - `--engine`: specify the container engine to use. - `--registry`: the registry for the image. - `--repository`: the repository for the image. - `--tag`: the tag for the image. Other changes: - Updated the CI to test building `cross-dev`. - Add target info support for Dragonfly.
I think that's everything. If anything else needs to be patched, let me know, then I'll squash the commits since we have a few... extras. I've:
|
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.
bors r+
767: Add cross-dev and cross-util commands. r=Emilgardis a=Alexhuszagh The cross-dev command has the `target-info` subcommand, which target information (libc, compiler, C++, qemu version) for a given target. ```bash cross-dev target-info cross-dev target-info arm-unknown-linux-gnueabihf ``` The cross-util command has the `list-images` and `remove-images` subcommands. `list-images` lists all cross images, including local development files. `remove-images` removes cross images. ```bash cross-util list-images cross-util remove-images cross-util remove-images arm-unknown-linux-gnueabihf ``` Closes #760. Co-authored-by: Alex Huszagh <[email protected]>
bors r- oh yeah you wanted to squash? |
Canceled. |
Already did. bors r=Emilgardis |
Build succeeded: |
The cross-dev command has the
target-info
subcommand, which target information (libc, compiler, C++, qemu version) for a given target.The cross-util command has the
list-images
andremove-images
subcommands.list-images
lists all cross images, including local development files.remove-images
removes cross images.Closes #760.