Skip to content

Commit

Permalink
Try different way to conditionally enable features
Browse files Browse the repository at this point in the history
Signed-off-by: Lee Smet <[email protected]>
  • Loading branch information
LeeSmet committed Jan 15, 2024
1 parent c52c144 commit 985b057
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@ jobs:
include:
- target: aarch64-apple-darwin
os: macos-latest
features: vendored,refcount,binary
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
features: vendored,refcount,binary,asm
- target: x86_64-apple-darwin
os: macos-latest
features: vendored,refcount,binary,asm
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
features: vendored,refcount,binary
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -44,4 +48,4 @@ jobs:
archive: $bin-$target
# (required) GitHub token for uploading assets to GitHub Releases.
token: ${{ secrets.GITHUB_TOKEN }}
features: "vendored,binary,refcount"
features: ${{ matrix.features }}
8 changes: 2 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ default = []
binary = ["anyhow", "dotenv", "structopt", "tokio"]
vendored = ["openssl"]
refcount = []
asm = ["md-5/asm"]

[[bin]]
name = "s3-cas"
Expand All @@ -23,6 +24,7 @@ tokio = { version = "1", features = ["full"], optional = true }
s3-server = { git = "https://github.com/LeeSmet/s3-server" }
sled = "0.34"
async-trait = "0.1"
md-5 = { version = "0.9" }
hyper = { version = "0.14.7", features = ["server"] }
pin-project-lite = "0.2"
futures = "0.3"
Expand All @@ -36,12 +38,6 @@ dotenv = { version = "0.15", optional = true }
openssl = { version = "0.10", features = ["vendored"], optional = true }
prometheus = { version = "0.13", features = ["process"] }

[target.'cfg(any(taget_arch = "x86", target_arch = "x86_64"))'.dependencies]
md-5 = { version = "0.9", features = ["asm"] }

[target.'cfg(not(any(taget_arch = "x86", target_arch = "x86_64")))'.dependencies]
md-5 = { version = "0.9" }

[profile.release]
lto = true
codegen-units = 1

0 comments on commit 985b057

Please sign in to comment.