16
ci/Cargo.toml
Normal file
16
ci/Cargo.toml
Normal file
@@ -0,0 +1,16 @@
|
||||
[package]
|
||||
name = "ci"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
tokio.workspace = true
|
||||
|
||||
dagger-sdk = {git = "https://github.com/kjuulh/dagger.git", branch = "feat/with-send-sync"}
|
||||
eyre = { version = "0.6.11" }
|
||||
|
||||
dagger-components = { git = "https://git.front.kjuulh.io/kjuulh/dagger-components", branch = "main" }
|
||||
dagger-rust = { git = "https://git.front.kjuulh.io/kjuulh/dagger-components", branch = "main" }
|
||||
cuddle-ci = { git = "https://git.front.kjuulh.io/kjuulh/dagger-components", branch = "main" }
|
||||
32
ci/src/main.rs
Normal file
32
ci/src/main.rs
Normal file
@@ -0,0 +1,32 @@
|
||||
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(())
|
||||
}
|
||||
Reference in New Issue
Block a user