Skip to content
Open
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
4 changes: 0 additions & 4 deletions .github/conda-env/build-env.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/scripts/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ donttest="test_root_locus_zoom or test_sisotool"
# don't care about deprecation warnings here
donttest="$donttest or test_default_deprecation"
pytest control/tests \
-m slycot \
--cov=$slycot_libdir \
--cov-config=${slycot_srcdir}/.coveragerc \
--ignore=control/tests/docstrings_test.py \
Expand Down
5 changes: 4 additions & 1 deletion .github/scripts/set-conda-test-matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}

conda_jobs = []
for conda_pkg_file in Path("slycot-conda-pkgs").glob("*/*.tar.bz2"):
for conda_pkg_file in Path("slycot-conda-pkgs").glob("*/*.conda"):
cos = osmap[conda_pkg_file.parent.name.split("-")[0]]
m = re.search(r'py(\d)(\d+)_', conda_pkg_file.name)
pymajor, pyminor = int(m[1]), int(m[2])
Expand All @@ -28,5 +28,8 @@
'blas_lib': cbl}
conda_jobs.append(cjob)

if not conda_jobs:
raise SystemExit("No conda packages found")

matrix = { 'include': conda_jobs }
print(json.dumps(matrix))
20 changes: 10 additions & 10 deletions .github/workflows/slycot-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ jobs:
retention-days: 5

build-conda:
name: Build conda, ${{ matrix.os }}
name: Build conda, ${{ matrix.os }} ${{ matrix.python }}
runs-on: ${{ matrix.os }}-latest
needs: build-sdist
strategy:
Expand All @@ -162,8 +162,7 @@ jobs:
- 'macos'
- 'windows'
python:
# this is not the packaged version, just the version conda-build runs on.
- '3.11'
- '3.13'

steps:
- name: Checkout Slycot
Expand All @@ -174,33 +173,33 @@ jobs:
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python }}
activate-environment: build-env
environment-file: .github/conda-env/build-env.yml
miniforge-version: latest
conda-build-version: 25.7.0
channel-priority: strict
channels: conda-forge,defaults
auto-update-conda: false
auto-activate-base: false
- name: Conda build
shell: bash -el {0}
run: |
set -e
conda build conda-recipe
conda build conda-recipe --python ${{ matrix.python }}
# preserve directory structure for custom conda channel
find "${CONDA_PREFIX}/conda-bld" -maxdepth 2 -name 'slycot*.tar.bz2' | while read -r conda_pkg; do
CONDA_ROOT=$(conda info --base)
find "${CONDA_ROOT}/conda-bld" -maxdepth 2 -name 'slycot*.conda' | while read -r conda_pkg; do
conda_platform=$(basename $(dirname "${conda_pkg}"))
mkdir -p "slycot-conda-pkgs/${conda_platform}"
cp "${conda_pkg}" "slycot-conda-pkgs/${conda_platform}/"
done
python -m conda_index ./slycot-conda-pkgs
conda index ./slycot-conda-pkgs
- name: Save to local conda pkg channel
uses: actions/upload-artifact@v4
with:
name: slycot-conda-pkgs-${{ matrix.os }}-${{ matrix.python }}
path: slycot-conda-pkgs
retention-days: 5


create-wheel-test-matrix:
name: Create wheel test matrix
runs-on: ubuntu-latest
Expand Down Expand Up @@ -404,6 +403,7 @@ jobs:
parallel: true
file: slycot-src/coverage.xml


coveralls-final:
name: Finalize parallel coveralls
if: always()
Expand Down
2 changes: 0 additions & 2 deletions conda-recipe/bld.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
:: correct FC, apparently pointed to host prefix??
set FC=%BUILD_PREFIX%\Library\bin\flang.exe
set BLAS_ROOT=%PREFIX%
set LAPACK_ROOT=%PREFIX%

Expand Down
85 changes: 43 additions & 42 deletions conda-recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,46 +1,47 @@
# https://github.com/conda-forge/blas-feedstock/issues/106#issuecomment-1771747983
# https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/main/recipe/conda_build_config.yaml
# https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/main/recipe/migrations/python312.yaml

# zip_keys Python/Numpy matrix to build for
python:
- 3.10.* *_cpython
- 3.12.* *_cpython
numpy:
- 1.23
- 1.26

zip_keys:
-
- python
- numpy

# Compiler selection
MACOSX_DEPLOYMENT_TARGET:
- '11.0' # [osx]
MACOSX_SDK_VERSION:
- '11.0' # [osx]
c_compiler:
- gcc # [linux]
- clang # [osx]
- vs2019 # [win and x86_64]
- vs2022 # [win and arm64]
c_compiler_version: # [unix]
- 12 # [linux]
- 16 # [osx]
fortran_compiler: # [unix or win64]
- gfortran # [linux64 or (osx and x86_64)]
- gfortran # [aarch64 or ppc64le or armv7l or s390x]
- flang # [win64]
fortran_compiler_version: # [unix or win64]
- 12 # [linux]
- 12 # [osx]
- 5 # [win64]

# Pinning

# blas
- vs2022 # [win64]
- gcc # [linux]
- clang # [osx]
c_compiler_version:
- '14' # [linux]
- '19' # [osx]
c_stdlib:
- vs # [win64]
- sysroot #[linux]
- macosx_deployment_target # [osx]
c_stdlib_version:
- '2.17' # [linux]
- '11.0' # [osx]
cdt_name:
- conda # [linux]
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
fortran_compiler:
- flang # [win64]
- gfortran # [linux or osx]
fortran_compiler_version:
- '5' # [win64]
- '14' # [linux or osx]
libblas:
- 3.9 *netlib
- 3.9 *netlib
libcblas:
- 3.9 *netlib
- 3.9 *netlib
liblapack:
- 3.9 *netlib
liblapacke:
- 3.9 *netlib
- 3.9 *netlib
numpy:
- '2'
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
python:
- 3.10.* *_cpython
- 3.11.* *_cpython
- 3.12.* *_cpython
- 3.13.* *_cp313
8 changes: 6 additions & 2 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ build:

requirements:
build:
- python # [build_platform != target_platform]
- cross-python_{{ target_platform }} # [build_platform != target_platform]
- numpy # [build_platform != target_platform]
- scikit-build >=0.15 # [build_platform != target_platform]
- {{ compiler('fortran') }}
- {{ compiler('c') }}
- {{ stdlib("c") }}
- cmake >=3.14
- make # [linux]
host:
Expand All @@ -26,8 +31,7 @@ requirements:
- setuptools >=45
- setuptools_scm >=7
run:
- python {{ PY_VER }}
- {{ pin_compatible('numpy') }}
- python

test:
requires:
Expand Down
Loading