-
-
Notifications
You must be signed in to change notification settings - Fork 20
162 lines (154 loc) · 6.08 KB
/
interactive.yaml
File metadata and controls
162 lines (154 loc) · 6.08 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
name: interactive
run-name: "${{ inputs.DEB_DISTRO }}-${{ inputs.ROS_DISTRO }}-${{ inputs.ARCH }} ${{ inputs.ROS_SOURCES }}"
on:
workflow_dispatch:
# The inputs should not define a default value.
# If they do, this value would be passed even if nothing is actually entered in the dialog,
# thus overriding any configuration variables set, which should be considered in this case.
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_dispatchinputs
inputs:
# target distro
DEB_DISTRO:
type: string
required: true
description: 'Ubuntu/Debian distro:'
default: noble
ROS_DISTRO:
type: string
required: true
description: 'ROS distribution codename:'
default: one
ARCH:
type: choice
required: true
description: 'Architecture:'
default: x64
options:
- x64
- arm64
# source selection
ROS_SOURCES:
type: string
description: 'ROS sources to compile:'
required: true
default: '*.repos'
COLCON_PKG_SELECTION:
type: string
description: 'colcon package selection:'
required: false
# build flow control
CONTINUE_BUILD:
type: boolean
description: Continue previous build?
required: true
default: true
SKIP_EXISTING:
type: boolean
description: Skip already built packages?
required: true
default: true
CONTINUE_ON_ERROR:
type: boolean
description: Continue on build errors?
required: true
default: true
# Installing built packages to chroot speeds up downstream builds?
INSTALL_TO_CHROOT:
type: boolean
description: Incrementally fill chroot?
required: true
default: false
DEPLOY:
type: boolean
description: Deploy to reprepro server?
required: true
default: false
# Don't allow concurrent runs of workflows deploying to same target
concurrency:
group: build-and-deploy-to-${{ vars.DEPLOY_URL }}
cancel-in-progress: false
jobs:
stage-1:
uses: ./.github/workflows/build.yaml
with:
DEB_DISTRO: ${{ inputs.DEB_DISTRO }}
ROS_DISTRO: ${{ inputs.ROS_DISTRO || 'one' }}
ARCH: ${{ inputs.ARCH }}
ROS_SOURCES: ${{ inputs.ROS_SOURCES }}
INSTALL_GPG_KEYS: |
sudo curl -sSL https://ros.packages.techfak.net/gpg.key -o /etc/apt/keyrings/ros-one-keyring.gpg
EXTRA_DEB_SOURCES: >-
${{ inputs.CONTINUE_BUILD &&
format('deb [signed-by=/etc/apt/keyrings/ros-one-keyring.gpg] https://ros.packages.techfak.net {0}-testing main',
inputs.DEB_DISTRO) || '' }}
EXTRA_ROSDEP_SOURCES: |
rosdep.yaml
https://ros.packages.techfak.net/ros-one.yaml
COLCON_PKG_SELECTION: ${{ inputs.COLCON_PKG_SELECTION || vars.COLCON_PKG_SELECTION || '' }}
# proceed from existing debs artifact if run_attempt > 1
DOWNLOAD_DEBS: ${{ github.run_attempt != '1' }}
DEBS_ARTIFACT_NAME: ${{ inputs.DEB_DISTRO }}-debs
SKIP_EXISTING: ${{ inputs.SKIP_EXISTING }}
CONTINUE_ON_ERROR: ${{ inputs.CONTINUE_ON_ERROR }}
INSTALL_TO_CHROOT: ${{ inputs.INSTALL_TO_CHROOT }}
stage-2:
needs: stage-1
if: needs.stage-1.result == 'success' || ${{ inputs.CONTINUE_ON_ERROR }}
uses: ./.github/workflows/build.yaml
with:
DEB_DISTRO: ${{ inputs.DEB_DISTRO }}
ROS_DISTRO: ${{ inputs.ROS_DISTRO || 'one' }}
ARCH: ${{ inputs.ARCH }}
ROS_SOURCES: ${{ inputs.ROS_SOURCES }}
INSTALL_GPG_KEYS: |
sudo curl -sSL https://ros.packages.techfak.net/gpg.key -o /etc/apt/keyrings/ros-one-keyring.gpg
EXTRA_DEB_SOURCES: >-
${{ inputs.CONTINUE_BUILD &&
format('deb [signed-by=/etc/apt/keyrings/ros-one-keyring.gpg] https://ros.packages.techfak.net {0}-testing main',
inputs.DEB_DISTRO) || '' }}
EXTRA_ROSDEP_SOURCES: |
rosdep.yaml
https://ros.packages.techfak.net/ros-one.yaml
COLCON_PKG_SELECTION: ${{ inputs.COLCON_PKG_SELECTION || vars.COLCON_PKG_SELECTION || '' }}
CONTINUE_FROM_PKG: ${{ needs.stage-1.outputs.LATEST_PACKAGE }}
DOWNLOAD_DEBS: true
DEBS_ARTIFACT_NAME: ${{ inputs.DEB_DISTRO }}-debs
SKIP_EXISTING: ${{ inputs.SKIP_EXISTING }}
CONTINUE_ON_ERROR: ${{ inputs.CONTINUE_ON_ERROR }}
INSTALL_TO_CHROOT: ${{ inputs.INSTALL_TO_CHROOT }}
stage-3:
needs: stage-2
if: needs.stage-2.result == 'success' || ${{ inputs.CONTINUE_ON_ERROR }}
uses: ./.github/workflows/build.yaml
with:
DEB_DISTRO: ${{ inputs.DEB_DISTRO }}
ROS_DISTRO: ${{ inputs.ROS_DISTRO || 'one' }}
ARCH: ${{ inputs.ARCH }}
ROS_SOURCES: ${{ inputs.ROS_SOURCES }}
INSTALL_GPG_KEYS: |
sudo curl -sSL https://ros.packages.techfak.net/gpg.key -o /etc/apt/keyrings/ros-one-keyring.gpg
EXTRA_DEB_SOURCES: >-
${{ inputs.CONTINUE_BUILD &&
format('deb [signed-by=/etc/apt/keyrings/ros-one-keyring.gpg] https://ros.packages.techfak.net {0}-testing main',
inputs.DEB_DISTRO) || '' }}
EXTRA_ROSDEP_SOURCES: |
rosdep.yaml
https://ros.packages.techfak.net/ros-one.yaml
COLCON_PKG_SELECTION: ${{ inputs.COLCON_PKG_SELECTION || vars.COLCON_PKG_SELECTION || '' }}
CONTINUE_FROM_PKG: ${{ needs.stage-2.outputs.LATEST_PACKAGE }}
DOWNLOAD_DEBS: true
DEBS_ARTIFACT_NAME: ${{ inputs.DEB_DISTRO }}-debs
SKIP_EXISTING: ${{ inputs.SKIP_EXISTING }}
CONTINUE_ON_ERROR: ${{ inputs.CONTINUE_ON_ERROR }}
INSTALL_TO_CHROOT: ${{ inputs.INSTALL_TO_CHROOT }}
deploy:
needs: [stage-1, stage-2, stage-3]
if: ${{ !cancelled() && inputs.DEPLOY && vars.DEPLOY_URL }}
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Import build artifacts to reprepro server
uses: ./reprepro
with:
url: "${{ vars.DEPLOY_URL }}?distro=${{ inputs.DEB_DISTRO }}&run_id=${{ github.run_id }}&arch=${{ inputs.ARCH }}"