Skip to content

Commit

Permalink
chore: add macos build
Browse files Browse the repository at this point in the history
  • Loading branch information
Talal Ashraf committed May 30, 2024
1 parent 909351f commit d6d24dc
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .github/workflows/build-docker-image-and-binaries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,28 @@ jobs:
TOFND_PATH="/Users/runner/work/tofnd/tofnd/target/release"
fi
- name: build darwin binaries
env:
SEMVER: ${{ github.event.inputs.tag }}
if: matrix.os == 'macos-latest'
run: |
OS="darwin"
ARCH="${{ matrix.arch }}"
if [ "$ARCH" == "arm64" ]
then
export HOMEBREW_NO_INSTALL_CLEANUP=TRUE
brew uninstall --ignore-dependencies gmp
ARM_DEPENDENCY=$(brew fetch --force --bottle-tag=arm64_big_sur gmp | grep Downloaded | awk '{print $3}')
brew install "$ARM_DEPENDENCY"
rustup target add aarch64-apple-darwin
cargo build --release --target aarch64-apple-darwin
mkdir -p tofndbin
mv /Users/runner/work/tofnd/tofnd/target/aarch64-apple-darwin/release/tofnd "./tofndbin/tofnd-$OS-$ARCH-$SEMVER"
else
cargo install --locked --path .
mkdir -p tofndbin
mv "/Users/runner/work/tofnd/tofnd/target/release/tofnd" "./tofndbin/tofnd-$OS-$ARCH-$SEMVER"
fi
- name: build linux binaries
env:
SEMVER: ${{ github.event.inputs.tag }}
Expand All @@ -71,7 +93,7 @@ jobs:
OS="linux"
ARCH="${{ matrix.arch }}"
cargo install --locked --path .
mkdir tofndbin
mkdir -p tofndbin
mv "$TOFND_PATH/tofnd" "./tofndbin/tofnd-$OS-$ARCH-$SEMVER"
- name: Test tofnd version
Expand Down
6 changes: 6 additions & 0 deletions install-gmp-arm64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#! /bin/bash

export HOMEBREW_NO_INSTALL_CLEANUP=TRUE
brew uninstall --ignore-dependencies gmp
ARM_DEPENDENCY=$(brew fetch --force --bottle-tag=arm64_big_sur gmp | grep Downloaded | awk '{print $3}')
brew install "$ARM_DEPENDENCY"

0 comments on commit d6d24dc

Please sign in to comment.