-
Notifications
You must be signed in to change notification settings - Fork 0
148 lines (142 loc) · 4.5 KB
/
main.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
# Basic continous integration for sdk-samples
# Copyright 2023 Labforge Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# @author Thomas Reidemeister <thomas@labforge.ca>
#
# To setup a self-hosted runner to test this on Windows
# (1) Setup a Windows 10 machine with autologin
# (2) Register a Github actions runner on that machine, run from startup (not as headless service runner)
# (3) Install
# - VS build tools,
# - Pleora SDK,
# - Python 3.10
# - Git for Windows
# (4) Set up a private backing repository holding proprietary wheels and check this out using a CI token
# (5) Set a repo actions secret for CITOKEN
# (5) Tag that runner as W64HIL
# (6) Allow for executing shell scripts https:/go.microsoft.com/fwlink/?LinkID=135170
# (7) Setup code-signing (Talk to Thomas for credentials and headless approach)
name: ContinousIntegration
on:
push:
branches: [ ]
tags:
- 'v*'
workflow_dispatch:
jobs:
build_cpp_samples_linux:
runs-on: HIL
steps:
- name: Check out samples
uses: actions/checkout@v3
with:
lfs: true
submodules: true
path: samples
- name: Build stereo_viewer
run: |
cd samples/stereo_viewer
meson build
ninja -C build
# Confirm that build also works on legacy systems
build_cpp_samples_ubuntu_20:
runs-on: ubuntu-20.04
steps:
- name: Install OS dependencies
run: |
sudo apt-get update
sudo apt-get install -y meson build-essential qtbase5-dev python3-numpy libopencv-dev
- name: Check out Pleora SDK backing
uses: actions/checkout@v3
with:
repository: labforge/pleora_backing
lfs: true
token: ${{ secrets.CITOKEN }}
submodules: true
path: pleora
- name: Install Pleora 20.04 SDK
run: |
sudo dpkg -i pleora/eBUS_SDK_Ubuntu-20.04-x86_64-6.3.0-6343.deb
- name: Check out samples
uses: actions/checkout@v3
with:
lfs: true
submodules: true
path: samples
- name: Build stereo_viewer
run: |
cd samples/stereo_viewer
meson build
ninja -C build
publish_sdk:
runs-on: HIL
steps:
- name: Checkout head for release notes
uses: actions/checkout@v3
with:
lfs: true
submodules: true
- name: Generate release notes
run: |
git describe --tags --abbrev=0 HEAD | xargs git log -1 --pretty=%B > release.txt
- name: Stage backing files
uses: actions/checkout@v3
with:
lfs: true
submodules: true
repository: labforge/pleora_backing
token: ${{ secrets.CITOKEN }}
path: release
- name: Build SDK documentation to publish
run: |
cd release
ar x eBUS_SDK_Ubuntu-22.04-x86_64-6.3.0-6343.deb
tar xvzf data.tar.gz
cd opt/pleora/ebus_sdk/Ubuntu-22.04-x86_64/share/doc/python/
zip -r9ov ../../../../../../../api_docs.zip *
cd ../../../../../../../
# back to root from release
cd ..
- name: Assemble Windows SDK
run: |
cat release/eBUS_*.exea* > release/eBUS_SDK_Windows-64-bit.exe
- name: Release Public
uses: treideme/action-gh-release@master
if: startsWith(github.ref, 'refs/tags/v')
with:
fail_on_unmatched_files: true
files: |
release/*.whl
release/eBUS_SDK_Windows-64-bit.exe
release/*.deb
release/api_docs.zip
token: ${{ secrets.CITOKEN }}
body_path: release.txt
build_python_samples_and_installer:
runs-on: W64HIL
steps:
- name: Check out samples
uses: actions/checkout@v3
with:
lfs: true
submodules: true
path: samples
- name: Build samples
uses: ./samples/.github/actions/build
with:
artifact_name: installer
token: ${{ secrets.CITOKEN }}
path: samples
signpassword: ${{ secrets.SIGNINGPASSWORD }}