Skip to content
Open
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
67 changes: 67 additions & 0 deletions .github/workflows/build-deb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Build Debian Package (ARM64)

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

jobs:
build-deb:
name: Debian package - ${{ matrix.config.name }}
runs-on: ubuntu-latest
permissions:
contents: read

strategy:
fail-fast: false
matrix:
config:
- name: standard-rpi5
hardware_header: mandeye-standard-rpi5.h
cmake_extra: -DMANDEYE_USE_LIBCAMERA=FALSE
- name: direct-cm5
hardware_header: mandeye-direct-cm5.h
cmake_extra: ""

steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64

- uses: actions/checkout@v4
with:
submodules: true

- name: Build Debian package
run: |
docker run --rm --platform linux/arm64 \
-v ${{ github.workspace }}:/workspace \
-w /workspace \
arm64v8/debian:bookworm \
bash -c "
set -e
apt-get update -qq
apt-get install -y -qq --no-install-recommends \
build-essential cmake git pkg-config ca-certificates \
libserial-dev libgpiod-dev libzmq3-dev libboost-all-dev \
libpistache-dev rapidjson-dev nlohmann-json3-dev cppzmq-dev \
libcamera-dev libopencv-dev pps-tools
update-ca-certificates
git config --global --add safe.directory '*'
cmake -B build-pkg \
-DCMAKE_BUILD_TYPE=Release \
-DMANDEYE_HARDWARE_HEADER=${{ matrix.config.hardware_header }} \
${{ matrix.config.cmake_extra }}
cmake --build build-pkg -j\$(nproc)
cd build-pkg
cpack -G DEB
"

- name: Upload Debian package
uses: actions/upload-artifact@v4
with:
name: mandeye-deb-${{ matrix.config.name }}
path: build-pkg/*.deb
if-no-files-found: error
6 changes: 4 additions & 2 deletions code/gpios.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ struct gpiod_line;

namespace mandeye
{

using namespace hardware;
// forward declaration of cppgpio type that I want to keep inside compliation unit

Expand Down Expand Up @@ -108,7 +109,8 @@ class GpioClient
std::mutex m_lock;
std::atomic<bool> m_running{true};
};
static std::mutex gpioClientPtrLock;
static std::shared_ptr<GpioClient> gpioClientPtr;

inline std::mutex gpioClientPtrLock;
inline std::shared_ptr<GpioClient> gpioClientPtr;

} // namespace mandeye
Loading