forked from viam-modules/viam-cartographer
-
Notifications
You must be signed in to change notification settings - Fork 0
116 lines (100 loc) · 3.89 KB
/
appimage.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
name: Build AppImage SLAM Server
on:
workflow_dispatch:
workflow_call:
secrets:
GCP_CREDENTIALS:
required: true
jobs:
appimage:
name: AppImage Build Cartographer
strategy:
matrix:
include:
- arch: [x64, qemu-host]
image: ghcr.io/viamrobotics/canon:amd64-cache
platform: linux/amd64
- arch: [arm64, qemu-host]
image: ghcr.io/viamrobotics/canon:arm64-cache
platform: linux/arm64
runs-on: ${{ matrix.arch }}
container:
image: ${{ matrix.image }}
options: --platform ${{ matrix.platform }}
timeout-minutes: 30
steps:
- name: Check out main code
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
uses: actions/checkout@v3
with:
submodules: recursive
path: viam-cartographer
- name: Check out PR branch code
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
submodules: recursive
path: viam-cartographer
- name: make clean
run: |
chown -R testbot:testbot .
sudo -u testbot bash -lc 'cd viam-cartographer && make clean'
- name: make bufinstall buf setup
uses: nick-fields/retry@v2
with:
timeout_minutes: 5
max_attempts: 3
retry_on: timeout
shell: bash
command: |
chown -R testbot:testbot .
sudo -u testbot bash -lc 'cd viam-cartographer && make bufinstall buf setup'
- name: make build
run: |
sudo -u testbot bash -lc 'cd viam-cartographer && make build'
- name: make install-lua-files
run: |
sudo -u testbot bash -lc 'cd viam-cartographer && make install-lua-files'
- name: make test
run: |
sudo -u testbot bash -lc 'cd viam-cartographer && make test'
- name: Copy carto_grpc_server binary
if: matrix.platform == 'linux/amd64'
run: |
sudo cp viam-cartographer/viam-cartographer/build/carto_grpc_server /usr/local/bin/carto_grpc_server
- name: Run viam-cartographer cartographer integration tests
if: matrix.platform == 'linux/amd64'
run: |
sudo -u testbot bash -lc 'cd viam-cartographer && sudo go test -v -race -run TestCartographerIntegration'
- name: Build AppImage (PR)
if: contains(github.event.pull_request.labels.*.name, 'appimage') || contains(github.event.pull_request.labels.*.name, 'appimage-ignore-tests')
run: |
sudo -u testbot bash -lc 'cd viam-cartographer && make BUILD_CHANNEL="pr-${{ github.event.pull_request.number }}" appimage'
- name: Authorize GCP Upload
uses: google-github-actions/auth@v1
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
- name: Deploy Files (PR)
if: contains(github.event.pull_request.labels.*.name, 'appimage') || contains(github.event.pull_request.labels.*.name, 'appimage-ignore-tests')
uses: google-github-actions/[email protected]
with:
headers: "cache-control: no-cache"
path: 'viam-cartographer/etc/packaging/appimages/deploy/'
destination: 'packages.viam.com/apps/slam-servers/'
glob: '*'
parent: false
gzip: false
- name: Build AppImage (Latest)
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
run: sudo -u testbot bash -lc 'cd viam-cartographer && make appimage-ci'
- name: Deploy Files (Latest)
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
uses: google-github-actions/[email protected]
with:
headers: "cache-control: no-cache"
path: 'viam-cartographer/etc/packaging/appimages/deploy/'
destination: 'packages.viam.com/apps/slam-servers/'
glob: '*'
parent: false
gzip: false