Skip to content

Commit

Permalink
ci: sed imageflow_abi/Cargo.toml since target doesn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
lilith committed Jan 21, 2025
1 parent 082ebd0 commit f895026
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,15 @@ jobs:
echo "DEBUG=False" >> $GITHUB_ENV
echo "TARGET_CPU=${{ matrix.target-cpu }}" >> $GITHUB_ENV
- if: contains(matrix.target, 'musl')
name: "Edit imageflow_abi/Cargo.toml to build staticlib instead of cdylib and use strip and lto"
run: |
echo "Editing imageflow_abi/Cargo.toml to replace the string "["cdylib"]" with "["staticlib"]""
sed -i 's/\["cdylib"\]/\["staticlib"\]/g' imageflow_abi/Cargo.toml
echo "Editing to remove all instances of '# enable on musl: '
sed -i '/# enable on musl:/d' imageflow_abi/Cargo.toml
echo "Finished editing imageflow_abi/Cargo.toml: "
cat imageflow_abi/Cargo.toml
# ----------------------------------------------------------------------------
# Test steps (like in both test_ci and release_ci).
# For cross and WOA, special steps are used, otherwise normal cargo test.
Expand Down
14 changes: 4 additions & 10 deletions imageflow_abi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,13 @@ edition = "2021"
name = "imageflow"
doc = true
# Default crate type for non-musl targets
crate-type = ["cdylib"]
crate-type = ["staticlib"]
doctest = false

# Specify the exact musl target triple
[target.'x86_64-unknown-linux-musl']
crate-type = ["staticlib"]
strip = true
lto = true
[profile.release]
# enable on musl: strip = true
# enable on musl: lto = true

[target.'aarch64-unknown-linux-musl']
crate-type = ["staticlib"]
strip = true
lto = true


[dependencies]
Expand Down

0 comments on commit f895026

Please sign in to comment.