Skip to content

Commit 5378456

Browse files
committed
update CI
1 parent fd9eec9 commit 5378456

File tree

2 files changed

+60
-47
lines changed

2 files changed

+60
-47
lines changed

.github/workflows/build-code.yml

Lines changed: 53 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -25,53 +25,62 @@ jobs:
2525
- macOS-latest
2626
- ubuntu-latest
2727
- windows-latest
28-
include:
29-
- os: ubuntu-latest
30-
path: ~/.cache/pip
31-
- os: macos-latest
32-
path: ~/Library/Caches/pip
33-
- os: windows-latest
34-
path: ~\AppData\Local\pip\Cache
28+
exclude:
29+
- os: macOS-latest
30+
python-version: "3.9"
3531
defaults:
3632
run:
3733
shell: bash -el {0}
3834

3935
steps:
40-
- uses: actions/checkout@v4
41-
- uses: actions/cache@v4
42-
with:
43-
path: ${{ matrix.path }}
44-
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
45-
restore-keys: |
46-
${{ runner.os }}-pip-
47-
- uses: conda-incubator/setup-miniconda@v3
48-
with:
49-
auto-activate-base: true
50-
auto-update-conda: true
51-
python-version: ${{ matrix.python-version }}
52-
activate-environment: test
53-
- name: Install required packages
54-
run: |
55-
conda config --add channels conda-forge
56-
# conda install -yq conda-build jinja2 conda-verify
57-
conda install -yq zlib
58-
conda install h5py
59-
python -m pip install --upgrade pip
60-
# conda update conda-build
61-
# - name: Conda build
62-
# run: |
63-
# conda build --quiet devtools/conda-recipe
64-
- name: Pip install
65-
run: |
66-
python -m pip install .
67-
- name: Test with pytest
68-
run: |
69-
# conda install -yq -c ${CONDA_PREFIX}/conda-bld/ msmbuilder2022
70-
conda install -yq numdifftools hmmlearn
71-
pip install pytest
72-
mkdir ../../pkgs
73-
cp -r msmbuilder/tests ../../pkgs
74-
cd ../../pkgs
75-
python tests/data_init.py
76-
pytest tests/ -v
36+
- uses: actions/checkout@v4
37+
- name: Set pip cache path
38+
run: |
39+
if [[ "$RUNNER_OS" == "Linux" ]]; then
40+
echo "PIP_CACHE=~/.cache/pip" >> $GITHUB_ENV
41+
elif [[ "$RUNNER_OS" == "macOS" ]]; then
42+
echo "PIP_CACHE=~/Library/Caches/pip" >> $GITHUB_ENV
43+
else
44+
echo "PIP_CACHE=$LOCALAPPDATA\\pip\\Cache" >> $GITHUB_ENV
45+
fi
46+
- uses: actions/cache@v4
47+
with:
48+
path: ${{ env.PIP_CACHE }}
49+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
50+
restore-keys: |
51+
${{ runner.os }}-pip-
52+
- uses: conda-incubator/setup-miniconda@v3
53+
with:
54+
auto-activate-base: true
55+
auto-update-conda: true
56+
python-version: ${{ matrix.python-version }}
57+
activate-environment: test
58+
- name: Install required packages
59+
run: |
60+
conda config --add channels conda-forge
61+
# conda install -yq conda-build jinja2 conda-verify
62+
if [[ "$RUNNER_OS" == "Linux" ]]; then
63+
conda install -yq zlib libstdcxx-ng h5py
64+
else
65+
conda install -yq zlib h5py
66+
fi
67+
python -m pip install --upgrade pip
68+
# conda update conda-build
69+
# - name: Conda build
70+
# run: |
71+
# conda build --quiet devtools/conda-recipe
72+
- name: Pip install
73+
run: |
74+
python -m pip install .
75+
- name: Test with pytest
76+
run: |
77+
# conda install -yq -c ${CONDA_PREFIX}/conda-bld/ msmbuilder2022
78+
# conda install -yq numdifftools hmmlearn
79+
pip install numdifftools hmmlearn statsmodels
80+
pip install pytest
81+
mkdir ../../pkgs
82+
cp -r msmbuilder/tests ../../pkgs
83+
cd ../../pkgs
84+
python tests/data_init.py
85+
pytest tests/ -v
7786

.github/workflows/build-wheels.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,11 @@ jobs:
4949
run: |
5050
conda config --add channels conda-forge
5151
# conda install -yq conda-build jinja2 conda-verify
52-
conda install -yq zlib
53-
conda install h5py
52+
if [[ "$RUNNER_OS" == "Linux" ]]; then
53+
conda install -yq zlib libstdcxx-ng h5py
54+
else
55+
conda install -yq zlib h5py
56+
fi
5457
python -m pip install --upgrade pip
5558
# Used to host cibuildwheel
5659
- name: Pip install and build wheels
@@ -63,7 +66,8 @@ jobs:
6366
run: |
6467
pip install wheelhouse/msmbuilder2022*.whl
6568
66-
conda install -yq numdifftools hmmlearn
69+
# conda install -yq numdifftools hmmlearn
70+
pip install numdifftools hmmlearn statsmodels
6771
pip install pytest
6872
pip install pytest-cov
6973
mkdir ../../pkgs

0 commit comments

Comments
 (0)