[build] correction #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: [ unstable ] | |
pull_request: | |
branches: [ unstable ] | |
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} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache/restore@v3 | |
with: | |
path: ${{ env.CCACHE_DIR }} | |
key: ccache-${{ matrix.os }}-${{ matrix.cc }}-${{ github.run_id }} | |
restore-keys: | |
ccache-${{ matrix.os }}-${{ matrix.cc }}- | |
- name: Install ubuntu dependencies | |
if: matrix.os == 'ubuntu-22.04' | |
run: > | |
sudo apt-get update && | |
sudo apt-get install | |
ccache | |
clang-15 | |
llvm-15-dev | |
libblas-dev | |
libc++-15-dev | |
libc++abi-15-dev | |
libomp-15-dev | |
python3 | |
python3-dev | |
python3-numpy | |
python3-pip | |
&& | |
pip3 install myst-parser linkify-it-py && | |
pip3 install sphinx==5.3.0 sphinx-rtd-theme | |
- name: Install homebrew dependencies | |
if: matrix.os == 'macos-14' | |
run: | | |
brew install llvm [email protected] | |
pip3 install numpy | |
- name: add clang cxxflags | |
if: ${{ contains(matrix.cxx, 'clang') }} | |
run: | |
echo "CXXFLAGS=-stdlib=libc++" >> $GITHUB_ENV | |
- name: Build clair | |
env: | |
CC: ${{ matrix.cc }} | |
CXX: ${{ matrix.cxx }} | |
LIBRARY_PATH: /usr/local/opt/llvm/lib | |
run: | | |
cmake -B build -S. -DCMAKE_INSTALL_PREFIX=$HOME/install -DBuild_Documentation=${{ matrix.doc }} | |
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 | |
- name: Deploy documentation to website | |
if: matrix.doc == 'ON' && github.ref == 'refs/heads/main' | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: build/doc/html | |
branch: github.io | |
target-folder: docs/main | |