-
Notifications
You must be signed in to change notification settings - Fork 2
93 lines (82 loc) · 2.56 KB
/
conda.yaml
File metadata and controls
93 lines (82 loc) · 2.56 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Conda Packages
on:
push:
tags: ['*']
workflow_dispatch:
inputs:
ros_distro:
description: 'ROS distro to build (leave empty for all)'
required: false
type: choice
options:
- all
- humble
- jazzy
- kilted
default: all
permissions:
contents: read
id-token: write # Required for OIDC trusted publishing
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
setup:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set.outputs.matrix }}
steps:
- id: set
run: |
if [[ "$DISTRO" == "all" || -z "$DISTRO" ]]; then
echo 'matrix={"include":[{"ros_distro":"humble","robostack_channel":"robostack-humble"},{"ros_distro":"jazzy","robostack_channel":"robostack-jazzy"},{"ros_distro":"kilted","robostack_channel":"robostack-kilted"}]}' >> "$GITHUB_OUTPUT"
else
echo "matrix={\"include\":[{\"ros_distro\":\"$DISTRO\",\"robostack_channel\":\"robostack-$DISTRO\"}]}" >> "$GITHUB_OUTPUT"
fi
env:
DISTRO: ${{ inputs.ros_distro }}
build:
needs: setup
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.setup.outputs.matrix) }}
runs-on: ubuntu-latest
name: conda-${{ matrix.ros_distro }}
steps:
- uses: actions/checkout@v4
- name: Build conda package
uses: prefix-dev/rattler-build-action@v0.2.36
with:
recipe-path: conda.recipe/recipe.yaml
artifact-name: conda-${{ matrix.ros_distro }}
build-args: >
--variant ros_distro=${{ matrix.ros_distro }}
-c ${{ matrix.robostack_channel }}
-c conda-forge
publish:
name: Upload to prefix.dev
needs: build
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: prefix-dev/rattler-build-action@v0.2.36
with:
setup-only: true
- uses: actions/download-artifact@v4
with:
path: artifacts
pattern: conda-*
merge-multiple: false
- name: Upload to prefix.dev
shell: bash
run: |
shopt -s nullglob globstar
EXIT_CODE=0
for pkg in artifacts/**/*.conda artifacts/**/*.tar.bz2; do
echo "Uploading ${pkg}"
if ! rattler-build upload prefix -c plotjuggler "${pkg}" && \
! rattler-build upload prefix --force -c plotjuggler "${pkg}"; then
EXIT_CODE=1
fi
done
exit $EXIT_CODE