-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improves CMAKE, adds CI workflow, adds EVDEV pointer device support (#60
) * Implements dist. independent dependency detection using pkg-config Improves the cmake file * Adds ci workflow that tests building the project in different environments using docker * Adds support for evdev input pointer device to the example Updates README
- Loading branch information
1 parent
2547832
commit 8e98544
Showing
6 changed files
with
164 additions
and
12 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Test building the project in different environments | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: | ||
- { image: "debian:bullseye", dockerfile: "Dockerfile_DEBIAN" } | ||
- { image: "debian:bookworm", dockerfile: "Dockerfile_DEBIAN" } | ||
- { image: "ubuntu:20.04", dockerfile: "Dockerfile_DEBIAN" } | ||
- { image: "ubuntu:22.04", dockerfile: "Dockerfile_DEBIAN" } | ||
- { image: "rockylinux:8", dockerfile: "Dockerfile_RHEL" } | ||
- { image: "rockylinux:9", dockerfile: "Dockerfile_RHEL" } | ||
- { image: "oraclelinux:8", dockerfile: "Dockerfile_RHEL" } | ||
- { image: "oraclelinux:9", dockerfile: "Dockerfile_RHEL" } | ||
fail-fast: false | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build the Docker image | ||
run: | | ||
docker build \ | ||
--build-arg BASE_OS=${{ matrix.os.image }} \ | ||
-f docker/${{ matrix.os.dockerfile }} \ | ||
-t test_${{ matrix.os.image }} . | ||
- name: FBDEV Test building the project | ||
run: | | ||
sed -i "s/^#define LV_USE_LINUX_FBDEV.*$/#define LV_USE_LINUX_FBDEV 1/g" lv_conf.h && \ | ||
sed -i "s/^#define LV_USE_LINUX_DRM.*$/#define LV_USE_LINUX_DRM 0/g" lv_conf.h && \ | ||
sed -i "s/^#define LV_USE_SDL.*$/#define LV_USE_SDL 0/g" lv_conf.h && \ | ||
docker run --rm -v "$(pwd)":/workdir -t test_${{ matrix.os.image }} \ | ||
/bin/bash -ec "mkdir build/ && cd build/ && cmake .. && make -j && ldd ../bin/main" | ||
- name: DRM Test building the project | ||
run: | | ||
sudo rm -Rf build/ bin/ && \ | ||
sed -i "s/^#define LV_USE_LINUX_FBDEV.*$/#define LV_USE_LINUX_FBDEV 0/g" lv_conf.h && \ | ||
sed -i "s/^#define LV_USE_LINUX_DRM.*$/#define LV_USE_LINUX_DRM 1/g" lv_conf.h && \ | ||
sed -i "s/^#define LV_USE_SDL.*$/#define LV_USE_SDL 0/g" lv_conf.h && \ | ||
docker run --rm -v "$(pwd)":/workdir -t test_${{ matrix.os.image }} \ | ||
/bin/bash -ec "mkdir build/ && cd build/ && cmake .. && make -j && ldd ../bin/main" | ||
- name: SDL Test building the project | ||
run: | | ||
sudo rm -Rf build/ bin/ && \ | ||
sed -i "s/^#define LV_USE_LINUX_FBDEV.*$/#define LV_USE_LINUX_FBDEV 0/g" lv_conf.h && \ | ||
sed -i "s/^#define LV_USE_LINUX_DRM.*$/#define LV_USE_LINUX_DRM 0/g" lv_conf.h && \ | ||
sed -i "s/^#define LV_USE_SDL.*$/#define LV_USE_SDL 1/g" lv_conf.h && \ | ||
docker run --rm -v "$(pwd)":/workdir -t test_${{ matrix.os.image }} \ | ||
/bin/bash -ec "mkdir build/ && cd build/ && cmake .. && make -j && ldd ../bin/main" |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
ARG BASE_OS | ||
FROM "$BASE_OS" | ||
|
||
RUN DEBIAN_FRONTEND="noninteractive" apt-get update | ||
|
||
# Build tools | ||
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y make cmake build-essential | ||
|
||
# Required for LV_USE_SDL | ||
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y libsdl2-dev libsdl2-image-dev | ||
|
||
# Required for LV_USE_LINUX_DRM linux-headers-generic provides an included header file | ||
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y libdrm-dev linux-headers-generic | ||
|
||
RUN mkdir /workdir | ||
WORKDIR /workdir |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
ARG BASE_OS | ||
FROM "$BASE_OS" | ||
|
||
RUN dnf makecache --refresh | ||
RUN dnf -y install 'dnf-command(config-manager)' | ||
RUN dnf repolist --all | ||
|
||
# Rocky 8 | ||
RUN dnf config-manager --set-enabled powertools || true | ||
|
||
# Oracle 8 | ||
RUN dnf config-manager --set-enabled ol8_codeready_builder || true | ||
|
||
# Rocky/Oracle 9+ | ||
RUN dnf config-manager --set-enabled crb || true | ||
|
||
RUN dnf -y install epel-release | ||
RUN dnf makecache --refresh | ||
|
||
# Build tools | ||
RUN dnf -y groupinstall "Development Tools" | ||
RUN dnf -y install cmake | ||
|
||
# Required for LV_USE_SDL | ||
RUN dnf -y install SDL2-devel SDL2_image-devel | ||
|
||
# Required for LV_USE_LINUX_DRM | ||
RUN dnf -y install libdrm-devel | ||
|
||
RUN mkdir /workdir | ||
WORKDIR /workdir |
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