6969 conda-build :
7070 defaults : {run: {shell: 'bash -el {0}'}}
7171 runs-on : ${{ matrix.os }}-${{ matrix.os == 'windows' && '2022' || 'latest' }}
72- strategy :
73- matrix :
74- os : [ubuntu, windows]
75- steps :
76- - uses : actions/checkout@v4
77- with : {fetch-depth: 0, submodules: recursive}
78- - if : matrix.os == 'windows'
79- uses : ilammy/msvc-dev-cmd@v1
80- - uses : conda-incubator/setup-miniconda@v3
81- with :
82- python-version : 3.12
83- mamba-version : " *"
84- channels : conda-forge
85- conda-remove-defaults : " true"
86- - run : conda install boa conda-verify
87- - name : conda build
88- run : >
89- conda mambabuild -c conda-forge --override-channels --output-folder dist recipe --no-test
90- - uses : actions/upload-artifact@v4
91- with :
92- name : ccpi-regulariser-${{ matrix.os }}
93- path : dist/*/ccpi-regulariser-*.tar.bz2
94- conda-test :
95- defaults : {run: {shell: 'bash -el {0}'}}
96- runs-on : ${{ matrix.os }}-latest
97- needs : [conda-build]
9872 strategy :
9973 matrix :
10074 python-version : ['3.10', 3.11, 3.12] # parallelise conda_build_config.yaml
@@ -103,17 +77,16 @@ jobs:
10377 - {python-version: 3.13, os: ubuntu}
10478 steps :
10579 - uses : actions/checkout@v4
80+ with : {fetch-depth: 0, submodules: recursive}
81+ - if : matrix.os == 'windows'
82+ uses : ilammy/msvc-dev-cmd@v1
10683 - uses : conda-incubator/setup-miniconda@v3
10784 with :
10885 python-version : ${{ matrix.python-version }}
10986 mamba-version : " *"
11087 channels : conda-forge
11188 conda-remove-defaults : " true"
112- - uses : actions/download-artifact@v4
113- with :
114- name : ccpi-regulariser-${{ matrix.os }}
115- path : dist
116- - name : conda test
89+ - name : conda build
11790 run : |
11891 if test ${{ matrix.python-version }} = 3.13; then
11992 BUILD_DEP=conda-build
@@ -122,13 +95,18 @@ jobs:
12295 BUILD_DEP=boa
12396 BUILD_CMD="conda mambabuild"
12497 fi
125- conda install $BUILD_DEP
126- $BUILD_CMD -c conda-forge --override-channels dist/*/ccpi-regulariser-*-cpu_h*.tar.bz2 --test --python=${{ matrix.python-version }}
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_*.tar.bz2
101+ - uses : actions/upload-artifact@v4
102+ with :
103+ name : ccpi-regulariser-py${{ matrix.python-version}}-${{ matrix.os }}
104+ path : dist/*/ccpi-regulariser-*.tar.bz2
127105 conda-upload :
128106 if : github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
129107 defaults : {run: {shell: 'bash -el {0}', working-directory: dist}}
130108 runs-on : ubuntu-latest
131- needs : conda-test
109+ needs : conda-build
132110 steps :
133111 - uses : actions/checkout@v4
134112 - uses : conda-incubator/setup-miniconda@v3
@@ -138,7 +116,7 @@ jobs:
138116 conda-remove-defaults : " true"
139117 - uses : actions/download-artifact@v4
140118 with : {pattern: ccpi-regulariser-*, path: dist, merge-multiple: true}
141- - run : conda install anaconda-client
119+ - run : mamba install anaconda-client
142120 - name : anaconda upload -c ccpi
143121 run : >
144122 anaconda -v -t ${{ secrets.CCPI_CONDA_TOKEN }} upload --force
@@ -152,6 +130,6 @@ jobs:
152130 ssh -o StrictHostKeyChecking=no -i ./key ${{ secrets.STFC_SSH_HOST }} \
153131 'bash -lic "conda index --bz2 --zst --run-exports --channeldata --rss -n ccpi ${{ secrets.STFC_SSH_CONDA_DIR }}"'
154132 pass :
155- needs : [test-cuda, test, conda-test ]
133+ needs : [test-cuda, test, conda-build ]
156134 runs-on : ubuntu-latest
157135 steps : [{run: echo success}]
0 commit comments