Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
add darwin and linux arm64 support (#4553)
Browse files Browse the repository at this point in the history
Adds ARM64 releases of the osm tool for darwin and linux

Signed-off-by: Tim Bertenshaw <[email protected]>
  • Loading branch information
tbertenshaw authored Mar 1, 2022
1 parent 6acc953 commit 73f7e06
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 6 deletions.
36 changes: 32 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,34 +56,62 @@ jobs:
release_name: ${{ github.ref }}
body_path: release-notes.md
prerelease: ${{ contains(env.VERSION, '-alpha.') || contains(env.VERSION, '-beta.') || contains(env.VERSION, '-rc.') || contains(env.VERSION, '-nightly.') }}
- name: Upload macOS .zip
- name: Upload macOS (amd64).zip
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: "_dist/osm-${{ env.VERSION }}-darwin-amd64.zip"
asset_name: "osm-${{ env.VERSION }}-darwin-amd64.zip"
asset_content_type: application/zip
- name: Upload macOS .tar.gz
- name: Upload macOS (amd64).tar.gz
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: "_dist/osm-${{ env.VERSION }}-darwin-amd64.tar.gz"
asset_name: "osm-${{ env.VERSION }}-darwin-amd64.tar.gz"
asset_content_type: application/gzip
- name: Upload Linux .zip
- name: Upload macOS (arm64).zip
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: "_dist/osm-${{ env.VERSION }}-darwin-arm64.zip"
asset_name: "osm-${{ env.VERSION }}-darwin-arm64.zip"
asset_content_type: application/zip
- name: Upload macOS (arm64).tar.gz
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: "_dist/osm-${{ env.VERSION }}-darwin-arm64.tar.gz"
asset_name: "osm-${{ env.VERSION }}-darwin-arm64.tar.gz"
asset_content_type: application/gzip
- name: Upload Linux (amd64).zip
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: "_dist/osm-${{ env.VERSION }}-linux-amd64.zip"
asset_name: "osm-${{ env.VERSION }}-linux-amd64.zip"
asset_content_type: application/zip
- name: Upload Linux .tar.gz
- name: Upload Linux (amd64).tar.gz
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: "_dist/osm-${{ env.VERSION }}-linux-amd64.tar.gz"
asset_name: "osm-${{ env.VERSION }}-linux-amd64.tar.gz"
asset_content_type: application/gzip
- name: Upload Linux (arm64).zip
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: "_dist/osm-${{ env.VERSION }}-linux-arm64.zip"
asset_name: "osm-${{ env.VERSION }}-linux-arm64.zip"
asset_content_type: application/zip
- name: Upload Linux (arm64).tar.gz
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: "_dist/osm-${{ env.VERSION }}-linux-arm64.tar.gz"
asset_name: "osm-${{ env.VERSION }}-linux-arm64.tar.gz"
asset_content_type: application/gzip
- name: Upload Windows .zip
uses: actions/upload-release-asset@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!make

TARGETS := darwin/amd64 linux/amd64 windows/amd64
TARGETS := darwin/amd64 darwin/arm64 linux/amd64 linux/arm64 windows/amd64
BINNAME ?= osm
DIST_DIRS := find * -type d -exec
CTR_REGISTRY ?= openservicemesh
Expand Down Expand Up @@ -261,7 +261,7 @@ install-git-pre-push-hook:

.PHONY: build-cross
build-cross: cmd/cli/chart.tgz
GO111MODULE=on CGO_ENABLED=0 $(GOX) -ldflags $(LDFLAGS) -parallel=3 -output="_dist/{{.OS}}-{{.Arch}}/$(BINNAME)" -osarch='$(TARGETS)' ./cmd/cli
GO111MODULE=on CGO_ENABLED=0 $(GOX) -ldflags $(LDFLAGS) -parallel=5 -output="_dist/{{.OS}}-{{.Arch}}/$(BINNAME)" -osarch='$(TARGETS)' ./cmd/cli

.PHONY: dist
dist:
Expand Down

0 comments on commit 73f7e06

Please sign in to comment.