Skip to content

Commit 3e25a9a

Browse files
authored
Added the Mac M1 build to the test-server (#176)
1 parent 42f6d51 commit 3e25a9a

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

.github/workflows/release-test-server.yml

+16-4
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,14 @@ jobs:
6868
target: aarch64-unknown-linux-musl
6969
linker: gcc-aarch64-linux-gnu
7070
cross: true
71-
- build: macos
71+
- build: macos-x86
7272
os: macos-latest
7373
cross: false
74+
# https://docs.github.com/en/actions/using-github-hosted-runners/about-larger-runners/about-larger-runners
75+
# macos-latest-xlarge or macos-13-xlarge are running on arm64 (m1)
76+
- build: macos-aarch64
77+
os: macos-latest-xlarge
78+
cross: false
7479
- build: windows
7580
os: windows-latest
7681
cross: false
@@ -140,14 +145,21 @@ jobs:
140145
if: matrix.os == 'windows-latest'
141146
shell: bash
142147
run: |
143-
asset_name="test-server-$VERSION-windows-x86_64.zip"
148+
asset_name="test-server-$VERSION-x86_64-windows.zip"
144149
echo "ASSET_NAME=$asset_name" >> $GITHUB_ENV
145150
7z a -mm=Deflate64 -mfb=258 -mpass=15 $asset_name ./target/release/test-server.exe
146151
147-
- name: Compress for macOS
152+
- name: Compress for macOS x86
148153
if: matrix.os == 'macos-latest'
149154
run: |
150-
asset_name="test-server-$VERSION-apple-darwin-x86_64.tar.xz"
155+
asset_name="test-server-$VERSION-x86_64-apple-darwin.tar.xz"
156+
echo "ASSET_NAME=$asset_name" >> $GITHUB_ENV
157+
XZ_OPT=-9 tar -C ./target/release/ -cJf $asset_name test-server
158+
159+
- name: Compress for macOS aarch64
160+
if: matrix.os == 'macos-latest-xlarge'
161+
run: |
162+
asset_name="test-server-$VERSION-aarch64-apple-darwin.tar.xz"
151163
echo "ASSET_NAME=$asset_name" >> $GITHUB_ENV
152164
XZ_OPT=-9 tar -C ./target/release/ -cJf $asset_name test-server
153165

.github/workflows/release.yml

-4
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,6 @@ jobs:
146146
use-cross: true
147147
command: build
148148
args: -q --release --target ${{ matrix.target }}
149-
# uses: ./.github/actions/linux-x86_64-musl/
150-
# if: matrix.cross
151-
# with:
152-
# args: cross build -q --release --target ${{ matrix.target }}
153149

154150
- name: Build for Linux
155151
uses: ./.github/actions/linux-x86_64-musl/

0 commit comments

Comments
 (0)