Skip to content

Updating clang-format #79

Updating clang-format

Updating clang-format #79

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
standard:
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-latest, macos-latest, windows-latest]
defaults:
run:
shell: bash -e -l {0}
name: ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}
steps:
- name: Clone this library
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create conda environment
uses: mamba-org/setup-micromamba@main
with:
environment-file: environment.yaml
environment-name: myenv
init-shell: bash
cache-downloads: true
post-cleanup: all
condarc: |
channels:
- conda-forge
create-args: >-
matplotlib
${{ runner.os == 'Windows' && 'clang_win-64' || '' }}
- name: Export version of this library
run: |
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "SETUPTOOLS_SCM_PRETEND_VERSION=$LATEST_TAG" >> $GITHUB_ENV
- name: Configure using CMake
run: |
export MYARGS="${{ runner.os == 'Windows' && '-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++' || '' }}"
cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_ALL=1 ${MYARGS}
- name: Build C++
working-directory: build
run: cmake --build .
- name: Run C++
working-directory: build
run: ctest --output-on-failure
- name: Build and install Python module
run: python -m pip install . -v --no-build-isolation
- name: Run Python tests
run: python tests/python/main.py
- name: Run Python examples
run: |
python examples/python/match.py
python examples/overview/overview.py
- name: Build doxygen-docs (error on warning)
working-directory: build
run: cmake --build . --target html