Skip to content

Commit

Permalink
fix(action): only support amd6/arm64 for linux and mac if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
innobead committed Jan 2, 2025
1 parent 726433f commit 8a04830
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 22 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: Build

on:
workflow_dispatch:
inputs:
inputs: {}

jobs:
build-linux-x86_64:
name: Build - linux x86_64
name: Build - Linux x86_64
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -24,7 +24,7 @@ jobs:
run: just build

build-macos:
name: Build - macos
name: Build - MacOS
runs-on: macos-latest
steps:
- name: Checkout code
Expand All @@ -44,7 +44,7 @@ jobs:
just build
build-windows:
name: Build - windows
name: Build - Windows
runs-on: windows-latest
steps:
- name: Checkout code
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/buildx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: Buildx

on:
workflow_dispatch:
inputs:
inputs: {}

jobs:
build-linux-aarch64:
name: Build - linux aarch64
name: Build - linux ARM64
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -17,7 +17,7 @@ jobs:

- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
with:
version: latest

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ name: PR/Push

on:
workflow_dispatch:
inputs:
inputs: {}
pull_request:
push:
branches:
- main
- dev

jobs:
build-linux-x86_64:
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
tag_name: ${{ github.ref_name }}

release-linux-x86_64:
name: Release - linux x86_64
name: Release - Linux x86_64
runs-on: ubuntu-latest
needs: create_release
steps:
Expand All @@ -57,7 +57,7 @@ jobs:
files: "./.target/*"

release-linux-aarch64:
name: Release - linux aarch64
name: Release - Linux aarch64
runs-on: ubuntu-latest
needs:
- create_release
Expand All @@ -70,7 +70,7 @@ jobs:

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
with:
version: latest

Expand All @@ -88,8 +88,11 @@ jobs:
files: "./.target/*"

release-macos:
name: Release - macos
runs-on: macos-latest
name: Release - MacOS
runs-on: ${{ matrix.runner }}
strategy:
matrix:
runner: [ macos-latest-large, macos-latest ]
needs:
- create_release
steps:
Expand All @@ -114,7 +117,7 @@ jobs:
files: "./.target/*"

release-windows:
name: Release - windows
name: Release - Windows
runs-on: windows-latest
needs:
- create_release
Expand Down
20 changes: 14 additions & 6 deletions hack/generate-artifact-name.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,31 @@ case $os in
"aarch64")
filename="huber-linux-arm64"
;;
"armv7l")
filename="huber-linux-armv7"
;;
"x86_64")
filename="huber-linux-amd64"
;;
*)
echo "The architecture ($arch) is not supported" >/dev/stderr
echo "$os:$arch is not supported" >/dev/stderr
exit 1
;;
esac
;;
"Darwin")
filename="huber-darwin-amd64"
case $arch in
"arm64")
filename="huber-darwin-arm64"
;;
"x86_64")
filename="huber-darwin-amd64"
;;
*)
echo "$os:$arch is not supported" >/dev/stderr
exit 1
;;
esac
;;
*)
echo "The platform ($os) is not supported" >/dev/stderr
echo "$os:$arch is not supported" >/dev/stderr
exit 1
;;
esac
Expand Down
4 changes: 2 additions & 2 deletions hack/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ case $os in
filename="huber-linux-amd64"
;;
*)
echo "The architecture ($arch) is not supported" >/dev/stderr
echo "$os:$arch is not supported" >/dev/stderr
exit 1
;;
esac
Expand All @@ -39,7 +39,7 @@ case $os in
filename="huber-darwin-amd64"
;;
*)
echo "The architecture ($arch) is not supported" >/dev/stderr
echo "$os:$arch is not supported" >/dev/stderr
exit 1
;;
esac
Expand Down

0 comments on commit 8a04830

Please sign in to comment.