Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build for gnu instead of musl #882

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,23 +238,17 @@ jobs:
- uses: hecrj/setup-rust-action@v1
with:
rust-version: stable
targets: x86_64-unknown-linux-musl
targets: x86_64-unknown-linux-gnu
- uses: Swatinem/rust-cache@v2
with:
key: static-linux-binary
- name: Install musl tools
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends musl-tools
- uses: actions/checkout@v3
- name: Build release binary
run: cargo build --release --target x86_64-unknown-linux-musl
- name: Strip binary from debug symbols
run: strip target/x86_64-unknown-linux-musl/release/fnm
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for strip anymore since Cargo 1.59

run: cargo build --release --target x86_64-unknown-linux-gnu
- uses: actions/upload-artifact@v3
with:
name: fnm-linux
path: target/x86_64-unknown-linux-musl/release/fnm
path: target/x86_64-unknown-linux-gnu/release/fnm

build_static_arm_binary:
name: "Build ARM binary"
Expand Down
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ test-log = "0.2.11"
[build-dependencies]
embed-resource = "1.7.4"

[profile.release]
strip = true

[target.'cfg(windows)'.dependencies]
csv = "1.1.6"
junction = "0.2.0"
Expand Down