Skip to content

Commit

Permalink
Some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielsimard committed Jul 17, 2024
1 parent 94d0541 commit d72100e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 42 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,29 @@ on:

jobs:
publish-cubecl-common:
uses: tracel-ai/burn/.github/workflows/publish-template.yml@main
uses: tracel-ai/cubecl/.github/workflows/publish-template.yml@main
with:
crate: cubecl-common
secrets: inherit

publish-cubecl-runtime:
uses: tracel-ai/burn/.github/workflows/publish-template.yml@main
uses: tracel-ai/cubecl/.github/workflows/publish-template.yml@main
with:
crate: cubecl-runtime
needs:
- publish-cubecl-common
secrets: inherit

publish-cubecl-macros:
uses: tracel-ai/burn/.github/workflows/publish-template.yml@main
uses: tracel-ai/cubecl/.github/workflows/publish-template.yml@main
with:
crate: cubecl-macros
needs:
- publish-cubecl-common
secrets: inherit

publish-cubecl-core:
uses: tracel-ai/burn/.github/workflows/publish-template.yml@main
uses: tracel-ai/cubecl/.github/workflows/publish-template.yml@main
with:
crate: cubecl-core
needs:
Expand All @@ -38,7 +38,7 @@ jobs:
secrets: inherit

publish-cubecl:
uses: tracel-ai/burn/.github/workflows/publish-template.yml@main
uses: tracel-ai/cubecl/.github/workflows/publish-template.yml@main
with:
crate: cubecl
needs:
Expand Down
9 changes: 2 additions & 7 deletions xtask/src/commands/pull_request_checks.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
use strum::IntoEnumIterator;

use super::{
ci::{self, CICmdArgs, CICommand},
test::run_guide,
};
use super::ci::{self, CICmdArgs, CICommand};

pub(crate) fn handle_command() -> anyhow::Result<()> {
CICommand::iter()
Expand All @@ -14,7 +11,5 @@ pub(crate) fn handle_command() -> anyhow::Result<()> {
target: super::Target::All,
command: c.clone(),
})
})?;
// Execute the guide example
run_guide()
})
}
30 changes: 0 additions & 30 deletions xtask/src/commands/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ use crate::{

use super::Target;

const PROJECT_UUID: &str = "331a3907-bfd8-45e5-af54-1fee73a3c1b1";
const API_KEY: &str = "dcaf7eb9-5acc-47d7-8b93-ca0fbb234096";

#[derive(Args)]
pub(crate) struct TestCmdArgs {
/// Target to test for.
Expand All @@ -32,8 +29,6 @@ enum TestCommand {
Integration,
/// Run documentation tests.
Documentation,
/// Run guide test against Heat dev stack.
Guide,
/// Run all the checks.
All,
}
Expand All @@ -43,7 +38,6 @@ pub(crate) fn handle_command(args: TestCmdArgs) -> anyhow::Result<()> {
TestCommand::Unit => run_unit(&args.target),
TestCommand::Integration => run_integration(&args.target),
TestCommand::Documentation => run_documentation(&args.target),
TestCommand::Guide => run_guide(),
TestCommand::All => TestCommand::iter()
.filter(|c| *c != TestCommand::All)
.try_for_each(|c| {
Expand All @@ -55,30 +49,6 @@ pub(crate) fn handle_command(args: TestCmdArgs) -> anyhow::Result<()> {
}
}

pub(crate) fn run_guide() -> Result<()> {
group!("Guide Test");
info!("Command line: cargo run --release --bin guide -- --key \"...\" --project \"...\"");
let status = Command::new("cargo")
.args([
"run",
"--release",
"--bin",
"guide",
"--",
"--key",
API_KEY,
"--project",
PROJECT_UUID,
])
.status()
.map_err(|e| anyhow!("Failed to execute guide example: {}", e))?;
if !status.success() {
return Err(anyhow!("Failed to execute guide example"));
}
endgroup!();
Ok(())
}

pub(crate) fn run_unit(target: &Target) -> Result<()> {
match target {
Target::Crates | Target::Examples => {
Expand Down

0 comments on commit d72100e

Please sign in to comment.