-
Notifications
You must be signed in to change notification settings - Fork 64
52 lines (50 loc) · 1.83 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@v2
- 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-15 main"
sudo apt-get update
sudo apt-get install -y llvm-15 llvm-15-dev libllvm15 clang-15 libclang-common-15-dev libclang-15-dev llvm-15-tools libomp-15-dev libmlir-15 libmlir-15-dev
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-15/ -DCMAKE_BUILD_TYPE=${{ matrix.type }} ../
make -j2
/usr/lib/llvm-15/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-15/lib/cmake/clang/ -DCMAKE_BUILD_TYPE=${{ matrix.type }} ../
make -j2
lit test/