Skip to content

Commit

Permalink
Upgrade CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tdegeus committed Nov 23, 2023
1 parent 117fe51 commit 0c7e6ca
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 23 deletions.
44 changes: 23 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,55 +17,57 @@ jobs:
include:
- runs-on: ubuntu-latest
config: -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=1
conda: environment.yaml
prop: tests & examples
- runs-on: macos-latest
config: -DCMAKE_BUILD_TYPE=Release -DBUILD_ALL=1
conda: environment.yaml
prop: tests
- runs-on: windows-latest
config: -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=1 -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
conda: environment.yaml
prop: tests

defaults:
run:
shell: bash -l {0}
shell: bash -e -l {0}

name: ${{ matrix.runs-on }} • x64 ${{ matrix.args }}
name: ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}

steps:

- name: Basic GitHub action setup
- name: Clone this library
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set conda environment
uses: mamba-org/provision-with-micromamba@main
- name: Create conda environment
uses: mamba-org/setup-micromamba@main
with:
environment-file: ${{ matrix.conda }}
environment-file: environment.yaml
environment-name: myenv
init-shell: bash
cache-downloads: true
create-args: >-
${{ runner.os == 'Windows' && 'ninja' || '' }}
${{ runner.os == 'Windows' && 'clang_win-64' || '' }}
- name: Install clang
if: runner.os == 'Windows'
run: micromamba install -c conda-forge clang_win-64 ninja

- name: Set dummy version
run: echo "SETUPTOOLS_SCM_PRETEND_VERSION=0.0" >> $GITHUB_ENV
- 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: cmake -Bbuild ${{ matrix.config }}

- name: Build C++ ${{ matrix.prop }}
- name: Build C++
working-directory: build
run: cmake --build .

- name: Run C++ ${{ matrix.prop }}
- name: Run C++
working-directory: build
run: ctest --output-on-failure

- name: Build and install Python module
run: python setup.py install --build-type Release -vv
run: python -m pip install . -v --no-build-isolation

- name: Run Python tests
run: pytest

- name: Run Python tests
if: runner.os == 'macOS'
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ repos:
hooks:
- id: cpp_comment_format
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.4
rev: v17.0.5
hooks:
- id: clang-format
args: [-i]
Expand Down
4 changes: 3 additions & 1 deletion include/GooseEYE/GooseEYE.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ class Clusters {
*/
template <class T>
Clusters(const T& f, bool periodic = true)
: Clusters(f, kernel::nearest(f.dimension()), periodic){};
: Clusters(f, kernel::nearest(f.dimension()), periodic)
{
}

/**
* Constructor.
Expand Down

0 comments on commit 0c7e6ca

Please sign in to comment.