Skip to content

CI build Anaconda

CI build Anaconda #45

Workflow file for this run

name: CI build Anaconda
on:
workflow_dispatch:
release:
types:
- released
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-12]
name: Build Anaconda packages on ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: (windows) Install rtools MinGW compilers
if: matrix.os == 'windows-latest'
run: |
choco install rtools -y --no-progress --force --version=4.0.0.20220206
- name: (windows) Add compiler path to PATH
if: matrix.os == 'windows-latest'
uses: myci-actions/export-env-var-powershell@1
with:
name: PATH
value: c:\rtools40\ucrt64\bin;c:\rtools40\usr\bin;$env:PATH
- name: Setup conda
uses: s-weigand/setup-conda@v1
with:
update-conda: false
python-version: 3.11
conda-channels: conda-forge
- name: Prepare conda environment
run: |
conda install mamba boa conda-verify anaconda-client
mamba update --all
mkdir build_output
- name: (unix) Build packages for ${{ matrix.os }}
if: matrix.os != 'windows-latest'
run: conda mambabuild --no-anaconda-upload --output-folder ./build_output ./packaging/conda-unix
- name: (windows) Build packages for ${{ matrix.os }}
if: matrix.os == 'windows-latest'
run: conda mambabuild --no-anaconda-upload --output-folder ./build_output ./packaging/conda-win
- uses: actions/upload-artifact@v4
with:
name: build_outputs-${{ matrix.os }}
path: ./build_output/*/pysces*.tar.bz2
- name: Upload to anaconda.org
# to publish when a GitHub Release is created:
# if: github.event_name == 'release' && github.event.action == 'released'
run: anaconda -t ${{ secrets.ANACONDA_TOKEN }} upload -u pysces ./build_output/*/pysces*.tar.bz2