@@ -17,14 +17,12 @@ jobs:
1717 - { name: "linux", os: "ubuntu-latest", shell: "bash -l {0}" }
1818 - { name: "macos", os: "macos-latest", shell: "bash -l {0}" }
1919 exclude :
20- # Exclude all but the latest Python from all
21- # but Linux
2220 - platform :
2321 { name: "macos", os: "macos-latest", shell: "bash -l {0}" }
2422 python-version : " 3.10"
2523 - platform :
2624 { name: "macos", os: "macos-latest", shell: "bash -l {0}" }
27- python-version : " 3.12" # MacOS can't run 3.12 yet...
25+ python-version : " 3.12" # MacOS can't run 3.12 yet...
2826 environment :
2927 name : loch-build
3028 defaults :
@@ -33,31 +31,39 @@ jobs:
3331 env :
3432 SIRE_DONT_PHONEHOME : 1
3533 SIRE_SILENT_PHONEHOME : 1
36- REPO : " ${{ github.event.pull_request.head.repo.full_name || github.repository }}"
3734 steps :
38- - uses : conda-incubator/setup-miniconda@v3
35+ #
36+ - uses : actions/checkout@v4
3937 with :
40- auto-update-conda : true
41- python-version : ${{ matrix.python-version }}
42- activate-environment : loch_build
43- miniforge-version : latest
44- #
45- - name : Clone the feature branch
46- run : git clone -b ${{ github.head_ref }} --single-branch https://github.com/${{ env.REPO }} loch
47- #
48- - name : Setup Conda
49- run : conda install -y -c conda-forge boa anaconda-client packaging
50- #
51- - name : Update Conda recipe
52- run : python ${{ github.workspace }}/loch/actions/update_recipe.py
53- #
54- - name : Prepare build location
55- run : mkdir ${{ github.workspace }}/build
56- #
57- - name : Build Conda package using conda build using main channel
38+ fetch-depth : 0
39+ #
40+ - name : Compute version info
41+ shell : bash
42+ run : python actions/update_recipe.py
43+ #
44+ - name : Create sdist
45+ run : pip install build && python -m build --sdist && mv dist/*.tar.gz loch-source.tar.gz
46+ working-directory : ${{ github.workspace }}
47+ #
48+ - name : Install pixi
49+ uses : prefix-dev/setup-pixi@v0.9.4
50+ with :
51+ run-install : false
52+ #
53+ - name : Install rattler-build
54+ shell : bash
55+ run : pixi global install rattler-build
56+ #
57+ - name : Write Python variant config
58+ shell : bash
59+ run : printf 'python:\n - "${{ matrix.python-version }}"\n' > "${{ github.workspace }}/python_variant.yaml"
60+ #
61+ - name : Build package using rattler-build (main channel)
5862 if : ${{ github.base_ref == 'main' }}
59- run : conda build --no-test -c conda-forge -c openbiosim/label/main ${{ github.workspace }}/loch/recipes/loch
60- #
61- - name : Build Conda package using conda build using dev channel
63+ shell : bash
64+ run : rattler-build build --recipe "${{ github.workspace }}/recipes/loch" -c conda-forge -c openbiosim/label/main --variant-config "${{ github.workspace }}/python_variant.yaml"
65+ #
66+ - name : Build package using rattler-build (dev channel)
6267 if : ${{ github.base_ref != 'main' }}
63- run : conda build --no-test -c conda-forge -c openbiosim/label/dev ${{ github.workspace }}/loch/recipes/loch
68+ shell : bash
69+ run : rattler-build build --recipe "${{ github.workspace }}/recipes/loch" -c conda-forge -c openbiosim/label/dev --variant-config "${{ github.workspace }}/python_variant.yaml"
0 commit comments