Skip to content

Commit

Permalink
Primera versión de la automatización de la distribución
Browse files Browse the repository at this point in the history
  • Loading branch information
dprada committed Oct 12, 2023
1 parent cb5beeb commit 13f5ec9
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/build_and_upload_conda_packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build and upload conda packages

on:
release:
types: ['released', 'prereleased']

workflow_dispatch:

jobs:
conda_deployment_with_new_tag:
name: Conda deployment of package with Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false # do not cancel all in-progress jobs if any job variation fails
matrix:
#os: ubuntu-latest #[macOS-latest, ubuntu-latest]
python-version: ["3.8", "3.9", "3.10"] # 3.10 with errors

steps:

- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Additional info about the build
shell: bash
run: |
uname -a
- name: Setup conda env
uses: mamba-org/setup-micromamba@v1
with:
environment-file: devtools/build_env.yaml
environment-name: build
condarc: |
channels:
- uibcdf
- conda-forge
- defaults
channel_priority: strict
create-args: >-
python=${{ matrix.python-version }}
- name: Info conda
shell: bash -l {0}
run: |
micromamba info
micromamba list
- name: Build and upload the conda packages
uses: uibcdf/action-build-and-upload-conda-packages@v1.2.0
with:
meta_yaml_dir: devtools/conda-build
python-version: ${{ matrix.python-version }} # Values previously defined in `matrix`
mambabuild: false
user: uibcdf
label: auto
platform_linux-64: true
platform_osx-64: true
platform_win-64: false
token: ${{ secrets.ANACONDA_UIBCDF_TOKEN }} # Replace with the right name of your secret
7 changes: 7 additions & 0 deletions devtools/build_env.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
channels:
- uibcdf
- conda-forge
- defaults
dependencies:
- anaconda-client
- conda-build
3 changes: 3 additions & 0 deletions devtools/conda-build/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
echo "Building"
$PYTHON -m pip install --no-deps .
echo "Done"
27 changes: 27 additions & 0 deletions devtools/conda-build/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package:
name: cosmicmuffin
version: "{{ environ['GIT_DESCRIBE_TAG'] }}"
source:
path: ../../
build:
number: 1
requirements:
build:
- python
- pip
- setuptools >=61.0
- versioningit~=2.0
run:
- python
- pip
- setuptools >=61.0
- versioningit~=2.0
about:
home: https://uibcdf.org
license: MIT License
summary: ''
description: 'This is a test library
'
dev_url: https://github.com/uibcdf/CosmicMuffin
doc_url: https://uibcdf.org/CosmicMuffin

0 comments on commit 13f5ec9

Please sign in to comment.