Skip to content

Commit

Permalink
[ghactions] Enable multiple different llvm versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentzell committed Apr 12, 2024
1 parent a7d1bb5 commit 8d1f024
Showing 1 changed file with 15 additions and 25 deletions.
40 changes: 15 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,38 @@ on:
pull_request:
branches: [ unstable ]

env:
LLVM: 15

jobs:
build:

strategy:
fail-fast: false
matrix:
include:
- {os: ubuntu-22.04, cc: clang-15, cxx: clang++-15, doc: ON}
#- {os: ubuntu-20.04, cc: clang-11, cxx: clang++-11}
#- {os: macos-14, cc: /usr/local/opt/llvm/bin/clang, cxx: /usr/local/opt/llvm/bin/clang++, doc: OFF}
- {os: ubuntu-22.04, llvm: 15, doc: ON}
- {os: ubuntu-22.04, llvm: 16, doc: OFF}
- {os: ubuntu-22.04, llvm: 17, doc: OFF}
- {os: ubuntu-22.04, llvm: 18, doc: OFF}

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4


- name: Install ubuntu dependencies
if: matrix.os == 'ubuntu-22.04'
run: >
sudo apt-get update &&
sudo apt-get install lsb-release wget software-properties-common &&
wget -O /tmp/llvm.sh https://apt.llvm.org/llvm.sh &&
chmod +x /tmp/llvm.sh && sudo /tmp/llvm.sh ${{ matrix.llvm }} &&
sudo apt-get install
ccache
clang-15
llvm-15-dev
libclang-15-dev
clang-${{ matrix.llvm }}
llvm-${{ matrix.llvm }}-dev
libclang-${{ matrix.llvm }}-dev
libblas-dev
libomp-15-dev
clang-format-15
libomp-${{ matrix.llvm }}-dev
clang-format-${{ matrix.llvm }}
python3
python3-dev
python3-numpy
Expand All @@ -49,24 +49,15 @@ jobs:
python3-myst-parser &&
pip3 install linkify-it-py
- name: Install homebrew dependencies
if: matrix.os == 'macos-14'
run: |
brew install llvm [email protected]
pip3 install numpy
- name: Build clair
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
LIBRARY_PATH: /usr/local/opt/llvm/lib
CC: clang-${{ matrix.llvm }}
CXX: clang++-${{ matrix.llvm }}
run: |
cmake -B build -S. -DLLVM_CONFIG=/usr/bin/llvm-config-15 -DCMAKE_INSTALL_PREFIX=$HOME/install -DBuild_Documentation=${{ matrix.doc }}
cmake -B build -S. -DLLVM_CONFIG=/usr/bin/llvm-config-${{ matrix.llvm }} -DCMAKE_INSTALL_PREFIX=$HOME/install -DBuild_Documentation=${{ matrix.doc }}
cd build && make -j2 || make -j1 VERBOSE=1
- name: Test clair
env:
DYLD_FALLBACK_LIBRARY_PATH: /usr/local/opt/llvm/lib
run: |
cd build
ctest -j2 --output-on-failure
Expand All @@ -78,4 +69,3 @@ jobs:
folder: build/doc/html
branch: github.io
target-folder: docs/unstable

0 comments on commit 8d1f024

Please sign in to comment.