From 7b7e49ee3aafe765c6e402a7c3cef4360b4c74a0 Mon Sep 17 00:00:00 2001 From: Tibo Date: Tue, 13 Dec 2022 11:09:12 +1100 Subject: [PATCH] Build for gnu instead of musl Redoing #389 which was cancelled by #554 and reintroduced the error. Fixes #520 --- .github/workflows/rust.yml | 12 +++--------- Cargo.toml | 3 +++ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e02ad1c07..e52d7b1a7 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -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 + 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" diff --git a/Cargo.toml b/Cargo.toml index 452dd0f2d..1c9994d93 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"