-
Notifications
You must be signed in to change notification settings - Fork 3
75 lines (64 loc) · 1.92 KB
/
build.yml
File metadata and controls
75 lines (64 loc) · 1.92 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
name: Build Latest
on:
push:
branches:
- '*'
paths-ignore:
- 'README.md'
- 'docs/**'
pull_request:
branches:
- '*'
paths-ignore:
- 'README.md'
- 'docs/**'
jobs:
appimage:
name: Build
runs-on: buildjet-8vcpu-ubuntu-2204-arm
strategy:
matrix:
include:
- container: ghcr.io/viam-modules/csi-camera/viam-cpp-base-jetson:0.0.7
TARGET: jetson
META_PATH: meta.json
- container: ghcr.io/viam-modules/csi-camera/viam-cpp-base-pi:0.0.7
TARGET: pi
META_PATH: meta-pi.json
container:
image: ${{ matrix.container }}
options: --platform linux/arm64
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set environment variables
run: |
echo "TARGET=${{ matrix.TARGET }}" >> $GITHUB_ENV
echo "META_PATH=${{ matrix.META_PATH }}" >> $GITHUB_ENV
- name: Restore Conan cache
uses: actions/cache@v4
with:
path: .conan-home
key: ${{ runner.os }}-${{ matrix.TARGET }}-conan-${{ hashFiles('conanfile.py', 'Makefile') }}
restore-keys: |
${{ runner.os }}-${{ matrix.TARGET }}-conan-
- name: Clean build artifacts
run: make clean
- name: Install module dependencies
run: make dep
- name: Build viam-csi binary
run: make build
- name: Verify no dynamic viam library deps
run: |
if ldd build-conan/build/Release/viam-csi | grep -i 'libviam'; then
echo "Unexpected dynamic viam library dependency found"
exit 1
fi
- name: Build viam-csi appimage
run: make package
- name: Upload AppImage artifact
uses: actions/upload-artifact@v4
with:
name: viam-csi-${{ matrix.TARGET }}-appimage
path: etc/*.AppImage
retention-days: 1