Skip to content

Commit 9285a66

Browse files
testing build
1 parent 385ef5f commit 9285a66

File tree

1 file changed

+27
-17
lines changed

1 file changed

+27
-17
lines changed

.github/workflows/build-zauth.yaml

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,48 @@ name: Build zAuth Rust binary for ARM64
77
jobs:
88
build-macos-arm:
99
runs-on: ubuntu-latest
10+
env:
11+
SDK_VERSION: 15.5
12+
TARGET: aarch64-apple-darwin
13+
OSXCROSS_TARGET: ${{ github.workspace }}/osxcross
14+
CARGO_HOME: ${{ github.workspace }}/.cargo
15+
1016
steps:
1117
- name: Checkout code
1218
uses: actions/checkout@v4
1319

14-
- name: Set up Rust
15-
uses: actions-rs/toolchain@v1
16-
with:
17-
toolchain: stable
18-
profile: minimal
19-
override: true
20-
2120
- name: Setup osxcross
2221
uses: Timmmm/setup-osxcross@v2
2322
with:
24-
osx-version: 15.5
23+
osx-version: ${{ env.SDK_VERSION }}
2524

26-
- name: Show compiler info
25+
- name: Set compiler variables
2726
run: |
28-
echo "CC: $CC"
27+
export CC=$OSXCROSS_TARGET/bin/aarch64-apple-darwin24.5-clang
28+
export CXX=$OSXCROSS_TARGET/bin/aarch64-apple-darwin24.5-clang++
29+
export AR=$OSXCROSS_TARGET/bin/aarch64-apple-darwin24.5-ar
30+
export SDKROOT=$OSXCROSS_TARGET/SDK/MacOSX${SDK_VERSION}.sdk
31+
export MACOSX_DEPLOYMENT_TARGET=11.0
32+
echo "CC=$CC"
2933
$CC --version
3034
31-
- name: Build zauth release binary
35+
- name: Install Rust
36+
uses: actions-rs/toolchain@v1
37+
with:
38+
toolchain: stable
39+
override: true
40+
41+
- name: Build zauth
3242
run: |
43+
export CC=$OSXCROSS_TARGET/bin/aarch64-apple-darwin24.5-clang
44+
export CARGO_TARGET_AARCH64_APPLE_DARWIN_LINKER=$CC
3345
cargo build --release --target aarch64-apple-darwin
3446
35-
- name: Copy built binary
36-
run: |
37-
mkdir -p release
38-
cp target/aarch64-apple-darwin/release/zauth release/zauth-aarch64-apple-darwin
47+
- name: List built binaries
48+
run: ls -lh target/aarch64-apple-darwin/release
3949

40-
- name: Upload macOS ARM64 release binary
50+
- name: Upload zauth binary as artifact
4151
uses: actions/upload-artifact@v4
4252
with:
4353
name: zauth-macos-arm64
44-
path: release/zauth-aarch64-apple-darwin
54+
path: target/aarch64-apple-darwin/release/zauth

0 commit comments

Comments
 (0)