Skip to content

Commit d0669e2

Browse files
authored
github: setup test matrix for LLVM API tests (#372)
* github: setup test matrix for LLVM API tests - Add test matrix to run LLVM API tests with the following two LLVM versions - Latest release tag - Latest trunk commit Signed-off-by: Jerry Zhang Jian <[email protected]> * github: make full use of vCPU when building LLVM Signed-off-by: Jerry Zhang Jian <[email protected]> --------- Signed-off-by: Jerry Zhang Jian <[email protected]>
1 parent 1e9f86b commit d0669e2

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/clang-compilation.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on: [push]
44
jobs:
55
build:
66
runs-on: ubuntu-latest
7+
strategy:
8+
matrix:
9+
llvm-version: ["main", "latest-rel"]
710
steps:
811
- uses: actions/checkout@v4
912
- uses: actions/setup-python@v5
@@ -19,7 +22,14 @@ jobs:
1922
run: |
2023
cd ..
2124
rm -rf llvm-project
22-
git clone https://github.com/llvm/llvm-project
25+
git clone https://github.com/llvm/llvm-project -j `nproc`
26+
- name: Checkout LLVM version
27+
run: |
28+
cd ../llvm-project
29+
if [ "${{ matrix.llvm-version }}" = "latest-rel" ]; then
30+
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`)
31+
git checkout $latestTag
32+
fi
2333
- name: Build LLVM with Ninja
2434
run: |
2535
cd ../llvm-project
@@ -34,7 +44,7 @@ jobs:
3444
-DLLVM_DEFAULT_TARGET_TRIPLE="riscv64-unknown-linux-gnu" \
3545
-DLLVM_ENABLE_PROJECTS="clang;lld" \
3646
../llvm
37-
ninja -j 4
47+
ninja -j `nproc`
3848
echo $(pwd)
3949
ls bin
4050
- name: Run compilation test, non-overloaded intrinsics (default (TAMA) policy)

0 commit comments

Comments
 (0)