Skip to content

testing python 3.11 as minimum version in CI #106

testing python 3.11 as minimum version in CI

testing python 3.11 as minimum version in CI #106

Workflow file for this run

name: CMake
on:
push:
branches: [ public ]
pull_request:
branches: [ public ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build_unix:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macos-14 ]
python-version: [ "3.11", "3.13" ]
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup python
uses: actions/setup-python@v5
id: setpy
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
# Build your program with the given configuration
run: |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
${{github.workspace}}/install/install_python.sh
env:
SP_DIR: __DETECT__
SOURCE_DIR: ${{github.workspace}}
BUILD_DIR: ${{github.workspace}}/build
- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: |
ctest -C ${{env.BUILD_TYPE}}
../install/install_test.sh
cd ../tests/ && python -m pytest -sv .
- name: TestCli
run: |
${{github.workspace}}/tests/test_cli.sh
env:
SOURCE_DIR: ${{github.workspace}}
BUILD_DIR: ${{github.workspace}}/build
PYTHONPATH: /usr/lib/python${{ matrix.python-version }}/dist-packages
- name: Build_nopython
run: |
cmake -B ${{github.workspace}}/build_nopython -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DPYTHON_INTERFACE:BOOL=OFF
cmake --build ${{github.workspace}}/build_nopython --config ${{env.BUILD_TYPE}}
ctest -C ${{env.BUILD_TYPE}}
build_windows:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2022 ]
python-version: [ "3.11", "3.13" ]
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_MMAP=OFF -DBUILD_TESTS=OFF -DSYSTEM_XDRFILE=ON
- name: Build
# Build your program with the given configuration
run: |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: TestPy
working-directory: ${{github.workspace}}/tests
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: |
copy ${{github.workspace}}/build/${{env.BUILD_TYPE}}/pyanalisi* .
pip install pytest pytest-regressions pandas matplotlib numpy scipy testbook k3d ipykernel
pytest -sv .