ci(macos): cross-compile x64 on macos-14 runner
macos-13 (x64 runner) consistently stuck in queued state — GitHub provisioning issue. Switch both architectures to macos-14 (arm64): - osx-x64: cross-published via .NET (valid native x64 single-file) - osx-arm64: native build as before - x64 smoke test runs via Rosetta 2 (available on macos-14) - arm64 smoke test now uses --arch arm to test its own target
这个提交包含在:
@@ -15,8 +15,10 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
# macos-13 (x64 runner) 长期排队/不分配,改用 macos-14 (arm64) 交叉编译两个架构。
|
||||||
|
# .NET 在 arm64 主机上 `publish -r osx-x64` 产出原生 x64 单文件;x64 产物经 Rosetta 2 可在 arm64 上运行(冒烟测试仍生效)。
|
||||||
- arch: x64
|
- arch: x64
|
||||||
runner: macos-13
|
runner: macos-14
|
||||||
rid: osx-x64
|
rid: osx-x64
|
||||||
- arch: arm64
|
- arch: arm64
|
||||||
runner: macos-14
|
runner: macos-14
|
||||||
@@ -90,15 +92,19 @@ jobs:
|
|||||||
ls -lh paze-*.tar.gz
|
ls -lh paze-*.tar.gz
|
||||||
|
|
||||||
- name: Smoke test — compile hello.pe
|
- name: Smoke test — compile hello.pe
|
||||||
|
env:
|
||||||
|
# arm64 构建用 --arch arm 产出 arm64 Mach-O;x64 用默认 AMD64。
|
||||||
|
# x64 产物在 macos-14 (arm64) 上经 Rosetta 2 运行。
|
||||||
|
ARCH_FLAG: ${{ matrix.arch == 'arm64' && '--arch arm' || '' }}
|
||||||
run: |
|
run: |
|
||||||
BIN="staging/paze-${{ steps.meta.outputs.version }}-macos-${{ matrix.arch }}/bin"
|
BIN="staging/paze-${{ steps.meta.outputs.version }}-macos-${{ matrix.arch }}/bin"
|
||||||
if [ -f "$BIN/paze" ]; then
|
if [ -f "$BIN/paze" ]; then
|
||||||
"$BIN/paze" tests/hello.pe --target macos -o /tmp/hello.macos
|
"$BIN/paze" tests/hello.pe --target macos $ARCH_FLAG -o /tmp/hello.macos
|
||||||
file /tmp/hello.macos
|
file /tmp/hello.macos
|
||||||
# macOS 上执行编译产物(Mach-O 原生可执行)
|
# macOS 上执行编译产物(Mach-O 原生可执行;x64 经 Rosetta 2)
|
||||||
/tmp/hello.macos || true
|
/tmp/hello.macos || true
|
||||||
elif [ -f "$BIN/paze.dll" ]; then
|
elif [ -f "$BIN/paze.dll" ]; then
|
||||||
dotnet "$BIN/paze.dll" tests/hello.pe --target macos -o /tmp/hello.macos
|
dotnet "$BIN/paze.dll" tests/hello.pe --target macos $ARCH_FLAG -o /tmp/hello.macos
|
||||||
file /tmp/hello.macos
|
file /tmp/hello.macos
|
||||||
/tmp/hello.macos || true
|
/tmp/hello.macos || true
|
||||||
else
|
else
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户