-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (54 loc) · 1.7 KB
/
compiler.yml
File metadata and controls
62 lines (54 loc) · 1.7 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Dana Compiler CI
on:
push:
pull_request:
jobs:
compiler-tests:
runs-on: ubuntu-latest
env:
LLVM_VERSION: "14"
LLVM_CONFIG: "llvm-config-14"
CC: "clang-14"
CXX: "clang++-14"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install LLVM/Clang ${{ env.LLVM_VERSION }}
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y \
llvm-${LLVM_VERSION} llvm-${LLVM_VERSION}-dev \
clang-${LLVM_VERSION} lld-${LLVM_VERSION} \
make build-essential
# Sanity checks
${LLVM_CONFIG} --version
${LLVM_CONFIG} --cxxflags
${CC} --version
${CXX} --version
- name: Provide plain llvm-config on PATH
shell: bash
run: |
# Your Makefile calls `llvm-config` (without suffix).
# Create a symlink to llvm-config-14 so those backticks work.
sudo ln -sf /usr/bin/llvm-config-14 /usr/local/bin/llvm-config
echo "/usr/local/bin" >> $GITHUB_PATH
which llvm-config
llvm-config --version
llvm-config --cxxflags
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
# test_compiler.py will run `make` in ./compiler, which now finds `llvm-config`
- name: Run Compiler Tests
shell: bash
env:
LLVM_VERSION: ${{ env.LLVM_VERSION }}
LLVM_CONFIG: ${{ env.LLVM_CONFIG }}
CC: ${{ env.CC }}
CXX: ${{ env.CXX }}
run: |
echo "Executing Python Compiler test script..."
cd testing
python test_compiler.py