|
7 | 7 | runs-on:ubuntu-latest
|
8 | 8 |
|
9 | 9 | steps:
|
10 |
| - -uses:actions/checkout@v3 |
| 10 | + -name:Check out the python-control sources |
| 11 | +uses:actions/checkout@v3 |
| 12 | + -name:Set up conda using the preinstalled GHA Miniconda |
| 13 | +run:echo $CONDA/bin >> $GITHUB_PATH |
11 | 14 | -name:Install Python dependencies from conda-forge
|
12 | 15 | run:|
|
13 |
| - # Set up conda using the preinstalled GHA Miniconda environment |
14 |
| - echo $CONDA/bin >> $GITHUB_PATH |
15 |
| - conda config --add channels conda-forge |
16 |
| - conda config --set channel_priority strict |
17 |
| -
|
18 |
| - # Install build tools |
19 |
| - conda install pip setuptools setuptools-scm |
20 |
| -
|
21 |
| - # Install python-control dependencies and extras |
22 |
| - conda install numpy matplotlib scipy |
23 |
| - conda install slycot pmw jupyter |
| 16 | + conda create \ |
| 17 | + --name control-examples-env \ |
| 18 | + --channel conda-forge \ |
| 19 | + --strict-channel-priority \ |
| 20 | + --quiet --yes \ |
| 21 | + pip setuptools setuptools-scm \ |
| 22 | + numpy matplotlib scipy \ |
| 23 | + slycot pmw jupyter |
24 | 24 |
|
25 | 25 | -name:Install from source
|
26 |
| -run:pip install . |
| 26 | +run:| |
| 27 | + conda run -n control-examples-env pip install . |
27 | 28 |
|
28 | 29 | -name:Run examples
|
29 | 30 | run:|
|
30 | 31 | cd examples
|
31 |
| - ./run_examples.sh |
32 |
| - ./run_notebooks.sh |
| 32 | +conda run -n control-examples-env./run_examples.sh |
| 33 | +conda run -n control-examples-env./run_notebooks.sh |