Skip to content

Bump Python / Numpy supported versions #360

Bump Python / Numpy supported versions

Bump Python / Numpy supported versions #360

Workflow file for this run

on:
push:
branches: [main]
pull_request:
branches: [main]
name: Tests
jobs:
test_cpp:
name: Test C++ (${{ matrix.cfg.label }})
runs-on: ${{ matrix.cfg.os }}
defaults:
run:
shell: bash -el {0}
strategy:
fail-fast: false
matrix:
cfg:
- {os: ubuntu-latest, gcc: 9, label: "linux / gcc 9"}
- {os: ubuntu-latest, gcc: 11, label: "linux / gcc 11"}
- {os: macos-12, label: "macos 12"}
- {os: macos-14, label: "macos 14"}
- {os: windows-latest, label: "windows"}
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up GCC (Linux)
uses: egor-tensin/setup-gcc@v1
with:
version: ${{ matrix.cfg.gcc }}
platform: x64
if: runner.os == 'Linux'
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment-dev.yml
cache-environment: true
cache-downloads: false
- name: Configure Fastscapelib (CMake)
run: |
cmake -S . -B build \
-DFS_DOWNLOAD_GTEST=ON \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX
- name: Build Fastscapelib
run: cmake --build build
- name: Run tests
run: |
cd build
ctest -T test --output-on-failure .
test_py:
name: Test Python (${{ matrix.os }} / ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-20.04", "ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment-python-dev.yml
cache-environment: true
cache-downloads: false
create-args: >-
python=${{ matrix.python-version }}
- name: Build and install Fastscapelib Python
run: |
python -m pip install . -v --no-build-isolation
- name: Run tests
run: |
pytest python/fastscapelib/tests -vv --color=yes