Conda #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Conda | |
on: | |
push: | |
branches: [main] | |
tags: ["v*.*.*"] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
build-conda-packages: | |
name: Test and Build Conda Packages | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-13] | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download MacOSX SDK | |
if: startsWith(matrix.os, 'macos') | |
run: | | |
curl -o MacOSX10.13.sdk.tar.xz -L https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX10.13.sdk.tar.xz && \ | |
tar xf MacOSX10.13.sdk.tar.xz && \ | |
sudo mv -v MacOSX10.13.sdk /opt/ && \ | |
ls /opt/ | |
- name: Set up Miniconda | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-activate-base: true | |
activate-environment: "" | |
miniforge-variant: Miniforge3 | |
miniforge-version: latest | |
- name: Set up just command runner | |
uses: extractions/setup-just@dd310ad5a97d8e7b41793f8ef055398d51ad4de6 | |
- name: Build C++ conda package | |
run: | | |
just build-cpp-conda-package | |
- name: Build Python conda package | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
just build-python-conda-package | |
- name: Publish conda packages | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
env: | |
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }} | |
run: | | |
for p in $(find {cpp,python}/conda/build_pkg -name mrd*.tar.bz2) | |
do | |
./utils/conda/publish_package.sh -u ismrmrd -t "$ANACONDA_TOKEN" -p "$p" | |
done |