-
Notifications
You must be signed in to change notification settings - Fork 1
129 lines (115 loc) · 4.42 KB
/
build.yaml
File metadata and controls
129 lines (115 loc) · 4.42 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
name: Build Multi-Architecture ROS Containers
on:
push:
tags:
- 'dev*'
- 'v*'
jobs:
# Stage 0: Check conditions and set variables
get-version:
runs-on: ubuntu-latest
outputs:
image_version: ${{ steps.set_version.outputs.image_version }}
permissions:
packages: write
contents: read
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set image version
id: set_version
run: |
echo "image_version=${{ github.ref_name }}" >> $GITHUB_OUTPUT
# Stage 1: ROS2 base humble images (AMD64/x86)
ros2-humble-base-amd64:
needs: get-version
name: ROS2 Humble Base Images (AMD64)
permissions:
packages: write
contents: read
strategy:
matrix:
config:
- { build_context: './ROS2/AMD64x86/humble', image_name: 'humble', image_version: "${{ needs.get-version.outputs.image_version }}" }
- { build_context: './ROS2/AMD64x86/humble_gazebo', image_name: 'humble_gazebo', image_version: "${{ needs.get-version.outputs.image_version }}" }
- { build_context: './ROS2/AMD64x86/humble_cuda', image_name: 'humble_cuda', image_version: "${{ needs.get-version.outputs.image_version }}" }
uses: ./.github/workflows/build-workflow.yaml
with:
build_context: ${{ matrix.config.build_context }}
image_name: ${{ matrix.config.image_name }}
image_version: ${{ matrix.config.image_version }}
runs_on: ubuntu-latest
# Stage 1: ROS2 base humble images (Jetson/ARM)
ros2-humble-jetson:
needs: get-version
name: ROS2 Humble Jetson Base
permissions:
packages: write
contents: read
strategy:
matrix:
config:
- { build_context: './ROS2/Jetson/humble_jetson', image_name: 'humble_jetson', image_version: "${{ needs.get-version.outputs.image_version }}" }
uses: ./.github/workflows/build-workflow.yaml
with:
build_context: ${{ matrix.config.build_context }}
image_name: ${{ matrix.config.image_name }}
image_version: ${{ matrix.config.image_version }}
runs_on: ubuntu-22.04-arm
# Stage 2: ROS2 wheelchair2_base images (AMD64/x86)
ros2-wheelchair-base:
needs: [get-version, ros2-humble-base-amd64]
name: ROS2 Wheelchair2 Base Images
permissions:
packages: write
contents: read
strategy:
matrix:
config:
- { build_context: './ROS2/AMD64x86/wheelchair2_base', image_name: 'wheelchair2_base', image_version: "${{ needs.get-version.outputs.image_version }}" }
- { build_context: './ROS2/AMD64x86/wheelchair2_base_cuda', image_name: 'wheelchair2_base_cuda', image_version: "${{ needs.get-version.outputs.image_version }}" }
- { build_context: './ROS2/AMD64x86/wheelchair2_base_gazebo', image_name: 'wheelchair2_base_gazebo', image_version: "${{ needs.get-version.outputs.image_version }}" }
uses: ./.github/workflows/build-workflow.yaml
with:
build_context: ${{ matrix.config.build_context }}
image_name: ${{ matrix.config.image_name }}
image_version: ${{ matrix.config.image_version }}
runs_on: ubuntu-latest
# Stage 3: ROS2 wheelchair2_base_jetson (depends on humble_jetson)
ros2-wheelchair-jetson:
needs: [get-version, ros2-humble-jetson]
name: ROS2 Wheelchair2 Jetson Images
permissions:
packages: write
contents: read
strategy:
matrix:
config:
- { build_context: './ROS2/Jetson/wheelchair2_base_jetson', image_name: 'wheelchair2_base_jetson', image_version: "${{ needs.get-version.outputs.image_version }}" }
uses: ./.github/workflows/build-workflow.yaml
with:
build_context: ${{ matrix.config.build_context }}
image_name: ${{ matrix.config.image_name }}
image_version: ${{ matrix.config.image_version }}
runs_on: ubuntu-22.04-arm
# Stage 4: Create release
# if the tag is v*, create a pre-release
create-release:
needs: [ros2-wheelchair-base, ros2-wheelchair-jetson]
if: startsWith(github.ref_name, 'v')
runs-on: ubuntu-latest
permissions:
contents: write
packages: read
pull-requests: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
with:
tag: ${{ github.ref_name }}
prerelease: true
generateReleaseNotes: true