-
Notifications
You must be signed in to change notification settings - Fork 64
52 lines (50 loc) · 1.8 KB
/
x86-ubuntu.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-Ubuntu
on:
push:
pull_request:
branches: [ main ]
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
compiler:
- { compiler: GNU, CC: gcc-10, CXX: g++-10 }
- { compiler: LLVM, CC: clang-10, CXX: clang++-10 }
type: [Debug, Release]
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-18 main"
sudo apt-get update
sudo apt-get install -y llvm-18 llvm-18-dev libllvm18 clang-18 libclang-common-18-dev libclang-18-dev llvm-18-tools
sudo apt-get install python3-setuptools
sudo apt-get install ${{ matrix.compiler.CXX }}
sudo pip3 install lit
- name: Build HelloWorld
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
run: |
cd HelloWorld
mkdir build && cd build
# HelloWorld only supports CT_Clang_INSTALL_DIR
cmake -DCT_Clang_INSTALL_DIR=/usr/lib/llvm-18/ -DCMAKE_BUILD_TYPE=${{ matrix.type }} ../
make -j2
/usr/lib/llvm-18/bin/clang -cc1 -load ./libHelloWorld.so -plugin hello-world $GITHUB_WORKSPACE/test/HelloWorld-basic.cpp
- name: Build clang-tutor + run tests
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
run: |
cd $GITHUB_WORKSPACE
mkdir build && cd build
# Test with Clang_ROOT
cmake -DClang_ROOT=/usr/lib/llvm-18/lib/cmake/clang/ -DCMAKE_BUILD_TYPE=${{ matrix.type }} ../
make -j2
lit test/