Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update plugin to support ARM64 build #22

Merged
merged 1 commit into from
Apr 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 13 additions & 29 deletions .github/workflows/registry-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18

- name: Get latest version tag
run: |-
Expand Down Expand Up @@ -105,40 +105,18 @@ jobs:
path: ./dist/steampipe-plugin-${{ env.PLUGIN_NAME }}_darwin_amd64.gz
if-no-files-found: error

# test-amd64:
# name: Integration Test
# runs-on: ${{ matrix.os }}
# needs: build
# strategy:
# matrix:
# os: [ubuntu-latest, macos-latest, windows-latest]
# steps:

# test-darwin-amd64:
# name: Test MacOS (AMD64)
# runs-on: macos-latest
# needs: build

# test-linux-amd64:
# name: Test Linux (AMD64)
# runs-on: ubuntu-latest
# needs: build

# test-windows-amd64:
# name: Test Windows (AMD64)
# runs-on: windows-latest
# needs: build

# There are no runners for amd64 - would need to run our own...
- name: Save MacOS Build Artifact - ARM64
uses: actions/upload-artifact@v2
with:
name: steampipe-${{ env.PLUGIN_NAME }}_darwin_arm64
path: ./dist/steampipe-plugin-${{ env.PLUGIN_NAME }}_darwin_arm64.gz
if-no-files-found: error

publish-deploy:
name: Publish and Deploy
runs-on: ubuntu-latest
needs:
- build
# - test-darwin-amd64
# - test-linux-amd64
# - test-windows-amd64

steps:
- name: Checkout
Expand Down Expand Up @@ -182,6 +160,11 @@ jobs:
with:
name: steampipe-${{ env.PLUGIN_NAME }}_darwin_amd64

- name: Download darwin_arm64 artifact
uses: actions/download-artifact@v2
with:
name: steampipe-${{ env.PLUGIN_NAME }}_darwin_arm64

- name: List files
run: ls -l

Expand Down Expand Up @@ -253,6 +236,7 @@ jobs:
--manifest-config config.json:application/vnd.turbot.steampipe.config.v1+json \
--manifest-annotations annotations.json \
steampipe-plugin-${PLUGIN_NAME}_darwin_amd64.gz:application/vnd.turbot.steampipe.plugin.darwin-amd64.layer.v1+gzip \
steampipe-plugin-${PLUGIN_NAME}_darwin_arm64.gz:application/vnd.turbot.steampipe.plugin.darwin-arm64.layer.v1+gzip \
steampipe-plugin-${PLUGIN_NAME}_linux_amd64.gz:application/vnd.turbot.steampipe.plugin.linux-amd64.layer.v1+gzip \
steampipe-plugin-${PLUGIN_NAME}_linux_arm64.gz:application/vnd.turbot.steampipe.plugin.linux-arm64.layer.v1+gzip \
docs:application/vnd.turbot.steampipe.plugin.docs.layer.v1+tar \
Expand Down
7 changes: 2 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@ builds:
goos:
- linux
- darwin
#- windows #- not yet.....

goarch:
- amd64
- arm64
ignore:
- goos: darwin # docs suggest that darwin arm64 should compile, but doesnt...
goarch: arm64

id: "steampipe-whois"
id: "steampipe"
binary: "{{ .ProjectName }}.plugin"

archives:
Expand Down