Skip to content
Draft
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
10 changes: 10 additions & 0 deletions .github/conda-env/example-env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: control-examples-env
dependencies:
- pip
- numpy
- matplotlib
- scipy
- slycot
- pmw
- jupyter
- ipython!=9.0
6 changes: 3 additions & 3 deletions .github/workflows/control-slycot-src.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ jobs:

steps:
- name: Checkout python-control
uses: actions/checkout@v3
uses: actions/checkout@v7
with:
path: python-control
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v7
with:
python-version: '3.12'
- name: Install Python dependencies and test tools
run: pip install -v './python-control[test]'

- name: Checkout Slycot
uses: actions/checkout@v3
uses: actions/checkout@v7
with:
repository: python-control/Slycot
submodules: recursive
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

steps:
- name: Checkout python-control
uses: actions/checkout@v3
uses: actions/checkout@v7

- name: Setup Conda
uses: conda-incubator/setup-miniconda@v3
Expand Down
27 changes: 13 additions & 14 deletions .github/workflows/install_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,19 @@ jobs:

steps:
- name: Check out the python-control sources
uses: actions/checkout@v3
- name: Set up conda using the preinstalled GHA Miniconda
run: echo $CONDA/bin >> $GITHUB_PATH
- name: Install Python dependencies from conda-forge
run: |
conda create \
--name control-examples-env \
--channel conda-forge \
--strict-channel-priority \
--quiet --yes \
python=3.12 pip \
numpy matplotlib scipy \
slycot pmw jupyter \
ipython!=9.0
uses: actions/checkout@v7

- name: Setup Conda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: 3.12
activate-environment: control-examples-env
environment-file: .github/conda-env/example-env.yml
miniforge-version: latest
channels: conda-forge,defaults
channel-priority: strict
auto-update-conda: false
auto-activate-base: false

- name: Install from source
run: |
Expand Down
34 changes: 16 additions & 18 deletions .github/workflows/os-blas-test-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ jobs:

steps:
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python }}
- name: Checkout Slycot
uses: actions/checkout@v3
uses: actions/checkout@v7
with:
repository: python-control/Slycot
fetch-depth: 0
Expand Down Expand Up @@ -113,29 +113,27 @@ jobs:

steps:
- name: Checkout Slycot
uses: actions/checkout@v3
uses: actions/checkout@v7
with:
repository: python-control/Slycot
fetch-depth: 0
submodules: 'recursive'
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v3
uses: conda-incubator/setup-miniconda@v4
with:
python-version: ${{ matrix.python }}
auto-update-conda: true
activate-environment: build-env
environment-file: .github/conda-env/build-env.yml
miniforge-version: latest
channels: conda-forge,defaults
conda-build-version: 26.3.0
channel-priority: strict
auto-update-conda: false
auto-activate-base: false
- name: Conda build
shell: bash -el {0}
run: |
set -e
conda mambabuild conda-recipe
conda install conda-index
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
find "${CONDA_PREFIX}" -maxdepth 2 -name 'slycot*.tar.bz2' | 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}/"
Expand Down Expand Up @@ -163,7 +161,7 @@ jobs:
name: slycot-wheels
pattern: slycot-wheels-*
- name: Checkout python-control
uses: actions/checkout@v3
uses: actions/checkout@v7
- name: Download wheels (if any)
uses: actions/download-artifact@v4
with:
Expand All @@ -190,7 +188,7 @@ jobs:
name: slycot-conda-pkgs
pattern: slycot-conda-pkgs-*
- name: Checkout python-control
uses: actions/checkout@v3
uses: actions/checkout@v7
- name: Download conda packages
uses: actions/download-artifact@v4
with:
Expand All @@ -215,14 +213,14 @@ jobs:

steps:
- name: Checkout Slycot
uses: actions/checkout@v3
uses: actions/checkout@v7
with:
repository: 'python-control/Slycot'
path: slycot-src
- name: Checkout python-control
uses: actions/checkout@v3
uses: actions/checkout@v7
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python }}
- name: Setup Ubuntu
Expand Down Expand Up @@ -287,12 +285,12 @@ jobs:

steps:
- name: Checkout Slycot
uses: actions/checkout@v3
uses: actions/checkout@v7
with:
repository: 'python-control/Slycot'
path: slycot-src
- name: Checkout python-control
uses: actions/checkout@v3
uses: actions/checkout@v7
- name: Setup macOS
if: matrix.os == 'macos'
run: brew install coreutils
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
mplbackend: QtAgg

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7

- name: Setup Conda
uses: conda-incubator/setup-miniconda@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ruff-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:

steps:
- name: Checkout python-control
uses: actions/checkout@v3
uses: actions/checkout@v7

- name: Setup environment
uses: actions/setup-python@v4
uses: actions/setup-python@v7
with:
python-version: 3.13 # todo: latest?

Expand Down
Loading