Skip to content

llvm essential build and test #154

llvm essential build and test

llvm essential build and test #154

Workflow file for this run

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