Skip to content

Commit

Permalink
tests: Add nightly picamera2 test runs to the actions script.
Browse files Browse the repository at this point in the history
Signed-off-by: Naushir Patuck <[email protected]>
  • Loading branch information
naushir committed Oct 20, 2023
1 parent f8b05c4 commit 39f62cc
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/libcamera-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ env:
GCC_COMPILER: "CC=/usr/bin/gcc CXX=/usr/bin/g++"
CLANG_COMPILER: "CC=/usr/bin/clang-13 CXX=/usr/bin/clang++-13"
LIBCAMERA_SRC_DIR: "${{github.workspace}}/../libcamera"
PICAMERA2_SRC_DIR: "${{github.workspace}}/../picamera2"
LIBCAMERA_INSTALL_DIR: "${{github.workspace}}/../libcamera/install"
LIBCAMERA_LKG_DIR: "${{github.workspace}}/../libcamera_lkg"
LIBCAMERA_LD_LIBRARY_DIR: "${{github.workspace}}/../libcamera/install/lib/aarch64-linux-gnu"

jobs:
build-libcamera:
Expand Down Expand Up @@ -132,7 +134,7 @@ jobs:
- name: Print linkage info
run: ldd ${{github.workspace}}/build/apps/libcamera-hello | grep libcamera

- name: Test
- name: Test libcamera-apps
run: ${{github.workspace}}/utils/test.py --exe-dir ${{github.workspace}}/build/apps/ --output-dir ${{github.workspace}}/test_output --json-dir ${{github.workspace}}/assets
timeout-minutes: 15

Expand All @@ -144,11 +146,31 @@ jobs:
path: ${{github.workspace}}/test_output/
retention-days: 7

update-libcamera-base:
run-picamera2-tests:

runs-on: ${{matrix.camera}}
needs: run-test

strategy:
matrix:
camera: [ imx219, imx477, imx708, pi5-imx708-imx477 ]

steps:
- name: Clean picamera2
run: rm -rf ${{env.PICAMERA2_SRC_DIR}}

- name: Pull picamera2
run: git clone --depth=1 https://github.com/raspberrypi/picamera2.git ${{env.PICAMERA2_SRC_DIR}}

- name: Test picamera2
run: DISPLAY=:0.0 LD_LIBRARY_PATH=${{env.LIBCAMERA_LD_LIBRARY_DIR}} PYTHONPATH=${{env.LIBCAMERA_LD_LIBRARY_DIR}}/python3.11/site-packages/:${{env.PICAMERA2_SRC_DIR}} ${{env.PICAMERA2_SRC_DIR}}/tools/run_tests.py --picamera2-dir ${{env.PICAMERA2_SRC_DIR}}
timeout-minutes: 15

update-libcamera-base:

runs-on: ${{matrix.camera}}
needs: run-picamera2-tests

strategy:
matrix:
camera: [ imx219, imx477, imx708, pi5-imx708-imx477 ]
Expand All @@ -170,7 +192,7 @@ jobs:
run: tar -xvf build-artifacts-libcamera.tar -C ${{env.LIBCAMERA_SRC_DIR}}

- name: Setup meson
run: cd ${{env.LIBCAMERA_SRC_DIR}} && meson setup build -Dprefix=${{env.LIBCAMERA_LKG_DIR}} -Dpipelines=rpi/vc4,rpi/pisp -Dipas=rpi/vc4,rpi/pisp -Dpycamera=enabled -Dtest=false -Dlibpisp:default_library=static --wipe
run: cd ${{env.LIBCAMERA_SRC_DIR}} && meson setup build -Dprefix=${{env.LIBCAMERA_LKG_DIR}} -Dpipelines=rpi/vc4,rpi/pisp -Dipas=rpi/vc4,rpi/pisp -Dpycamera=enabled -Dtest=false -Dlibpisp:default_library=static --wipe

- name: Build
run: cd ${{env.LIBCAMERA_SRC_DIR}}/build && ninja install
Expand Down

0 comments on commit 39f62cc

Please sign in to comment.