-
Notifications
You must be signed in to change notification settings - Fork 64
52 lines (50 loc) · 1.56 KB
/
x86-darwin-llvm-from-sources.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
46
47
48
49
50
51
52
name: x86-Darwin-llvm-from-sources
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: Download Ninja
run: |
git clone https://github.com/ninja-build/ninja.git
pushd ninja
./configure.py --bootstrap
popd
- name: Add Ninja to $PATH
run: |
echo "${GITHUB_WORKSPACE}/ninja" >> $GITHUB_PATH
- name: Clone llvm-project
run: |
git clone --depth 1 --single-branch --branch release/16.x https://github.com/llvm/llvm-project
- name: Build LLVM & Clang
run: |
cd llvm-project
git checkout release/16.x
mkdir build && cd build
cmake -G Ninja \
-DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang" \
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" \
-DLLVM_TARGETS_TO_BUILD="X86" \
-DLLVM_OPTIMIZED_TABLEGEN=ON \
-DDEFAULT_SYSROOT="$(xcrun --show-sdk-path)" \
../llvm
ninja
- name: Install lit
run: |
brew install lit
- name: Build HelloWorld
run: |
cd HelloWorld
mkdir build && cd build
cmake -DCT_Clang_INSTALL_DIR="$GITHUB_WORKSPACE/llvm-project/build" ../
make -j2
- name: Build clang-tutor + run tests
run: |
mkdir build && cd build
cmake -DCT_Clang_INSTALL_DIR="$GITHUB_WORKSPACE/llvm-project/build" ../
make -j2
lit -va test/