8000 GHA run examples: Create a dedicated conda env and use it by bnavigator · Pull Request #855 · python-control/python-control · GitHub
[go: up one dir, main page]

Skip to content

GHA run examples: Create a dedicated conda env and use it #855

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 27, 2023
Merged
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
31 changes: 16 additions & 15 deletions .github/workflows/install_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,27 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- 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: |
# Set up conda using the preinstalled GHA Miniconda environment
echo $CONDA/bin >> $GITHUB_PATH
conda config --add channels conda-forge
conda config --set channel_priority strict

# Install build tools
conda install pip setuptools setuptools-scm

# Install python-control dependencies and extras
conda install numpy matplotlib scipy
conda install slycot pmw jupyter
conda create \
--name control-examples-env \
--channel conda-forge \
--strict-channel-priority \
--quiet --yes \
pip setuptools setuptools-scm \
numpy matplotlib scipy \
slycot pmw jupyter

- name: Install from source
run: pip install .
run: |
conda run -n control-examples-env pip install .

- name: Run examples
run: |
cd examples
./run_examples.sh
./run_notebooks.sh
conda run -n control-examples-env ./run_examples.sh
conda run -n control-examples-env ./run_notebooks.sh
0