cuddle-rust-service-plan/ci/src/main.rs

33 lines
907 B
Rust
Raw Normal View History

use std::sync::Arc;
use cuddle_ci::rust_service::architecture::{Architecture, Os};
use cuddle_ci::rust_service::{extensions::*, RustService};
use cuddle_ci::CuddleCI;
use tokio::sync::Mutex;
#[tokio::main]
async fn main() -> eyre::Result<()> {
let client = dagger_sdk::connect().await?;
let service = RustService::from(client)
.with_arch(Architecture::Amd64)
.with_os(Os::Linux)
.with_apt(&["clang", "libssl-dev", "libz-dev", "libgit2-dev"])
.with_apt_ca_certificates()
.with_crates(["ci", "crates/*"])
.with_mold("2.3.3")
.with_bin_name("cuddle-rust-service-plan")
.with_deployment(false)
.to_owned();
let service = Arc::new(Mutex::new(service));
CuddleCI::default()
.with_pull_request(service.clone())
.with_main(service.clone())
.execute(std::env::args())
.await?;
Ok(())
}