-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (37 loc) · 1.49 KB
/
run_tests.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
40
41
42
43
44
45
46
47
48
49
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
name: Build and test on ubuntu
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install LLVM
run: |
sudo apt remove llvm* clang* -y
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 20 all
# This may be a little excessive but works for the purposes of CI. This
# helps Boost pick the correct header files as libstdc++ and libc++ conflict.
- name: Remove libc++
run: sudo apt purge libc++*
- name: Make a symbolic link to lli-20
run: sudo ln -s /usr/bin/lli-20 /usr/bin/lli
- name: Install Prerequisites
run: sudo apt update && sudo apt install libboost1.74-all-dev default-jre libfmt-dev -y
- name: Download ANTLR4.13.2
run: wget https://www.antlr.org/download/antlr-4.13.2-complete.jar -O ${{github.workspace}}/antlr-4.13.2-complete.jar && chmod +x ${{github.workspace}}/antlr-4.13.2-complete.jar
- name: Configure CMake
run: export PATH="${{github.workspace}}:$PATH" && echo $PATH && cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -- -j4
- name: Test
working-directory: ${{github.workspace}}/build
run: ./ktest