-
Notifications
You must be signed in to change notification settings - Fork 64
45 lines (43 loc) · 1.5 KB
/
x86-darwin.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: x86-Darwin
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@v2
- 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@16
brew install lit
- name: Build HelloWorld
run: |
cd HelloWorld
mkdir build && cd build
cmake -DCT_Clang_INSTALL_DIR=/usr/local/opt/llvm/ -DCMAKE_BUILD_TYPE=${{ matrix.type }} ../
make -j2
/usr/local/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=/usr/local/opt/llvm/ -DCMAKE_BUILD_TYPE=${{ matrix.type }} ../
make -j2
lit test/