Skip to content

Commit

Permalink
Build script cleanups (#9931)
Browse files Browse the repository at this point in the history
This PR removes unused, commented-out or otherwise spurious code from build script. Also, dependencies were reviewed and cleaned.

No functional changes intended.
  • Loading branch information
mwu-tow authored May 13, 2024
1 parent 2ed83f2 commit b76e4d6
Show file tree
Hide file tree
Showing 43 changed files with 0 additions and 990 deletions.
22 changes: 0 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions build/build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@ aws-sdk-ecr = "0.21.0"
aws-sdk-s3 = "0.21.0"
base64 = "0.13.0"
bytes = { workspace = true }
byte-unit = { workspace = true }
chrono = { workspace = true }
clap = { workspace = true }
derivative = { workspace = true }
derive_more = { workspace = true }
dirs = { workspace = true }
futures = { workspace = true }
futures-util = "0.3.17"
glob = "0.3.0"
handlebars = "4.3.5"
heck = "0.4.0"
Expand Down
21 changes: 0 additions & 21 deletions build/build/examples/experiments.rs

This file was deleted.

31 changes: 0 additions & 31 deletions build/build/examples/s3.rs

This file was deleted.

9 changes: 0 additions & 9 deletions build/build/src/aws.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,6 @@ mod tests {
use super::*;


// #[tokio::test]
// async fn aaa() -> Result {
// let repo = RepoContext::from_str("enso-org/enso")?;
// let paths =
// Paths::new_version(r"H:\NBO\enso", Version::parse("2022.1.1-nightly.2022-01-28")?)?;
// update_manifest(&repo, &paths).await?;
// Ok(())
// }

#[test]
fn updating_manifest() -> Result {
let old_nightly = serde_yaml::from_str::<Manifest>(
Expand Down
14 changes: 0 additions & 14 deletions build/build/src/bump_version.rs

This file was deleted.

28 changes: 0 additions & 28 deletions build/build/src/ide/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use crate::version::ENSO_VERSION;

use anyhow::Context;
use ide_ci::env::known::electron_builder::WindowsSigningCredentials;
use ide_ci::io::download_all;
use ide_ci::program::command::FallibleManipulator;
use ide_ci::programs::node::NpmCommand;
use ide_ci::programs::Npm;
Expand All @@ -36,11 +35,6 @@ lazy_static! {
pub static ref BUILD_INFO: PathBuf = PathBuf::from("build.json");
}

pub const IDE_ASSETS_URL: &str =
"https://github.com/enso-org/ide-assets/archive/refs/heads/main.zip";

pub const ARCHIVED_ASSET_FILE: &str = "ide-assets-main/content/assets/";

pub mod env {
use super::*;

Expand Down Expand Up @@ -148,16 +142,6 @@ impl FallibleManipulator for IconsArtifacts {
}
}

/// Fill the directory under `output_path` with the assets.
pub async fn download_js_assets(output_path: impl AsRef<Path>) -> Result {
let output = output_path.as_ref();
let archived_asset_prefix = PathBuf::from(ARCHIVED_ASSET_FILE);
let archive = download_all(IDE_ASSETS_URL).await?;
let mut archive = zip::ZipArchive::new(std::io::Cursor::new(archive))?;
ide_ci::archive::zip::extract_subtree(&mut archive, &archived_asset_prefix, output)?;
Ok(())
}

/// Get a relative path to the Project Manager executable in the PM bundle.
pub fn path_to_executable_in_pm_bundle(
artifact: &generated::ProjectManagerBundle,
Expand Down Expand Up @@ -370,15 +354,3 @@ impl IdeDesktop {
Ok(())
}
}

#[cfg(test)]
mod tests {
use super::*;

#[tokio::test]
async fn download_test() -> Result {
let temp = TempDir::new()?;
download_js_assets(temp.path()).await?;
Ok(())
}
}
1 change: 0 additions & 1 deletion build/build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ pub mod prelude {
}

pub mod aws;
pub mod bump_version;
pub mod changelog;
pub mod ci;
pub mod ci_gen;
Expand Down
23 changes: 0 additions & 23 deletions build/build/src/postgres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,27 +226,4 @@ mod tests {
std::mem::forget(child);
Ok(())
}

#[tokio::test]
#[ignore]
async fn test_postgres() -> Result {
// let config = Configuration {
// postgres_container: ContainerId("something".into()),
// endpoint: EndpointConfiguration::deduce()?,
// version: "latest".into(),
// user: "test".into(),
// password: "test".into(),
// database_name: "test".into(),
// };
// let child = Postgresql::start(config).await?;
// std::mem::forget(child);
// // let mut httpbin = get_and_spawn_httpbin_on_free_port().await?;
// Command::new("cmd")
// .args(["/c",
// "H:\\NBO\\enso2\\built-distribution\\enso-engine-0.2.32-SNAPSHOT-windows-amd64\\enso-0.2.
// 32-SNAPSHOT\\bin\\enso", "--no-ir-caches", "--run",
// "H:\\NBO\\enso2\\test\\Database_Tests"]).run_ok().await?; httpbin.process.kill().
// await?;
Ok(())
}
}
16 changes: 0 additions & 16 deletions build/build/src/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ use octocrab::models::repos::Asset;
// ==============

pub mod backend;
pub mod engine;
pub mod gui;
pub mod ide;
pub mod project_manager;
pub mod runtime;
pub mod wasm;

Expand Down Expand Up @@ -256,20 +254,6 @@ pub trait IsTarget: Clone + Debug + Sized + Send + Sync + 'static {
todo!("Not implemented for target {self:?}!")
}

// /// Upload the artifact as an asset to the GitHub release.
// fn upload_asset(
// &self,
// release_handle: ReleaseHandle,
// output: impl Future<Output = Result<Self::Artifact>> + Send + 'static,
// ) -> BoxFuture<'static, Result> {
// async move {
// let artifact = output.await?;
// release_handle.upload_compressed_dir(&artifact).await?;
// Ok(())
// }
// .boxed()
// }

fn download_asset(
&self,
context: Context,
Expand Down
73 changes: 0 additions & 73 deletions build/build/src/project/engine.rs

This file was deleted.

Loading

0 comments on commit b76e4d6

Please sign in to comment.