Skip to content

Commit 3d99a5f

Browse files
testing build
1 parent f2b884b commit 3d99a5f

File tree

1 file changed

+21
-40
lines changed

1 file changed

+21
-40
lines changed

.github/workflows/build-zauth.yaml

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

17-
- name: Install dependencies
18-
run: sudo apt-get update && sudo apt-get install -y clang build-essential cmake git curl xz-utils
14+
- name: Set up Rust
15+
uses: actions-rs/toolchain@v1
16+
with:
17+
toolchain: stable
18+
profile: minimal
19+
override: true
1920

2021
- name: Setup osxcross
2122
uses: Timmmm/setup-osxcross@v2
2223
with:
23-
osx-version: ${{ env.SDK_VERSION }}
24-
25-
- name: Download macOS SDK
26-
run: |
27-
mkdir -p $OSXCROSS_TARGET/SDK
28-
curl -L -o $OSXCROSS_TARGET/SDK/MacOSX${SDK_VERSION}.sdk.tar.xz \
29-
https://github.com/tpoechtrager/osxcross/raw/master/tarballs/MacOSX${SDK_VERSION}.sdk.tar.xz
30-
tar -xJf $OSXCROSS_TARGET/SDK/MacOSX${SDK_VERSION}.sdk.tar.xz -C $OSXCROSS_TARGET/SDK
31-
shell: bash
24+
osx-version: 15.5
3225

33-
- name: Setup cross compile env
26+
- name: Show compiler info
3427
run: |
35-
export SDKROOT=$OSXCROSS_TARGET/SDK/MacOSX${SDK_VERSION}.sdk
36-
export CC=$OSXCROSS_TARGET/bin/aarch64-apple-darwin24.5-clang
37-
export CXX=$OSXCROSS_TARGET/bin/aarch64-apple-darwin24.5-clang++
38-
export AR=$OSXCROSS_TARGET/bin/aarch64-apple-darwin24.5-ar
39-
export CFLAGS="-isysroot $SDKROOT -mmacosx-version-min=11.0 -arch arm64"
40-
export LDFLAGS="-isysroot $SDKROOT -arch arm64"
41-
export RUSTFLAGS="-C linker=$CC"
42-
echo "SDKROOT=$SDKROOT" >> $GITHUB_ENV
43-
echo "CC=$CC" >> $GITHUB_ENV
44-
echo "CXX=$CXX" >> $GITHUB_ENV
45-
echo "AR=$AR" >> $GITHUB_ENV
46-
echo "CFLAGS=$CFLAGS" >> $GITHUB_ENV
47-
echo "LDFLAGS=$LDFLAGS" >> $GITHUB_ENV
48-
echo "RUSTFLAGS=$RUSTFLAGS" >> $GITHUB_ENV
28+
echo "CC: $CC"
29+
$CC --version
4930
50-
- name: Build zauth
31+
- name: Build zauth release binary
5132
run: |
52-
cargo build --release --target $TARGET
33+
cargo build --release --target aarch64-apple-darwin
5334
54-
- name: Copy zauth binary
35+
- name: Copy built binary
5536
run: |
56-
mkdir -p build-artifacts
57-
cp target/$TARGET/release/zauth build-artifacts/
37+
mkdir -p release
38+
cp target/aarch64-apple-darwin/release/zauth release/zauth-aarch64-apple-darwin
5839
59-
- name: Upload zauth macOS ARM binary
60-
uses: actions/upload-artifact@v4
40+
- name: Upload macOS ARM64 release binary
41+
uses: actions/upload-artifact@v3
6142
with:
62-
name: zauth-macos-arm
63-
path: build-artifacts/zauth
43+
name: zauth-macos-arm64
44+
path: release/zauth-aarch64-apple-darwin

0 commit comments

Comments
 (0)