Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,22 @@ on:

jobs:
test-job:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}

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

strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11", "3.12"]
include:
- os: windows-latest
python-version: "3.12"
- os: macos-13
python-version: "3.12"

steps:
- uses: actions/checkout@v4

Expand All @@ -32,7 +39,7 @@ jobs:
miniforge-version: latest
use-mamba: true
activate-environment: cadet-python
channels: conda-forge,
channels: conda-forge

- name: Cache conda
uses: actions/cache@v3
Expand All @@ -41,26 +48,29 @@ jobs:
CACHE_NUMBER: 0
with:
path: ${{ env.CONDA }}/envs
key: python_${{ matrix.python-version }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}
key: ${{ matrix.os }}-python_${{ matrix.python-version }}-${{ steps.get-date.outputs.today }}-${{ hashFiles(env.CONDA_FILE) }}-${{ env.CACHE_NUMBER }}
id: cache

- name: Set up python env
run: |
mamba install python==${{ matrix.python-version }}
pip install .
conda install python=${{ matrix.python-version }}
conda run pip install .

- name: Install pypa/build
run: |
python -m pip install build --user
conda run python -m pip install build --user

- name: Build binary wheel and source tarball
run: |
python -m build --sdist --wheel --outdir dist/ .
conda run python -m build --sdist --wheel --outdir dist/ .

- name: Test Wheel install and import
run: |
python -c "import cadet; print(cadet.__version__)"
conda run python -c "import cadet; print(cadet.__version__)"
cd ..

- name: Test with pytest
run: |
pip install .[testing]
mamba install -c conda-forge cadet>=5.0.3
conda run pip install .[testing]
conda install -c conda-forge cadet>=5.0.3
pytest tests --rootdir=tests -m "not slow and not local"
3 changes: 3 additions & 0 deletions cadet/cadet.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ def resolve_cadet_paths(
if platform.system() == 'Windows':
dll_path = cadet_root / 'bin' / 'cadet.dll'
dll_debug_path = cadet_root / 'bin' / 'cadet_d.dll'
elif platform.system() == 'Darwin':
dll_path = cadet_root / 'lib' / 'libcadet.dylib'
dll_debug_path = cadet_root / 'lib' / 'libcadet_d.dylib'
else:
dll_path = cadet_root / 'lib' / 'libcadet.so'
dll_debug_path = cadet_root / 'lib' / 'libcadet_d.so'
Expand Down
Loading