Skip to content
Merged

Ci #64

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/camera-test-libpisp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Camera Tests

on:
pull_request_target:
branches: [main]

permissions:
statuses: write

jobs:
trigger-camera-tests:
runs-on: [self-hosted, camera-test-bridge]
if: >-
github.event.pull_request.head.repo.full_name == github.repository
timeout-minutes: 120
steps:
- name: Checkout camera_tester
env:
CAMERA_TESTER_URL: ${{ secrets.CAMERA_TESTER_URL }}
CAMERA_TESTER_PROJECT_ID: ${{ vars.CAMERA_TESTER_PROJECT_ID }}
CAMERA_TESTER_API_TOKEN: ${{ secrets.CAMERA_TESTER_API_TOKEN }}
run: |
CLONE_URL=$(curl -sf -H "PRIVATE-TOKEN: ${CAMERA_TESTER_API_TOKEN}" \
"${CAMERA_TESTER_URL}/api/v4/projects/${CAMERA_TESTER_PROJECT_ID}" \
| python3 -c "import sys, json; print(json.load(sys.stdin)['http_url_to_repo'])")
AUTH_URL="${CLONE_URL/https:\/\//https://oauth2:${CAMERA_TESTER_API_TOKEN}@}"
find . -mindepth 1 -delete 2>/dev/null || true
git clone --depth 1 "$AUTH_URL" .

- name: Install camera_tester
run: |
python3 -m venv .venv
. .venv/bin/activate
pip install -e .

- name: Run bridge
env:
LIBRARY: libpisp
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
GITHUB_BASE_REF: ${{ github.base_ref }}
CAMERA_TESTER_URL: ${{ secrets.CAMERA_TESTER_URL }}
CAMERA_TESTER_PROJECT_ID: ${{ vars.CAMERA_TESTER_PROJECT_ID }}
CAMERA_TESTER_TRIGGER_TOKEN: ${{ secrets.CAMERA_TESTER_TRIGGER_TOKEN }}
CAMERA_TESTER_API_TOKEN: ${{ secrets.CAMERA_TESTER_API_TOKEN }}
run: |
. .venv/bin/activate
python -m camera_tester.bridge
40 changes: 0 additions & 40 deletions .github/workflows/libpisp-build-test.yaml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/pisp-verification.test.yaml

This file was deleted.

5 changes: 5 additions & 0 deletions src/helpers/buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ const std::array<uint8_t *, 3> &Buffer::Sync::Get() const
return buffer_.get().mem;
}

const std::array<size_t, 3> &Buffer::Sync::Size() const
{
return buffer_.get().Size();
}

Buffer::Buffer()
: size(), mem(), fd({ -1, -1, -1 })
{
Expand Down
1 change: 1 addition & 0 deletions src/helpers/buffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ struct Buffer::Sync
~Sync();

const std::array<uint8_t *, 3> &Get() const;
const std::array<size_t, 3> &Size() const;

private:
BufferRef buffer_;
Expand Down