Skip to content

Commit

Permalink
add darwin arm64 build
Browse files Browse the repository at this point in the history
  • Loading branch information
richardbremner committed Jun 21, 2024
1 parent 3c339c1 commit eb1f510
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/darwin_arm64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build darwin-arm64 binary

on:
push:
branches:
- feat/cuda_binary

jobs:
build:
runs-on: macos-latest #uses M1

steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'

- name: Check architecture
run: uname -m

- name: Build for darwin/arm64
env:
GOOS: darwin
GOARCH: arm64
CGO_ENABLED: 1
run: |
echo "-------------- OS: ${GOOS} : Arch: ${GOARCH} ---------- start"
output_dir="build/${GOOS}-${GOARCH}"
output_name="lilypad-${GOOS}-${GOARCH}"
mkdir -p "${output_dir}"
# Debug: Print environment variables for the build
echo "Building for ${GOOS}/${GOARCH} with GOOS=$GOOS, GOARCH=$GOARCH"
go build -o "${output_dir}/${output_name}" -v -ldflags="-X 'github.com/lilypad-tech/lilypad/cmd/lilypad.VERSION=$(git describe --tags --abbrev=0)' -X 'github.com/lilypad-tech/lilypad/cmd/lilypad.COMMIT_SHA=$(git rev-parse HEAD)'"
echo "-------------- OS: ${GOOS} : Arch: ${GOARCH} ---------- done"
- name: Verify Build Output
run: |
ls -la build/darwin-arm64
echo "Build complete"

0 comments on commit eb1f510

Please sign in to comment.