Skip to content

Commit ccead2b

Browse files
committed
Add a GitHub Actions workflow to test different LLVM versions
1 parent 0c82f7d commit ccead2b

File tree

2 files changed

+58
-1
lines changed

2 files changed

+58
-1
lines changed

.github/workflows/build-test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Build and test
22

3-
on: [push, pull_request]
3+
on:
4+
workflow_dispatch:
5+
#on: [push, pull_request]
46

57
concurrency:
68
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/test-llvm.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Test LLVM releases
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '30 21 * * 1'
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
build-ubuntu:
14+
strategy:
15+
matrix:
16+
include:
17+
- { llvm: 13 }
18+
- { llvm: 15 }
19+
- { llvm: 17 }
20+
- { llvm: 18 }
21+
- { llvm: 19 }
22+
- { llvm: 20 }
23+
name: LLVM ${{ matrix.llvm }}
24+
runs-on: ubuntu-22.04
25+
steps:
26+
- uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 1
29+
- name: Install LLVM
30+
run: |
31+
wget https://apt.llvm.org/llvm.sh
32+
chmod +x llvm.sh
33+
sudo ./llvm.sh ${{ matrix.llvm }}
34+
- name: Install other dependencies
35+
run: |
36+
sudo apt-get update
37+
sudo apt-get install automake flex check \
38+
libdw-dev libffi-dev libreadline-dev tcl8.6-dev \
39+
libzstd-dev libxml2-utils libjansson-dev
40+
- name: Generate configure script
41+
run: ./autogen.sh
42+
- name: Configure
43+
run: |
44+
mkdir build && cd build
45+
../configure --with-llvm=/usr/bin/llvm-config --enable-debug \
46+
--with-llvm=/usr/bin/llvm-config-${{ matrix.llvm }}
47+
- name: Build
48+
run: make -C build -j $(nproc)
49+
- name: Check version
50+
run: ./build/bin/nvc --version
51+
- name: Test
52+
run: |
53+
export NVC_JIT_ASYNC=0
54+
export NVC_JIT_THRESHOLD=1
55+
make -C build check

0 commit comments

Comments
 (0)