Skip to content

Feat alchemlyb2

Feat alchemlyb2 #261

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
branches: [ devel ]
pull_request:
branches: [ devel ]
# Note that push and pull-request builds are automatically
# now skipped by GitHub if
# [skip ci], [ci skip], [no ci], [skip actions], or [actions skip]
# are in the commit message. We don't need to check for this ourselves.
jobs:
build:
name: build (${{ matrix.python-version }}, ${{ matrix.platform.name }})
runs-on: ${{ matrix.platform.os }}
strategy:
max-parallel: 9
fail-fast: false
matrix:
python-version: ["3.8", "3.9"]
platform:
- {
name: "windows",
os: "windows-latest",
shell: "pwsh"
}
- {
name: "linux",
os: "ubuntu-latest",
shell: "bash -l {0}"
}
- {
name: "macos",
os: "macos-latest",
shell: "bash -l {0}"
}
environment:
name: biosimspace-build
defaults:
run:
shell: ${{ matrix.platform.shell }}
env:
SIRE_DONT_PHONEHOME: 1
SIRE_SILENT_PHONEHOME: 1
REPO: "${{ github.event.pull_request.head.repo.full_name || github.repository }}"
steps:
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: bss_build
miniforge-version: latest
miniforge-variant: Mambaforge
use-mamba: true
#
- name: Clone the devel branch (push to devel)
run: git clone https://github.com/${{ env.REPO }}
if: github.event_name != 'pull_request'
#
- name: Clone the feature branch (pull request to devel)
run: git clone -b ${{ github.head_ref }} --single-branch https://github.com/${{ env.REPO }}
if: github.event_name == 'pull_request'
#
- name: Setup Conda
run: mamba install -y -c conda-forge boa anaconda-client packaging=21 pip-requirements-parser
#
- name: Update Conda recipe
run: python ${{ github.workspace }}/biosimspace/actions/update_recipe.py
#
- name: Prepare build location
run: mkdir ${{ github.workspace }}/build
#
- name: Build Conda package using mamba build
run: conda mambabuild -c conda-forge -c openbiosim/label/dev ${{ github.workspace }}/biosimspace/recipes/biosimspace
#
- name: Upload Conda package
run: python ${{ github.workspace }}/biosimspace/actions/upload_package.py
env:
SRC_DIR: ${{ github.workspace }}/biosimspace
BUILD_DIR: ${{ github.workspace }}/build
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
if: github.event_name != 'pull_request'