File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -121,16 +121,23 @@ jobs:
121121 zvm use ${{ env.ZIG_VERSION }}
122122 echo "$HOME/.zvm/bin" >> $GITHUB_PATH
123123 echo "$HOME/.zvm/self" >> $GITHUB_PATH
124- - name : Install LLVM and dependencies
124+ - name : Download LLVM
125125 run : |
126- brew install llvm@21 zlib
127- export LDFLAGS="-L/opt/homebrew/lib"
128- export CPPFLAGS="-I/opt/homebrew/include"
129- export LIBRARY_PATH="/opt/homebrew/lib:$LIBRARY_PATH"
126+ LLVM_VERSION="21.0.0"
127+ LLVM_DIR="/tmp/llvm"
128+ mkdir -p "$LLVM_DIR"
129+ curl -sSL "https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/clang+llvm-${LLVM_VERSION}-arm64-apple-darwin.tar.xz" -o /tmp/llvm.tar.xz
130+ tar -xf /tmp/llvm.tar.xz -C "$LLVM_DIR" --strip-components=1
131+ rm /tmp/llvm.tar.xz
132+ echo "LLVM_DIR=$LLVM_DIR" >> $GITHUB_ENV
133+ echo "PATH=$LLVM_DIR/bin:$PATH" >> $GITHUB_PATH
130134 - name : Build
131135 run : |
132- export LDFLAGS="-L/opt/homebrew/lib -lz"
133- export LIBRARY_PATH="/opt/homebrew/lib"
136+ export CC="$LLVM_DIR/bin/clang"
137+ export CXX="$LLVM_DIR/bin/clang++"
138+ export LDFLAGS="-L$LLVM_DIR/lib -lz"
139+ export CPPFLAGS="-I$LLVM_DIR/include"
140+ export LIBRARY_PATH="$LLVM_DIR/lib"
134141 zig build -Doptimize=ReleaseFast -Dtarget=aarch64-macos
135142 - name : Package
136143 run : |
You can’t perform that action at this time.
0 commit comments