Migrate to rattler-build recipe/actions #168
Workflow file for this run
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: Continuous Integration / Deployment | |
on: [pull_request, push] | |
jobs: | |
Format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Apply formatting | |
uses: github/super-linter@v4 | |
env: | |
VALIDATE_ALL_CODEBASE: false | |
VALIDATE_PYTHON_PYLINT: true | |
VALIDATE_PYTHON_FLAKE8: true | |
VALIDATE_PYTHON_ISORT: true | |
DEFAULT_BRANCH: main | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
IGNORE_GITIGNORED_FILES: true | |
Test_Linux: | |
needs: | |
- Format | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup environment | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniforge-variant: miniforge3 | |
miniforge-version: latest | |
use-mamba: true | |
environment-file: envs/linux.yml | |
use-only-tar-bz2: false | |
auto-activate-base: false | |
activate-environment: isicle | |
- name: Install ISiCLE | |
run: pip install --no-deps . | |
- name: Test environment | |
run: | | |
python -c "import isicle" | |
# pytest | |
Test_Mac: | |
needs: | |
- Format | |
runs-on: macos-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup environment | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniforge-variant: miniforge3 | |
miniforge-version: latest | |
use-mamba: true | |
environment-file: envs/osx.yml | |
use-only-tar-bz2: false | |
auto-activate-base: false | |
activate-environment: isicle | |
- name: Install ISiCLE | |
run: pip install --no-deps . | |
- name: Test environment | |
run: | | |
python -c "import isicle" | |
# pytest | |
Deploy: | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
needs: | |
- Test_Linux | |
- Test_Mac | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
target-platform: linux-64 | |
- os: macos-latest | |
target-platform: osx-arm64 | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Build conda package | |
uses: prefix-dev/rattler-build-action@v0.2.24 | |
with: | |
# Needs to be unique for each matrix entry | |
artifact-name: isicle-${{ matrix.target-platform }} | |
build-args: | | |
--target-platform ${{ matrix.target-platform }} | |
--recipe rattler-recipe/recipe.yaml | |
--variant-config rattler-recipe/variants.yaml | |
--output-dir build | |
-c conda-forge | |
-c bioconda | |
- name: Upload conda package | |
env: | |
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }} | |
run: | | |
for pkg in $(find build -type f \( -name "*.conda" -o -name "*.tar.bz2" \) ); do | |
echo "Uploading ${pkg}" | |
rattler-build upload anaconda --owner smcolby "${pkg}" | |
done |