Skip to content

Commit f4c4b1d

Browse files
testing build
1 parent 83e4d86 commit f4c4b1d

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

.github/workflows/build-zauth.yaml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,16 @@ jobs:
2222
with:
2323
osx-version: ${{ env.SDK_VERSION }}
2424

25+
- name: Find osxcross clang path
26+
run: |
27+
echo "Searching for aarch64-apple-darwin clang binaries..."
28+
find $HOME $GITHUB_WORKSPACE /usr/local -type f -name 'aarch64-apple-darwin*-clang' 2>/dev/null | tee clang_paths.txt
29+
2530
- name: Locate osxcross toolchain
2631
id: locate
2732
run: |
28-
TOOLCHAIN_DIR=$(find $HOME $GITHUB_WORKSPACE -type d -path "*/osxcross/target/bin" | head -n 1)
29-
echo "Found toolchain in: $TOOLCHAIN_DIR"
33+
TOOLCHAIN_DIR=$(find $HOME $GITHUB_WORKSPACE -type f -name 'aarch64-apple-darwin*-clang' | head -n 1 | xargs dirname)
34+
echo "Found toolchain bin directory: $TOOLCHAIN_DIR"
3035
echo "toolchain=$TOOLCHAIN_DIR" >> $GITHUB_OUTPUT
3136
3237
- name: Install Rust (with macOS ARM64 target)
@@ -42,16 +47,14 @@ jobs:
4247
- name: Build zauth
4348
run: |
4449
cd libs/libzauth/libzauth-c
45-
export OSXCROSS_TARGET=${{ steps.locate.outputs.toolchain }}/..
46-
export CC=${OSXCROSS_TARGET}/bin/aarch64-apple-darwin-clang
47-
export CXX=${OSXCROSS_TARGET}/bin/aarch64-apple-darwin-clang++
48-
export AR=${OSXCROSS_TARGET}/bin/aarch64-apple-darwin-ar
49-
export SDKROOT=${OSXCROSS_TARGET}/SDK/MacOSX${SDK_VERSION}.sdk
50+
export CC=${{ steps.locate.outputs.toolchain }}/aarch64-apple-darwin-clang
51+
export CXX=${{ steps.locate.outputs.toolchain }}/aarch64-apple-darwin-clang++
52+
export AR=${{ steps.locate.outputs.toolchain }}/aarch64-apple-darwin-ar
53+
export SDKROOT=$(dirname $(dirname ${{ steps.locate.outputs.toolchain }}))/SDK/MacOSX${SDK_VERSION}.sdk
5054
export MACOSX_DEPLOYMENT_TARGET=11.0
5155
export CFLAGS="-isysroot $SDKROOT -arch arm64 -mmacosx-version-min=11.0"
5256
export LDFLAGS="-isysroot $SDKROOT -arch arm64"
5357
export PKG_CONFIG_ALLOW_CROSS=1
54-
export OSXCROSS_NO_INCLUDE_PATHS=1
5558
export CARGO_TARGET_AARCH64_APPLE_DARWIN_LINKER=$CC
5659
$CC --version || (echo "clang missing" && exit 1)
5760
cargo build --release --target aarch64-apple-darwin --verbose

0 commit comments

Comments
 (0)