From 11bfe1481cf3474678a1833323d63b5a02243271 Mon Sep 17 00:00:00 2001 From: Mayur Chougule Date: Sat, 16 Sep 2023 17:19:01 -0400 Subject: [PATCH] build fixed --- .github/workflows/build.yml | 16 ++++++++-------- Makefile | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eb70bd9..2f9a938 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,17 +14,17 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04, arm-mac, amd-mac] + os: [ubuntu-20.04] include: - os: ubuntu-20.04 output_file: vimana-linux-amd64.zip make_command: build-linux - - os: arm-mac - output_file: vimana-macos-amd64.zip - make_command: build - - os: amd-mac - output_file: vimana-macos-amd64.zip - make_command: build + # - os: arm-mac # , arm-mac, amd-mac + # output_file: vimana-macos-arm64.zip + # make_command: build + # - os: amd-mac + # output_file: vimana-macos-amd64.zip + # make_command: build steps: - name: Checkout code @@ -39,7 +39,7 @@ jobs: run: make test - name: Build Vimana - run: make ${{ matrix.make_command }} + run: make ${{ matrix.make_command }} && make build - name: Package Vimana into ZIP run: zip ${{ matrix.output_file }} ${{ matrix.make_command == 'build' && 'vimana' || 'vimana-linux-amd64' }} diff --git a/Makefile b/Makefile index 2c5c04c..626c12b 100644 --- a/Makefile +++ b/Makefile @@ -13,10 +13,10 @@ LDFLAGS=-ldflags "-X main.Version=${VERSION} -X main.BuildTime=${BUILD_TIME}" # Default command when simply typing `make` all: build -# Compiles the binary +# Compiles the binary for mac build: - @echo "Building..." - go build ${LDFLAGS} -o ${BINARY_NAME} -v ./... + @echo "Building for Mac..." + GOOS=darwin GOARCH=amd64 go build ${LDFLAGS} -o ${BINARY_NAME} -v ./... mkdir -p ${HOME}/.vimana cp config.toml ${HOME}/.vimana/config.toml