-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (46 loc) · 1.33 KB
/
build_test.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
53
name: llvm essential build and test
env:
VERSION: 18
on:
pull_request:
branches: [ main ]
schedule:
- cron: '0 23 * * *' # Runs at 2am everyday
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout llvm-essential
uses: actions/checkout@v4
with:
path: llvm-essential
- name: Install llvm and clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh $VERSION
sudo apt install -y libclang-$VERSION-dev mlir-$VERSION-tools libmlir-$VERSION-dev
- name: Preparing test environment
run: |
sudo apt install python3-pip libcurl4-openssl-dev libedit-dev libgtest-dev -y
pip3 install lit
- name: Get riscv-gnu-toolchain
run: |
cd ${{github.workspace}}/llvm-essential
bash install-riscv.sh
export PATH=/opt/riscv/bin:$PATH
- name: Start building
run: |
cd ${{github.workspace}}/llvm-essential
export PATH=/usr/lib/llvm-$VERSION/bin:$PATH
cmake -B build -S . -DHOME=$HOME -DENABLE_SMALL_CC=ON
cmake --build build
- name: Start lit test
run: |
cd ${{github.workspace}}/llvm-essential
lit test
- name: Start ctest
run: |
cd ${{github.workspace}}/llvm-essential/build
ctest