Apple Silicon #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Apple Silicon | |
on: | |
push: | |
pull_request: | |
branches: [ main ] | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
type: [Debug, Release] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Unbreak Python in Github Actions | |
# See: | |
# * https://github.com/actions/runner-images/issues/2322 | |
# * https://github.com/libui-ng/libui-ng/commit/97d9601e74fadea1f8d1869c77acbe24be2886e2 | |
run: | | |
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete | |
sudo rm -rf /Library/Frameworks/Python.framework/ | |
brew install --force python3 && brew unlink python3 && brew unlink python3 && brew link --overwrite python3 | |
- name: Install Dependencies | |
run: | | |
brew update | |
brew install llvm | |
brew install lit | |
- name: Build HelloWorld | |
run: | | |
cd HelloWorld | |
mkdir build && cd build | |
cmake -DCT_Clang_INSTALL_DIR=/opt/homebrew/opt/llvm/ -DCMAKE_BUILD_TYPE=${{ matrix.type }} ../ | |
make -j2 | |
/opt/homebrew/opt/llvm/bin/clang -cc1 -load ./libHelloWorld.dylib -plugin hello-world $GITHUB_WORKSPACE/test/HelloWorld-basic.cpp | |
- name: Build clang-tutor + run tests | |
run: | | |
cd $GITHUB_WORKSPACE | |
mkdir build && cd build | |
cmake -DCT_Clang_INSTALL_DIR=/opt/homebrew/opt/llvm/ -DCMAKE_BUILD_TYPE=${{ matrix.type }} ../ | |
make -j2 | |
lit test/ |