From 9273981dc0d78124181927fae8746b5a61901c45 Mon Sep 17 00:00:00 2001 From: Gal Schlezinger Date: Wed, 13 Nov 2024 11:04:11 +0200 Subject: [PATCH] make fnm-macos.zip a universal macos executable (#1310) GitHub runners changed from Intel-based hardware to M1, which is good, but also a breaking change in the installation script. So now we create a (fatter) executable that can run on both M1 and x64. We might have fnm-macos-arm.zip later on, but homebrew is probably a better choice! --- .changeset/curvy-onions-reflect.md | 5 +++++ .github/workflows/rust.yml | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .changeset/curvy-onions-reflect.md diff --git a/.changeset/curvy-onions-reflect.md b/.changeset/curvy-onions-reflect.md new file mode 100644 index 000000000..9d2d58aa3 --- /dev/null +++ b/.changeset/curvy-onions-reflect.md @@ -0,0 +1,5 @@ +--- +"fnm": patch +--- + +make github releases of macos to be a universal macos executable (both m1 and x64) as github changed the workers to be m1 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 98ecc430a..c956b8d23 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -75,10 +75,16 @@ jobs: - uses: hecrj/setup-rust-action@v1 with: rust-version: ${{env.RUST_VERSION}} + targets: x86_64-apple-darwin,aarch64-apple-darwin - uses: Swatinem/rust-cache@v2 + - uses: mlugg/setup-zig@v1 + - run: cargo install --locked cargo-zigbuild - uses: actions/checkout@v4 - name: Build release binary - run: cargo build --release + run: | + cargo zigbuild --release --target=universal2-apple-darwin + mkdir -p target/release + cp target/universal2-apple-darwin/release/fnm target/release/fnm env: LZMA_API_STATIC: "true" - name: Strip binary from debug symbols