ci: Run clippy and test for every feature individually
This commit is contained in:
parent
f0679fdd11
commit
37a69df832
3 changed files with 24 additions and 4 deletions
18
Earthfile
18
Earthfile
|
|
@ -37,15 +37,27 @@ lint:
|
|||
DO rust+CARGO --args="clippy"
|
||||
DO rust+CARGO --args="clippy --all-features"
|
||||
DO rust+CARGO --args="clippy --no-default-features"
|
||||
DO rust+CARGO --args="clippy --no-default-features --features stages"
|
||||
DO rust+CARGO --args="clippy --no-default-features --features copy"
|
||||
DO rust+CARGO --args="clippy --no-default-features --features multi-recipe"
|
||||
DO rust+CARGO --args="clippy --no-default-features --features iso"
|
||||
DO rust+CARGO --args="clippy --no-default-features --features switch"
|
||||
DO rust+CARGO --args="clippy --no-default-features --features sigstore"
|
||||
|
||||
test:
|
||||
FROM +common
|
||||
COPY --dir test-files/ integration-tests/ /app
|
||||
COPY +cosign/cosign /usr/bin/cosign
|
||||
|
||||
DO rust+CARGO --args="test --workspace -- --show-output"
|
||||
DO rust+CARGO --args="test --workspace --all-features -- --show-output"
|
||||
DO rust+CARGO --args="test --workspace --no-default-features -- --show-output"
|
||||
DO rust+CARGO --args="test --workspace"
|
||||
DO rust+CARGO --args="test --workspace --all-features"
|
||||
DO rust+CARGO --args="test --workspace --no-default-features"
|
||||
DO rust+CARGO --args="test --workspace --no-default-features --features stages"
|
||||
DO rust+CARGO --args="test --workspace --no-default-features --features copy"
|
||||
DO rust+CARGO --args="test --workspace --no-default-features --features multi-recipe"
|
||||
DO rust+CARGO --args="test --workspace --no-default-features --features iso"
|
||||
DO rust+CARGO --args="test --workspace --no-default-features --features switch"
|
||||
DO rust+CARGO --args="test --workspace --no-default-features --features sigstore"
|
||||
|
||||
install:
|
||||
FROM +common
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ impl BlueBuildCommand for GenerateIsoCommand {
|
|||
#[cfg(not(feature = "multi-recipe"))]
|
||||
let mut build_command = {
|
||||
BuildCommand::builder()
|
||||
.recipe(recipe.to_path_buf())
|
||||
.recipe(recipe.clone())
|
||||
.archive(image_out_dir.path())
|
||||
.build()
|
||||
};
|
||||
|
|
|
|||
|
|
@ -66,12 +66,20 @@ impl BlueBuildCommand for SwitchCommand {
|
|||
let tempdir = TempDir::new("oci-archive").into_diagnostic()?;
|
||||
trace!("{tempdir:?}");
|
||||
|
||||
#[cfg(feature = "multi-recipe")]
|
||||
BuildCommand::builder()
|
||||
.recipe([self.recipe.clone()])
|
||||
.archive(tempdir.path())
|
||||
.force(self.force)
|
||||
.build()
|
||||
.try_run()?;
|
||||
#[cfg(not(feature = "multi-recipe"))]
|
||||
BuildCommand::builder()
|
||||
.recipe(self.recipe.clone())
|
||||
.archive(tempdir.path())
|
||||
.force(self.force)
|
||||
.build()
|
||||
.try_run()?;
|
||||
|
||||
let recipe = Recipe::parse(&self.recipe)?;
|
||||
let image_file_name = format!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue