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
|
|
||
| - name: Install cross-dev | ||
| if: matrix.deploy | ||
| run: cargo install --path cross-dev --force |
There was a problem hiding this comment.
| run: cargo install --path cross-dev --force | |
| run: cargo install --bin cross-dev --path . --force --features dev |
There was a problem hiding this comment.
actually, this is wrong, we should just make sure to always check if it builds
There was a problem hiding this comment.
So remove matrix.deploy, and then just add cargo build --features=dev?
There was a problem hiding this comment.
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:
|
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 <ahuszagh@gmail.com>
|
bors r- oh yeah you wanted to squash? |
|
Canceled. |
Already did. bors r=Emilgardis |
|
Build succeeded: |
The cross-dev command has the
target-infosubcommand, which target information (libc, compiler, C++, qemu version) for a given target.The cross-util command has the
list-imagesandremove-imagessubcommands.list-imageslists all cross images, including local development files.remove-imagesremoves cross images.Closes #760.