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 "cmake -B build -S . && make -j -C build && ldd bin/lvglsim" - 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 "cmake -B build -S . && make -j -C build && ldd bin/lvglsim" - 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 "cmake -B build -S . && make -j -C build && ldd bin/lvglsim"