mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-08 04:56:43 +00:00
add hosted-ci target back in
This commit is contained in:
parent
b4febb78ff
commit
b431059715
2 changed files with 24 additions and 7 deletions
|
|
@ -96,6 +96,8 @@ pub(crate) struct Builder {
|
|||
run_svd2repl: bool,
|
||||
locale_override: Option<String>,
|
||||
locale_stash: String,
|
||||
/// when set to true, hosted mode builds but does not run
|
||||
dry_run: bool,
|
||||
}
|
||||
|
||||
impl Builder {
|
||||
|
|
@ -119,6 +121,7 @@ impl Builder {
|
|||
run_svd2repl: false,
|
||||
locale_override: None,
|
||||
locale_stash: String::new(),
|
||||
dry_run: false,
|
||||
}
|
||||
}
|
||||
/// Specify an alternate loader key, as a String that can encode a file name
|
||||
|
|
@ -260,6 +263,11 @@ impl Builder {
|
|||
self.kernel_features.push(feature.into());
|
||||
self
|
||||
}
|
||||
/// only build a hosted target. don't run it. Used exclusively to confirm that hosted mode builds in CI.
|
||||
pub fn hosted_build_only<'a>(&'a mut self) -> &'a mut Builder {
|
||||
self.dry_run = true;
|
||||
self
|
||||
}
|
||||
|
||||
/// The builder sets up all the cargo arguments to build a set of packages with features for a respective
|
||||
/// target and stream. It also runs the build as well. It's meant to be called only by the `build()`
|
||||
|
|
@ -484,7 +492,11 @@ impl Builder {
|
|||
service.push_str(".exe")
|
||||
}
|
||||
}
|
||||
let mut hosted_args = vec!["run"];
|
||||
let mut hosted_args = if self.dry_run {
|
||||
vec!["build"]
|
||||
} else {
|
||||
vec!["run"]
|
||||
};
|
||||
match self.stream {
|
||||
BuildStream::Release => hosted_args.push("--release"),
|
||||
_ => {}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
"susres", // suspend/resume manager
|
||||
].to_vec();
|
||||
// minimal set of packages to do bare-iron graphical I/O
|
||||
let gfx_dev_pkgs = [
|
||||
let gfx_base_pkgs = [
|
||||
&base_pkgs[..],
|
||||
&[
|
||||
"graphics-server", // raw (unprotected) frame buffer primitives
|
||||
|
|
@ -48,8 +48,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
].concat();
|
||||
// packages in the user image
|
||||
let user_pkgs = [
|
||||
&base_pkgs[..],
|
||||
&gfx_dev_pkgs[..],
|
||||
&gfx_base_pkgs[..],
|
||||
&[
|
||||
// net services
|
||||
"com",
|
||||
|
|
@ -190,10 +189,16 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
}
|
||||
Some("gfx-dev") => {
|
||||
builder.target_hosted()
|
||||
.add_services(&gfx_dev_pkgs.into_iter().map(String::from).collect())
|
||||
.add_services(&gfx_base_pkgs.into_iter().map(String::from).collect())
|
||||
.add_services(&get_cratespecs())
|
||||
.add_feature("graphics-server/testing");
|
||||
},
|
||||
Some("hosted-ci") => {
|
||||
builder.target_hosted()
|
||||
.add_services(&user_pkgs.into_iter().map(String::from).collect())
|
||||
.hosted_build_only()
|
||||
.add_apps(&get_cratespecs());
|
||||
}
|
||||
|
||||
// ------ Precursor hardware image configs ------
|
||||
Some("app-image") => {
|
||||
|
|
@ -232,13 +237,13 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
}
|
||||
Some("usbdev") => {
|
||||
builder.target_precursor(PRECURSOR_SOC_VERSION)
|
||||
.add_services(&gfx_dev_pkgs.into_iter().map(String::from).collect())
|
||||
.add_services(&gfx_base_pkgs.into_iter().map(String::from).collect())
|
||||
.add_services(&get_cratespecs());
|
||||
builder.add_service("usb-test");
|
||||
}
|
||||
Some("ffi-test") => {
|
||||
builder.target_precursor(PRECURSOR_SOC_VERSION)
|
||||
.add_services(&gfx_dev_pkgs.into_iter().map(String::from).collect())
|
||||
.add_services(&gfx_base_pkgs.into_iter().map(String::from).collect())
|
||||
.add_services(&get_cratespecs());
|
||||
builder.add_service("ffi-test");
|
||||
builder.add_loader_feature("renode-bypass");
|
||||
|
|
|
|||
Loading…
Reference in a new issue