-
Notifications
You must be signed in to change notification settings - Fork 40
149 lines (130 loc) · 4.72 KB
/
package_debian.yml
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
name: Package-Debian-Build
on:
push:
tags:
- '*'
# allow manually starting this workflow
workflow_dispatch:
jobs:
get-tag:
# Pre-job to fetch the latest tag
runs-on: ubuntu-latest
outputs:
major: ${{ steps.extract_tag.outputs.major }}
minor: ${{ steps.extract_tag.outputs.minor }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Ensure all history and tags are fetched
- name: Get latest tag
id: extract_tag
run: |
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "Latest tag: $latest_tag"
# Extract major and minor version from the tag
IFS='.' read -r major minor patch <<< "$latest_tag"
echo "Major: $major"
echo "Minor: $minor"
# Set as output variables
echo "::set-output name=major::$major"
echo "::set-output name=minor::$minor"
Debian:
name: ${{ matrix.distro }}
needs: get-tag # Make sure the 'ci' job waits for the 'get-tag' job to finish
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
distro: [focal, jammy, noble]
container:
image: ghcr.io/tesseract-robotics/trajopt:${{ matrix.distro }}-${{ needs.get-tag.outputs.major }}.${{ needs.get-tag.outputs.minor }}
env:
DEBIAN_FRONTEND: noninteractive
TZ: Etc/UTC
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: target_ws/src
- name: Install Depends
shell: bash
run: |
apt update
apt upgrade -y
apt install -y wget libompl-dev
- name: Install Depends (non-noble)
if: ${{ matrix.distro != 'noble' }}
shell: bash
run: |
apt install -y software-properties-common
add-apt-repository ppa:levi-armstrong/tesseract-robotics
apt install -y taskflow
- name: Install Depends (noble)
if: ${{ matrix.distro == 'noble' }}
shell: bash
run: |
apt install -y libtaskflow-cpp-dev
- name: Build and test
uses: tesseract-robotics/colcon-action@v9
with:
before-script: source /opt/tesseract/install/setup.bash && source /opt/trajopt/install/setup.bash
ccache-enabled: false
vcs-file: dependencies.repos
upstream-args: --cmake-args -DCMAKE_BUILD_TYPE=Release
target-path: target_ws/src
target-args: --cmake-args -DCMAKE_BUILD_TYPE=Release -DTESSERACT_PACKAGE=ON
run-tests: false
- name: Create artifacts directory
run: |
mkdir $GITHUB_WORKSPACE/artifacts
- name: Package ruckig
working-directory: upstream_ws/build/ruckig
shell: bash
run: |
cpack --config CPackConfig.cmake
cp ./*.deb $GITHUB_WORKSPACE/artifacts
cp ./*.tar.xz $GITHUB_WORKSPACE/artifacts
- name: Package tesseract_command_language
working-directory: target_ws/build/tesseract_command_language
shell: bash
run: |
cpack --config CPackConfig.cmake
cp ./*.deb $GITHUB_WORKSPACE/artifacts
cp ./*.tar.xz $GITHUB_WORKSPACE/artifacts
- name: Package tesseract_examples
working-directory: target_ws/build/tesseract_examples
shell: bash
run: |
cpack --config CPackConfig.cmake
cp ./*.deb $GITHUB_WORKSPACE/artifacts
cp ./*.tar.xz $GITHUB_WORKSPACE/artifacts
- name: Package tesseract_motion_planners
working-directory: target_ws/build/tesseract_motion_planners
shell: bash
run: |
cpack --config CPackConfig.cmake
cp ./*.deb $GITHUB_WORKSPACE/artifacts
cp ./*.tar.xz $GITHUB_WORKSPACE/artifacts
- name: Package tesseract_task_composer
working-directory: target_ws/build/tesseract_task_composer
shell: bash
run: |
cpack --config CPackConfig.cmake
cp ./*.deb $GITHUB_WORKSPACE/artifacts
cp ./*.tar.xz $GITHUB_WORKSPACE/artifacts
- name: Package tesseract_time_parameterization
working-directory: target_ws/build/tesseract_time_parameterization
shell: bash
run: |
cpack --config CPackConfig.cmake
cp ./*.deb $GITHUB_WORKSPACE/artifacts
cp ./*.tar.xz $GITHUB_WORKSPACE/artifacts
- uses: actions/upload-artifact@v4
with:
name: debian_package_${{ matrix.distro }}
path: ${{ github.workspace }}/artifacts/*.deb
- uses: actions/upload-artifact@v4
with:
name: archive_package_${{ matrix.distro }}
path: ${{ github.workspace }}/artifacts/*.tar.xz