Skip to content

Commit 517da5c

Browse files
CI tests for LLVM 10, 14, 15 and 16 (#2754)
* CI tests for LLVM 10, 14, 15 and 16 by default we test LLVM 11 * add sympy dependency for LLVM tests * changed dependencies according to my local machine, where tests pass * fix . * Update .github/workflows/CI.yml Co-authored-by: Shaikh Ubaid <shaikhubaid769@gmail.com> * figuring out cause of error Commenting out tests that throw LLVM exceptions * figuring out cause of error skipping ctest, checking if integration tests pass * remove LLVM 14 test --------- Co-authored-by: Shaikh Ubaid <shaikhubaid769@gmail.com>
1 parent cd75eeb commit 517da5c

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed

.github/workflows/CI.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,55 @@ jobs:
496496
cd integration_tests
497497
./run_tests.py -b cpython c_py
498498
499+
test_llvm:
500+
name: Test LLVM ${{ matrix.llvm-version }}
501+
runs-on: ubuntu-latest
502+
strategy:
503+
fail-fast: false
504+
matrix:
505+
llvm-version: ["10", "15", "16"]
506+
steps:
507+
- uses: actions/checkout@v4
508+
with:
509+
fetch-depth: 0
510+
511+
- uses: mamba-org/setup-micromamba@v1.8.0
512+
with:
513+
environment-file: ci/environment_linux_llvm.yml
514+
create-args: >-
515+
llvmdev=${{ matrix.llvm-version }}
516+
517+
- uses: hendrikmuhs/ccache-action@main
518+
with:
519+
variant: sccache
520+
key: ${{ github.job }}-${{ matrix.llvm-version }}
521+
522+
- name: Build Linux
523+
shell: bash -e -l {0}
524+
run: |
525+
./build0.sh
526+
export CXXFLAGS="-Werror"
527+
cmake . -G"Unix Makefiles" \
528+
-DCMAKE_BUILD_TYPE=Debug \
529+
-DWITH_LLVM=yes \
530+
-DLFORTRAN_BUILD_ALL=yes \
531+
-DWITH_STACKTRACE=no \
532+
-DWITH_RUNTIME_STACKTRACE=yes \
533+
-DCMAKE_PREFIX_PATH="$CONDA_PREFIX" \
534+
-DCMAKE_INSTALL_PREFIX=`pwd`/inst \
535+
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
536+
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
537+
538+
cmake --build . -j16 --target install
539+
540+
- name: Test Linux LLVM ${{ matrix.llvm-version }}
541+
shell: bash -e -l {0}
542+
run: |
543+
ctest --output-on-failure
544+
cd integration_tests
545+
./run_tests.py -b llvm llvm_jit
546+
./run_tests.py -b llvm llvm_jit -f
547+
499548
build_jupyter_kernel:
500549
name: Build Jupyter Kernel
501550
runs-on: ubuntu-latest

ci/environment_linux_llvm.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: lp
2+
channels:
3+
- conda-forge
4+
- defaults
5+
dependencies:
6+
- git
7+
- pip
8+
- make
9+
- re2c
10+
- toml
11+
- zlib
12+
- cmake
13+
- numpy
14+
- flake8
15+
- setuptools
16+
- bison=3.4
17+
- python=3.10.2
18+
- zstd-static=1.5
19+
- symengine=0.12.0
20+
- sympy=1.11.1

0 commit comments

Comments
 (0)