Skip to content

Commit

Permalink
tmp: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
exyi committed Jan 18, 2024
1 parent a21af1d commit 390c778
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ byteorder = "1.4.3"
[target.'cfg(not(any(target_family = "windows", target_arch = "riscv64")))'.dependencies]
jemallocator = "0.5.4"

[target.'cfg(any(target_os = "macos", target_os="windows", all(target_os="linux", not(target_env="musl"), any(target_arch="x86_64", target_arch="aarch64", target_arch="riscv64"))))'.dependencies]
[target.'cfg(any(target_os = "macos", target_os="windows", all(target_os="linux", not(target_env="musl"), any(target_arch="x86_64", target_arch="aarch64"))))'.dependencies]
postgres-native-tls = "0.5.0"
native-tls = "0.2.11"

Expand Down
5 changes: 2 additions & 3 deletions cli/Cross.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ pre-build = [

[target.riscv64gc-unknown-linux-gnu]
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH"
"dpkg --add-architecture $CROSS_DEB_ARCH"
]
image = "ghcr.io/cross-rs/riscv64gc-unknown-linux-gnu:main@sha256:935f448e57450c0325b82e5d3a44662a46b1aabd56a3b1c4c03a1bef31dd168b"
image = "ghcr.io/cross-rs/riscv64gc-unknown-linux-gnu:main@sha256:67ee97dd4719390d299edfcf39f226360ccfb1539e08b078ec187d4848415794"
6 changes: 3 additions & 3 deletions cli/src/postgres_cloner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ fn read_password(user: &str) -> Result<String, String> {
Ok(password)
}

#[cfg(any(target_os = "macos", target_os="windows", all(target_os="linux", not(target_env="musl"), any(target_arch="x86_64", target_arch="aarch64", target_arch="riscv64"))))]
#[cfg(any(target_os = "macos", target_os="windows", all(target_os="linux", not(target_env="musl"), any(target_arch="x86_64", target_arch="aarch64"))))]
fn build_tls_connector() -> Result<postgres_native_tls::MakeTlsConnector, String> {
let connector = native_tls::TlsConnector::new().map_err(|e| format!("Creating TLS connector failed: {}", e.to_string()))?;
let pg_connector = postgres_native_tls::MakeTlsConnector::new(connector);
Ok(pg_connector)
}

#[cfg(not(any(target_os = "macos", target_os="windows", all(target_os="linux", not(target_env="musl"), any(target_arch="x86_64", target_arch="aarch64", target_arch="riscv64")))))]
#[cfg(not(any(target_os = "macos", target_os="windows", all(target_os="linux", not(target_env="musl"), any(target_arch="x86_64", target_arch="aarch64")))))]
fn build_tls_connector() -> Result<NoTls, String> {
Ok(NoTls)
}
Expand All @@ -143,7 +143,7 @@ fn pg_connect(args: &PostgresConnArgs) -> Result<Client, String> {
pg_config.password(&read_password(pg_config.get_user().unwrap())?.trim());
}

#[cfg(not(any(target_os = "macos", target_os="windows", all(target_os="linux", not(target_env="musl"), any(target_arch="x86_64", target_arch="aarch64", target_arch="riscv64")))))]
#[cfg(not(any(target_os = "macos", target_os="windows", all(target_os="linux", not(target_env="musl"), any(target_arch="x86_64", target_arch="aarch64")))))]
match &args.sslmode {
None | Some(crate::SslMode::Disable) => {},
Some(x) => return Err(format!("SSL/TLS is disabled in this build of pg2parquet, so ssl mode {:?} cannot be used. Only 'disable' option is allowed.", x)),
Expand Down

0 comments on commit 390c778

Please sign in to comment.