From 29647da8fe2abf743f81c3820eb2dde1db9a6200 Mon Sep 17 00:00:00 2001 From: Roman Joeres Date: Fri, 5 Apr 2024 08:25:48 +0200 Subject: [PATCH] Modularization and use of miniconda and mamba --- .github/workflows/publish.yaml | 28 +++++++++++++++++++++++++--- .github/workflows/publish_lite.yaml | 28 +++++++++++++++++++++++++--- 2 files changed, 50 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 11445a7..359cb32 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -10,13 +10,35 @@ jobs: runs-on: 'ubuntu-latest' steps: - uses: actions/checkout@v4 - - name: Publish DataSAIL to Conda - env: - ANACONDA_TOKEN: ${{ secrets.DATASAIL_ANACONDA_TOKEN }} + + - name: Setup Mamba + uses: conda-incubator/setup-miniconda@v3 + with: + python-version: '3.10' + miniforge-variant: Mambaforge + miniforge-version: latest + activate-environment: MPP + use-mamba: true + + - name: Install environment shell: bash -l {0} run: | conda install -y anaconda-client conda-build git + + - name: Build DataSAIL for linux-64 + shell: bash -l {0} + run: | conda-build -q --variants "{python: [3.8, 3.9, 3.10, 3.11, 3.12]}" -c conda-forge -c bioconda --output-folder . --no-test recipe + + - name: Convert DataSAIL to osx-64 + shell: bash -l {0} + run: | conda convert -p osx-64 linux-64/*.tar.bz2 + + - name: Publish DataSAIL to Conda + env: + ANACONDA_TOKEN: ${{ secrets.DATASAIL_ANACONDA_TOKEN }} + shell: bash -l {0} + run: | anaconda -t "$ANACONDA_TOKEN" upload linux-64/*.tar.bz2 anaconda -t "$ANACONDA_TOKEN" upload osx-64/*.tar.bz2 diff --git a/.github/workflows/publish_lite.yaml b/.github/workflows/publish_lite.yaml index 6a2b2f2..be90b24 100644 --- a/.github/workflows/publish_lite.yaml +++ b/.github/workflows/publish_lite.yaml @@ -10,16 +10,38 @@ jobs: runs-on: 'ubuntu-latest' steps: - uses: actions/checkout@v4 - - name: Publish DataSAIL-lite to Conda - env: - ANACONDA_TOKEN: ${{ secrets.DATASAIL_ANACONDA_TOKEN }} + + - name: Setup Mamba + uses: conda-incubator/setup-miniconda@v3 + with: + python-version: '3.10' + miniforge-variant: Mambaforge + miniforge-version: latest + activate-environment: MPP + use-mamba: true + + - name: Install environment shell: bash -l {0} run: | conda install -y anaconda-client conda-build git + + - name: Build DataSAIL for linux-64 + shell: bash -l {0} + run: | conda-build -q --variants "{python: [3.8, 3.9, 3.10, 3.11, 3.12]}" -c conda-forge -c bioconda --output-folder . --no-test recipe_lite + + - name: Convert DataSAIL to osx-64, osx-arm64, win-64 + shell: bash -l {0} + run: | conda convert -p osx-64 linux-64/*.tar.bz2 conda convert -p osx-arm64 linux-64/*.tar.bz2 conda convert -p win-64 linux-64/*.tar.bz2 + + - name: Publish DataSAIL-lite to Conda + env: + ANACONDA_TOKEN: ${{ secrets.DATASAIL_ANACONDA_TOKEN }} + shell: bash -l {0} + run: | anaconda -t "$ANACONDA_TOKEN" upload linux-64/*.tar.bz2 anaconda -t "$ANACONDA_TOKEN" upload osx-64/*.tar.bz2 anaconda -t "$ANACONDA_TOKEN" upload osx-arm64/*.tar.bz2