Skip to content

Commit

Permalink
ci: Use llvm-config to set environment variables for macOS prebuilds
Browse files Browse the repository at this point in the history
  • Loading branch information
kyakdan committed Jan 13, 2023
1 parent 447088f commit cb3878a
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/prerelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,16 @@ jobs:
- name: install dependencies (macos)
if: contains(matrix.os, 'macos')
run: |
brew install cmake llvm@11
LLVM_PATH=$(brew --prefix llvm@11)
LLVM_VERSION=11.1.0
brew install cmake llvm@14
LLVM_PATH=$(brew --prefix llvm@14)
LLVM_CONFIG_PATH=$LLVM_PATH/bin/llvm-config
echo "CC=$($LLVM_CONFIG_PATH --bindir)/clang" >> $GITHUB_ENV
echo "CXX=$($LLVM_CONFIG_PATH --bindir)/clang++" >> $GITHUB_ENV
echo "CFLAGS=$($LLVM_CONFIG_PATH --cflags)" >> $GITHUB_ENV
echo "CXXFLAGS=$($LLVM_CONFIG_PATH --cxxflags)" >> $GITHUB_ENV
echo "LDFLAGS=$($LLVM_CONFIG_PATH --ldflags)" >> $GITHUB_ENV
echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> $GITHUB_ENV
echo "CPATH=$LLVM_PATH/lib/clang/$LLVM_VERSION/include/" >> $GITHUB_ENV
echo "LDFLAGS=-L$LLVM_PATH/lib" >> $GITHUB_ENV
echo "CPPFLAGS=-I$LLVM_PATH/include" >> $GITHUB_ENV
echo "CC=$LLVM_PATH/bin/clang" >> $GITHUB_ENV
echo "CXX=$LLVM_PATH/bin/clang++" >> $GITHUB_ENV
echo "LLVM_CONFIG_PATH=$LLVM_PATH/bin/llvm-config" >> $GITHUB_ENV
echo "PATH=$PATH:$LLVM_PATH/bin" >> $GITHUB_ENV
echo "PATH=$PATH:$($LLVM_CONFIG_PATH --bindir)" >> $GITHUB_ENV
- name: MSVC (windows)
uses: ilammy/msvc-dev-cmd@d8610e2b41c6d0f0c3b4c46dad8df0fd826c68e1
if: contains(matrix.os, 'windows')
Expand Down

0 comments on commit cb3878a

Please sign in to comment.