Skip to content

proxsuite-nlp v0.8.0 #326

proxsuite-nlp v0.8.0

proxsuite-nlp v0.8.0 #326

Workflow file for this run

name: Publish on anaconda
on:
workflow_dispatch:
inputs:
publish:
description: "Publish conda packages"
required: false
default: false
type: boolean
pull_request:
release:
types: published
env:
FROM_TAG: ${{ inputs.publish && '1' || '' }}
jobs:
upload-on-anaconda:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-2019"]
build_type: [Release]
python-version: ["3.8", "3.10", "3.12"]
include:
- python-version: "3.8"
numpy-version: "1.22"
- python-version: "3.10"
numpy-version: "1.22"
- python-version: "3.12"
numpy-version: "1.26"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
channels: conda-forge
# Python version will be inputed in conda build
# command line
python-version: "3.10"
- name: Install conda-build and anaconda-client
if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu')
shell: bash -el {0}
run: conda install conda-build anaconda-client
- name: Install conda-build and anaconda-client
if: contains(matrix.os, 'windows')
shell: cmd /C CALL {0}
run: conda install conda-build anaconda-client
- name: Set version
if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu')
shell: bash -el {0}
run: |
VER=$(grep "<version>" package.xml | sed 's/ <version>//g' | sed 's/<\/version>//g')
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Set version
if: contains(matrix.os, 'windows')
shell: bash
run: |
VER=$(grep "<version>" package.xml | sed 's/ <version>//g' | sed 's/<\/version>//g')
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Build the recipe
shell: bash -el {0}
run: |
conda build -c conda-forge \
--no-error-overlinking \
--py ${{ matrix.python-version }} \
--numpy ${{ matrix.numpy-version }} \
packaging/conda/proxsuite-nlp-release
- name: upload on conda
if: github.event_name == 'release' || inputs.publish
shell: bash -el {0}
run: anaconda -t ${{ secrets.SIMPLE_ROBOTICS_ANACONDA_TOKEN }} upload --force $CONDA_PREFIX/conda-bld/*/proxsuite-nlp-*.tar.bz2
check:
if: always()
name: check-upload-on-anaconda
needs:
- upload-on-anaconda
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}