forked from raspberrypi/rpicam-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
121 lines (93 loc) · 3.74 KB
/
libcamera-apps-test.yml
File metadata and controls
121 lines (93 loc) · 3.74 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
name: libcamera-app smoke tests
on:
pull_request:
branches: [ main ]
env:
NUM_JOBS: 4
GCC_COMPILER: "-DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++"
CLANG_COMPILER: "-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++"
CMAKE_OTHER_FLAGS: "-DENABLE_TFLITE=1"
LIBCAMERA_LKG_DIR: "${{github.workspace}}/../libcamera_lkg"
jobs:
build-test:
runs-on: [ self-hosted ]
strategy:
matrix:
compiler: [ gcc, clang ]
build_type: [ Release, Debug ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
clean: true
- name: Configure CMake
env:
COMPILER: "${{ matrix.compiler == 'gcc' && env.GCC_COMPILER || env.CLANG_COMPILER }}"
run: cmake -B ${{github.workspace}}/build -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE -DCMAKE_PREFIX_PATH=${{env.LIBCAMERA_LKG_DIR}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{env.COMPILER}} ${{env.CMAKE_OTHER_FLAGS}}
timeout-minutes: 5
- name: Build
run: make -C ${{github.workspace}}/build -j ${{env.NUM_JOBS}}
timeout-minutes: 10
- name: Tar files
run: tar -cvf build-artifacts-${{matrix.compiler}}-${{matrix.build_type}}.tar -C ${{github.workspace}}/build .
- name: Upload build files
uses: actions/upload-artifact@v3
with:
name: build-artifacts-${{matrix.compiler}}-${{matrix.build_type}}
path: build-artifacts-${{matrix.compiler}}-${{matrix.build_type}}.tar
retention-days: 21
build-test-lite:
runs-on: [ self-hosted ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
clean: true
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE -DCMAKE_PREFIX_PATH=${{env.LIBCAMERA_LKG_DIR}} -DCMAKE_BUILD_TYPE=Release ${{env.GCC_COMPILER}} ${{env.CMAKE_OTHER_FLAGS}} -DENABLE_DRM=0 -DENABLE_X11=0 -DENABLE_QT=0 -DENABLE_OPENCV=0 -DENABLE_TFLITE=0
timeout-minutes: 5
- name: Build
run: make -C ${{github.workspace}}/build -j ${{env.NUM_JOBS}}
timeout-minutes: 10
- name: Tar files
run: tar -cvf build-artifacts-gcc-lite.tar -C ${{github.workspace}}/build .
- name: Upload build files
uses: actions/upload-artifact@v3
with:
name: build-artifacts-gcc-lite
path: build-artifacts-gcc-lite.tar
retention-days: 21
run-test:
runs-on: ${{matrix.camera}}
needs: build-test
strategy:
matrix:
camera: [ imx219, imx477, imx708 ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
clean: true
- name: Create test output dir
run: mkdir -p ${{github.workspace}}/test_output
- name: Download build
uses: actions/download-artifact@v3
with:
name: build-artifacts-gcc-Release
path: ${{github.workspace}}
- name: Untar files
run: tar -xvf build-artifacts-gcc-Release.tar --one-top-level=build
- name: Print version string
run: ${{github.workspace}}/build/libcamera-hello --version
- name: Print linkage info
run: ldd ${{github.workspace}}/build/libcamera-hello | grep libcamera
- name: Test
run: ${{github.workspace}}/utils/camera-bug-report -o ${{github.workspace}}/test_output/bug.txt -t 300 -c "${{github.workspace}}/utils/test.py --exe-dir ${{github.workspace}}/build --output-dir ${{github.workspace}}/test_output --json-dir ${{github.workspace}}/assets"
timeout-minutes: 8 # Must be larger than the camera-bug-report timeout.
- name: Upload test output
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: test-artifacts-${{matrix.camera}}
path: ${{github.workspace}}/test_output/
retention-days: 21