-
Notifications
You must be signed in to change notification settings - Fork 48
76 lines (68 loc) · 3.27 KB
/
generate-non-periodical-conda-package.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Generate non periodical conda packages
# This action automatically generate conda packages for the packages in the robotology-superbuild
# Check doc/conda-recipe-generation.md for more info
on:
workflow_dispatch:
inputs:
upload_conda_binaries:
description: 'If true, upload conda binaries, for any other value only generate them without uploading.'
required: true
default: 'true'
jobs:
generate-non-periodical-conda-packages:
name: "Generate non-periodical conda packages @${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
conda_platform: linux-64
- os: macos-14
conda_platform: osx-arm64
- os: windows-2019
conda_platform: win-64
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Miniforge3
miniforge-version: latest
- name: Dependencies for conda recipes generation and upload
shell: bash -l {0}
run: |
conda install pyyaml jinja2 conda-build ninja anaconda-client conda-forge-pinning mamba boa multisheller pixi
- name: Print used environment
shell: bash -l {0}
run: |
conda list
env
- name: Build conda packages
shell: bash -l {0}
run: |
conda config --remove channels defaults
conda config --env --set channel_priority strict
cd conda/non_periodical_recipes
# We use the conda_build_config from conda-forge-pinning, and our local one
# See https://docs.conda.io/projects/conda-build/en/latest/resources/variants.html#creating-conda-build-variant-config-files
# We manually specify the build order as an old workaround for mambabuild, in theory this can be avoided, but it needs to be tested
# see https://github.com/mamba-org/boa/issues/117
# We also manually delete the recipe directory to avoid that it is built again,
# specifically because we can't use --skip-existing as these packages are part of the robotology channel
conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml .
- name: Upload conda packages
shell: bash -l {0}
# Upload by default on schedule events, and on workflow dispatch only if input upload_conda_binaries is 'true'
if: (github.event_name == 'workflow_dispatch' && github.event.inputs.upload_conda_binaries == 'true')
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
PREFIX_DEV_TOKEN: ${{ secrets.PREFIX_DEV_TOKEN }}
run: |
cd ${CONDA_PREFIX}/conda-bld/${{ matrix.conda_platform}}/
ls *.tar.bz2
anaconda upload --skip-existing *.tar.bz2
pixi auth login https://prefix.dev --token $PREFIX_DEV_TOKEN
for condapackage in *.tar.bz2; do
pixi upload https://prefix.dev/api/v1/upload/robotology "$condapackage"
done
pixi auth logout https://prefix.dev