Skip to content
Merged
Show file tree
Hide file tree
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
50 changes: 14 additions & 36 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,32 +69,6 @@ jobs:
conda-build:
defaults: {run: {shell: 'bash -el {0}'}}
runs-on: ${{ matrix.os }}-${{ matrix.os == 'windows' && '2022' || 'latest' }}
strategy:
matrix:
os: [ubuntu, windows]
steps:
- uses: actions/checkout@v4
with: {fetch-depth: 0, submodules: recursive}
- if: matrix.os == 'windows'
uses: ilammy/msvc-dev-cmd@v1
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: 3.12
mamba-version: "*"
channels: conda-forge
conda-remove-defaults: "true"
- run: conda install boa conda-verify
- name: conda build
run: >
conda mambabuild -c conda-forge --override-channels --output-folder dist recipe --no-test
- uses: actions/upload-artifact@v4
with:
name: ccpi-regulariser-${{ matrix.os }}
path: dist/*/ccpi-regulariser-*.tar.bz2
conda-test:
defaults: {run: {shell: 'bash -el {0}'}}
runs-on: ${{ matrix.os }}-latest
needs: [conda-build]
strategy:
matrix:
python-version: ['3.10', 3.11, 3.12] # parallelise conda_build_config.yaml
Expand All @@ -103,17 +77,16 @@ jobs:
- {python-version: 3.13, os: ubuntu}
steps:
- uses: actions/checkout@v4
with: {fetch-depth: 0, submodules: recursive}
- if: matrix.os == 'windows'
uses: ilammy/msvc-dev-cmd@v1
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
mamba-version: "*"
channels: conda-forge
conda-remove-defaults: "true"
- uses: actions/download-artifact@v4
with:
name: ccpi-regulariser-${{ matrix.os }}
path: dist
- name: conda test
- name: conda build
run: |
if test ${{ matrix.python-version }} = 3.13; then
BUILD_DEP=conda-build
Expand All @@ -122,13 +95,18 @@ jobs:
BUILD_DEP=boa
BUILD_CMD="conda mambabuild"
fi
conda install $BUILD_DEP
$BUILD_CMD -c conda-forge --override-channels dist/*/ccpi-regulariser-*-cpu_h*.tar.bz2 --test --python=${{ matrix.python-version }}
conda install $BUILD_DEP conda-verify
$BUILD_CMD -c conda-forge --override-channels --output-folder dist recipe --python=${{ matrix.python-version }} --no-test
$BUILD_CMD -c conda-forge --override-channels --test dist/*/ccpi-regulariser-*-cpu_*.tar.bz2
- uses: actions/upload-artifact@v4
with:
name: ccpi-regulariser-py${{ matrix.python-version}}-${{ matrix.os }}
path: dist/*/ccpi-regulariser-*.tar.bz2
conda-upload:
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
defaults: {run: {shell: 'bash -el {0}', working-directory: dist}}
runs-on: ubuntu-latest
needs: conda-test
needs: conda-build
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
Expand All @@ -138,7 +116,7 @@ jobs:
conda-remove-defaults: "true"
- uses: actions/download-artifact@v4
with: {pattern: ccpi-regulariser-*, path: dist, merge-multiple: true}
- run: conda install anaconda-client
- run: mamba install anaconda-client
- name: anaconda upload -c ccpi
run: >
anaconda -v -t ${{ secrets.CCPI_CONDA_TOKEN }} upload --force
Expand All @@ -152,6 +130,6 @@ jobs:
ssh -o StrictHostKeyChecking=no -i ./key ${{ secrets.STFC_SSH_HOST }} \
'bash -lic "conda index --bz2 --zst --run-exports --channeldata --rss -n ccpi ${{ secrets.STFC_SSH_CONDA_DIR }}"'
pass:
needs: [test-cuda, test, conda-test]
needs: [test-cuda, test, conda-build]
runs-on: ubuntu-latest
steps: [{run: echo success}]
5 changes: 5 additions & 0 deletions recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
python:
- 3.10
- 3.11
- 3.12
- 3.13
cuda_compiler_version:
- None
- 12.9
10 changes: 5 additions & 5 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ package:
build:
preserve_egg_dir: False
number: {{ build_number }}
noarch: python
run_exports:
- {{ pin_subpackage(project.get('name'), max_pin='x.x') }}
- {{ project.get('name') }} =*=cuda* # [cuda_compiler_version != "None"]
Expand All @@ -40,20 +39,21 @@ requirements:
build:
- cmake
- ninja
- python # [build_platform != target_platform]
- {{ compiler('cxx') }}
#- {{ compiler('cuda') }} # [cuda_compiler_version != "None"]
- cuda-compiler ~={{ cuda_compiler_version }} # [cuda_compiler_version != "None"]
host:
- python >=3.10
- python x.x
- llvm-openmp
- setuptools
- pip
- cuda-cccl # [cuda_compiler_version != "None"]
- cuda-version {{ cuda_compiler_version }} # [cuda_compiler_version != "None"]
run:
- python >=3.10
- numpy
- {{ pin_compatible('python', min_pin='x.x', max_pin='x') }}
{% for dep in project.get("dependencies") %}
- {{ dep.lower() }}
{% endfor %}
- __cuda # [cuda_compiler_version != "None"]
- {{ pin_compatible('cuda-version', min_pin='x', max_pin='x') }} # [cuda_compiler_version != "None"]

Expand Down
Loading