Skip to content

[cmake] Reenable C as project language #57

[cmake] Reenable C as project language

[cmake] Reenable C as project language #57

Workflow file for this run

name: build
on:
push:
branches: [ unstable ]
pull_request:
branches: [ unstable ]
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- {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-${{ matrix.llvm }}
llvm-${{ matrix.llvm }}-dev
libclang-${{ matrix.llvm }}-dev
libblas-dev
libomp-${{ matrix.llvm }}-dev
clang-format-${{ matrix.llvm }}
python3
python3-dev
python3-numpy
python3-scipy
python3-pip
python3-sphinx
python3-sphinx-rtd-theme
python3-sphinx-copybutton
python3-myst-parser &&
pip3 install linkify-it-py
- name: Build clair
env:
CC: clang-${{ matrix.llvm }}
CXX: clang++-${{ matrix.llvm }}
run: |
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
run: |
cd build
ctest -j2 --output-on-failure
- name: Deploy documentation to website
if: matrix.doc == 'ON' && github.ref == 'refs/heads/unstable'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build/doc/html
branch: github.io
target-folder: docs/unstable