@@ -71,42 +71,55 @@ jobs:
7171 runs-on : ${{ matrix.os }}-${{ matrix.os == 'windows' && '2022' || 'latest' }}
7272 strategy :
7373 matrix :
74- python-version : ['3.10', 3.11, 3.12] # parallelise conda_build_config.yaml
7574 os : [ubuntu, windows]
76- include :
77- - {python-version: 3.13, os: ubuntu}
7875 steps :
7976 - uses : actions/checkout@v4
8077 with : {fetch-depth: 0, submodules: recursive}
8178 - if : matrix.os == 'windows'
8279 uses : ilammy/msvc-dev-cmd@v1
8380 - uses : conda-incubator/setup-miniconda@v3
8481 with :
85- python-version : ${{ matrix.python-version }}
82+ python-version : 3.12
8683 mamba-version : " *"
8784 channels : conda-forge
8885 conda-remove-defaults : " true"
86+ - run : conda install 'conda-build>=25.3' conda-verify
8987 - name : conda build
90- run : |
91- if test ${{ matrix.python-version }} = 3.13; then
92- BUILD_DEP=conda-build
93- BUILD_CMD="conda build"
94- else
95- BUILD_DEP=boa
96- BUILD_CMD="conda mambabuild"
97- fi
98- conda install $BUILD_DEP conda-verify
99- $BUILD_CMD -c conda-forge --override-channels --output-folder dist recipe --python=${{ matrix.python-version }} --no-test
100- $BUILD_CMD -c conda-forge --override-channels --test dist/*/ccpi-regulariser-*-cpu_*
88+ run : conda build -c conda-forge --override-channels --output-folder dist recipe --no-test
10189 - uses : actions/upload-artifact@v4
10290 with :
103- name : ccpi-regulariser-py${{ matrix.python-version}}- ${{ matrix.os }}
91+ name : ccpi-regulariser-${{ matrix.os }}
10492 path : dist/*/ccpi-regulariser-*
93+ conda-test :
94+ defaults : {run: {shell: 'bash -el {0}'}}
95+ runs-on : ${{ matrix.os }}-latest
96+ needs : conda-build
97+ strategy :
98+ matrix :
99+ python-version : ['3.10', 3.12] # min & max supported
100+ os : [ubuntu, windows]
101+ include :
102+ - {python-version: 3.13, os: ubuntu}
103+ steps :
104+ - uses : actions/checkout@v4
105+ - uses : conda-incubator/setup-miniconda@v3
106+ with :
107+ python-version : ${{ matrix.python-version }}
108+ mamba-version : " *"
109+ channels : conda-forge
110+ conda-remove-defaults : " true"
111+ - uses : actions/download-artifact@v4
112+ with :
113+ name : ccpi-regulariser-${{ matrix.os }}
114+ path : dist
115+ - run : conda install conda-build
116+ - name : conda test
117+ run : conda build -c conda-forge --override-channels --test dist/*/ccpi-regulariser-*-cpu_* --python=${{ matrix.python-version }}
105118 conda-upload :
106119 if : github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
107120 defaults : {run: {shell: 'bash -el {0}', working-directory: dist}}
108121 runs-on : ubuntu-latest
109- needs : conda-build
122+ needs : conda-test
110123 steps :
111124 - uses : actions/checkout@v4
112125 - uses : conda-incubator/setup-miniconda@v3
@@ -130,6 +143,6 @@ jobs:
130143 ssh -o StrictHostKeyChecking=no -i ./key ${{ secrets.STFC_SSH_HOST }} \
131144 'bash -lic "conda index --bz2 --zst --run-exports --channeldata --rss -n ccpi ${{ secrets.STFC_SSH_CONDA_DIR }}"'
132145 pass :
133- needs : [test-cuda, test, conda-build ]
146+ needs : [test-cuda, test, conda-test ]
134147 runs-on : ubuntu-latest
135148 steps : [{run: echo success}]
0 commit comments