Skip to content

Commit

Permalink
[github workflow] Add workflow to test latest LLVM toolchain compilat…
Browse files Browse the repository at this point in the history
…ion for the intrinsics

Signed-off-by: eop Chen <[email protected]>
  • Loading branch information
eopXD committed Sep 13, 2023
1 parent a95fcf7 commit 9a9fcfd
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/clang-compilation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Clang (LLVM) intrinsic test case compilation
on: [push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Prerequisites
run: |
sudo apt-get install autoconf automake autotools-dev curl python3 python3-pip libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev ninja-build git cmake libglib2.0-dev dejagnu
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install junitparser
- name: Download LLVM
run: |
cd ..
rm -rf llvm-project
git clone https://github.com/llvm/llvm-project
- name: Build LLVM with Ninja
run: |
cd ../llvm-project
mkdir build && cd build
cmake -G Ninja \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_CXX_COMPILER=g++ \
-DLLVM_TARGETS_TO_BUILD="RISCV" \
-DLLVM_PARALLEL_LINK_JOBS=12 \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DLLVM_DEFAULT_TARGET_TRIPLE="riscv64-unknown-linux-gnu" \
-DLLVM_ENABLE_PROJECTS="clang;lld" \
../llvm
ninja -j 4
echo $(pwd)
ls bin
- name: Run compilation test, non-overloaded intrinsics (default (TAMA) policy)
run: |
make -C rvv-intrinsic-generator run-api-testing COMPILER=$(pwd)/../llvm-project/build/bin/clang EXTRA_CFLAGS="-target riscv64"
- name: Run compilation test, overloaded intrinsics (default (TAMA) policy)
run: |
make -C rvv-intrinsic-generator run-overloaded-api-testing COMPILER=$(pwd)/../llvm-project/build/bin/clang EXTRA_CFLAGS="-target riscv64"
- name: Run compilation test, non-overloaded intrinsics (non-default policy)
run: |
make -C rvv-intrinsic-generator run-policy-api-testing COMPILER=$(pwd)/../llvm-project/build/bin/clang EXTRA_CFLAGS="-target riscv64"
- name: Run compilation test, overloaded intrinsics (non-default policy)
run: |
make -C rvv-intrinsic-generator run-policy-overloaded-api-testing COMPILER=$(pwd)/../llvm-project/build/bin/clang EXTRA_CFLAGS="-target riscv64"

0 comments on commit 9a9fcfd

Please sign in to comment.