Support libcamera's new SensorConfiguration #420
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: libcamera-app smoke tests | |
on: | |
pull_request: | |
branches: [ main ] | |
env: | |
GCC_COMPILER: "CC=/usr/bin/gcc CXX=/usr/bin/g++" | |
CLANG_COMPILER: "CC=/usr/bin/clang-13 CXX=/usr/bin/clang++-13" | |
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 meson | |
env: | |
COMPILER: "${{ matrix.compiler == 'gcc' && env.GCC_COMPILER || env.CLANG_COMPILER }}" | |
run: ${{env.COMPILER}} meson setup ${{github.workspace}}/build --pkg-config-path=${{env.LIBCAMERA_LKG_DIR}}/lib/aarch64-linux-gnu/pkgconfig/ -Dbuildtype=${{matrix.build_type}} | |
timeout-minutes: 5 | |
- name: Build | |
run: ninja -C ${{github.workspace}}/build | |
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 meson | |
run: meson setup ${{github.workspace}}/build --pkg-config-path=${{env.LIBCAMERA_LKG_DIR}}/lib/aarch64-linux-gnu/pkgconfig/ -Dbuildtype=release -Denable_drm=false -Denable_egl=false -Denable_qt=false -Denable_opencv=false -Denable_tflite=false -Denable_libav=false | |
timeout-minutes: 5 | |
- name: Build | |
run: ninja -C ${{github.workspace}}/build | |
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/apps/libcamera-hello --version | |
- name: Print linkage info | |
run: ldd ${{github.workspace}}/build/apps/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/apps/ --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 |