Skip to content

Commit

Permalink
Make bundling of ssl conditionned by target environment instead of fe…
Browse files Browse the repository at this point in the history
…ature flag.
  • Loading branch information
KtorZ committed Oct 2, 2024
1 parent b0cad2b commit 19fe1d3
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: |
sudo apt-get install -y pkg-config libssl-dev musl musl-dev musl-tools
rustup target add x86_64-unknown-linux-musl
cargo install --path=crates/aiken -F bundle_openssl --target=x86_64-unknown-linux-musl
cargo install --path=crates/aiken --target=x86_64-unknown-linux-musl
mv $(which aiken) aiken
ldd aiken
- uses: actions/upload-artifact@v4
Expand Down
4 changes: 0 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ publish-prereleases = true
# as one would normally write them in a workflow.
github-build-setup = "../musl-build-setup.yml"

[[workspace.metadata.dist.artifact]]
target = "x86_64-unknown-linux-musl"
features = ["bundle_openssl"]

# Cargo-dist uses ubuntu-20.04 by default, causing issues in various cases
# because it links with openssl-1.1 whereas recent distro ships with 3.x
[workspace.metadata.dist.github-custom-runners]
Expand Down
4 changes: 1 addition & 3 deletions crates/aiken/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,9 @@ serde_json = "1.0.94"
thiserror = "1.0.39"
uplc = { path = '../uplc', version = "1.1.4" }

[target.'cfg(target_env = "musl")'.dependencies]
openssl = { version = "0.10.66", features = ["vendored"], optional = true }
openssl-probe = { version = "0.1.5", optional = true }

[features]
bundle_openssl = ["dep:openssl", "dep:openssl-probe"]

[target.'cfg(not(windows))'.dependencies]
xdg = "2.5.2"
2 changes: 1 addition & 1 deletion crates/aiken/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ mod cmd;
fn main() -> miette::Result<()> {
panic_handler();

#[cfg(feature = "bundle_openssl")]
#[cfg(target_env = "musl")]
openssl_probe::init_ssl_cert_env_vars();

match Cmd::default() {
Expand Down

0 comments on commit 19fe1d3

Please sign in to comment.