-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (32 loc) · 899 Bytes
/
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
name: Test
on:
push:
branches:
- main
jobs:
test:
name: Test PyLLVMPass
runs-on: ubuntu-latest
steps:
- name: "checkout repository"
uses: actions/checkout@v4
- name: "install rust"
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: "install llvm-18"
run: |
wget https://apt.llvm.org/llvm.sh
chmod u+x llvm.sh
sudo ./llvm.sh 18
- name: "install pytest"
run: |
pip install pytest
- name: "build"
run: |
which llvm-config-18
llvm-config-18 --ldflags
sudo ln -s $(llvm-config-18)/lib/libLLVM.so /lib/libLLVM.so
RUSTFLAGS=`llvm-config-18 --ldflags` cargo build
- name: "run tests"
run: |
cd test
LLVM_CONFIG=llvm-config-18 PYLLVM_PLUGIN_PATH=../target/debug/libpyllvmpass.so pytest