Skip to content

Commit

Permalink
Problem: aarch64-darwin is not supported (#1098)
Browse files Browse the repository at this point in the history
* Problem: aarch64-darwin is not supported

* Update .github/workflows/release.yml

Co-authored-by: yihuang <[email protected]>
Signed-off-by: mmsqe <[email protected]>

---------

Signed-off-by: mmsqe <[email protected]>
Co-authored-by: yihuang <[email protected]>
  • Loading branch information
mmsqe and yihuang authored Dec 18, 2024
1 parent 5800739 commit 58038fc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ jobs:
environment: release
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v22
- uses: cachix/install-nix-action@v23
with:
# pin to nix-2.13 to workaround compability issue of 2.14,
# see: https://github.com/cachix/install-nix-action/issues/161
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
nix_path: nixpkgs=channel:nixos-22.11
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -53,15 +50,15 @@ jobs:
release-macos:
# runs sequentially to avoid creating duplicated release
needs: ["release"]
runs-on: macos-latest
strategy:
matrix:
runner: [macos-13, macos-14]
runs-on: ${{ matrix.runner }}
environment: release
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v22
- uses: cachix/install-nix-action@v23
with:
# pin to nix-2.13 to workaround compability issue of 2.14,
# see: https://github.com/cachix/install-nix-action/issues/161
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
nix_path: nixpkgs=channel:nixos-22.11
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -95,10 +92,11 @@ jobs:
done
# update checksum and upload
sha256sum *.tar.gz > "checksums-darwin.txt"
CHKFILE="checksums-darwin-$(uname -p).txt"
sha256sum *.tar.gz > "$CHKFILE"
echo 'FILES<<EOF' >> $GITHUB_ENV
ls -1 *.tar.gz >> $GITHUB_ENV
echo "checksums-darwin.txt" >> $GITHUB_ENV
echo "$CHKFILE" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
cat $GITHUB_ENV
- name: upload binaries
Expand Down
6 changes: 5 additions & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ if [[ "$build_platform" == "x86_64-linux" ]]; then
elif [[ "$build_platform" == "aarch64-linux" ]]; then
hosts="Linux_arm64,native Linux_x86_64,gnu64 Windows_x86_64,mingwW64"
elif [[ "$build_platform" == "x86_64-darwin" ]]; then
hosts="Darwin_x86_64,native Darwin_arm64,aarch64-darwin"
hosts="Darwin_x86_64,native"
elif [[ "$build_platform" == "aarch64-darwin" ]]; then
# cross compiling to x86_64-darwin from aarch64-darwin is not supported
# see: https://github.com/NixOS/nixpkgs/issues/180771
hosts="Darwin_arm64,native"
else
echo "don't support build platform: $build_platform"
exit 1
Expand Down

0 comments on commit 58038fc

Please sign in to comment.