Skip to content

Commit 87b2af3

Browse files
committed
Add setup-conda Action, switch to Python 3.15
1 parent cf79107 commit 87b2af3

2 files changed

Lines changed: 14 additions & 11 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
os: [ubuntu-latest]
18-
python-version: ["3.14"]
18+
python-version: ["3.15"]
1919
imp-branch: [main, develop]
2020
runs-on: ${{ matrix.os }}
2121

@@ -24,12 +24,19 @@ jobs:
2424
with:
2525
submodules: true
2626
- name: Setup conda
27+
uses: conda-incubator/setup-miniconda@v4
28+
with:
29+
miniforge-version: latest
30+
channels: conda-forge, salilab
31+
conda-remove-defaults: "true"
32+
python-version: ${{ matrix.python-version }}
33+
- name: Install dependencies
2734
run: |
28-
support/setup_ci.sh ${{ matrix.imp-branch }} ${{ matrix.python-version }}
35+
support/setup_ci.sh ${{ matrix.imp-branch }}
2936
- name: Test
3037
run: |
3138
eval "$(conda shell.bash hook)"
32-
conda activate python${{ matrix.python-version }}
39+
conda activate test
3340
# Use same C/C++ compiler as conda
3441
source ${CONDA_PREFIX}/etc/conda/activate.d/activate-gcc_linux-64.sh
3542
source ${CONDA_PREFIX}/etc/conda/activate.d/activate-gxx_linux-64.sh

‎support/setup_ci.sh‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,15 @@
33
# Set up an environment to run tests under Travis CI or GitHub Actions
44
# (see .github/workflows/build.yml)
55

6-
if [ $# -ne 2 ]; then
7-
echo "Usage: $0 imp_branch python_version"
6+
if [ $# -ne 1 ]; then
7+
echo "Usage: $0 imp_branch"
88
exit 1
99
fi
1010

1111
cur_dir=$(pwd)
1212
imp_branch=$1
13-
python_version=$2
1413
temp_dir=$(mktemp -d)
1514

16-
# get conda-forge, not main, packages
17-
conda config --remove channels defaults || :
18-
conda config --add channels conda-forge
1915
if [ ${imp_branch} = "develop" ]; then
2016
IMP_CONDA="imp-nightly"
2117
else
@@ -24,9 +20,9 @@ fi
2420

2521
cd ${temp_dir}
2622

27-
conda create --yes -q -n python${python_version} -c salilab python=${python_version} ${IMP_CONDA} libboost-devel gxx_linux-64 eigen cereal cmake
2823
eval "$(conda shell.bash hook)"
29-
conda activate python${python_version}
24+
conda activate test
25+
conda install --yes -q ${IMP_CONDA} libboost-devel gxx_linux-64 eigen cereal cmake
3026

3127
cd ${cur_dir}
3228

0 commit comments

Comments
 (0)