Skip to content

Commit

Permalink
fixup! build: move from make to cargo xtask workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ErichDonGubler committed Jun 7, 2023
1 parent e98aa59 commit 337c760
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
6 changes: 0 additions & 6 deletions xtask/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Usage: xtask <COMMAND>
Commands:
all
bench [--clean]
clean
validate
dot
glsl
Expand Down Expand Up @@ -52,7 +51,6 @@ impl Args {
#[derive(Debug)]
pub(crate) enum Subcommand {
All,
Clean,
Bench { clean: bool },
Validate(ValidateSubcommand),
}
Expand All @@ -67,10 +65,6 @@ impl Subcommand {
ensure_remaining_args_empty(args)?;
Ok(Self::All)
}
Some("clean") => {
ensure_remaining_args_empty(args)?;
Ok(Self::Clean)
}
Some("bench") => {
let clean = args.contains("--clean");
ensure_remaining_args_empty(args)?;
Expand Down
18 changes: 1 addition & 17 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use cli::Args;

use crate::{
cli::{Subcommand, ValidateHlslCommand, ValidateSubcommand},
fs::{open_file, remove_dir_all, remove_file},
fs::{open_file, remove_dir_all},
glob::visit_files,
path::join_path,
process::{which, EasyCommand},
Expand Down Expand Up @@ -66,22 +66,6 @@ fn run(args: Args) -> anyhow::Result<()> {
.success()?;
Ok(())
}
Subcommand::Clean => {
let mut found_err = false;
visit_files(
".",
"*.{metal,air,metallib,vert,frag,comp,spv}",
&mut found_err,
|file, _| {
remove_file(file).with_context(|| format!("failed to remove file {file:?}"))
},
);
ensure!(
!found_err,
"failed to clean one or more files, see above output for more details"
);
Ok(())
}
Subcommand::Bench { clean } => {
if clean {
let criterion_artifact_dir = join_path(["target", "criterion"]);
Expand Down

0 comments on commit 337c760

Please sign in to comment.