From 1f92d04b127b5c1158b10530cd4daab31df35cec Mon Sep 17 00:00:00 2001 From: DarthSim Date: Tue, 21 Feb 2023 20:33:11 +0600 Subject: [PATCH] Update GH Actions workflows and Docker image --- .github/workflows/Dockerfile | 59 ++++++++++++++++++------------------ .github/workflows/lint.yml | 2 +- .github/workflows/test.yml | 2 +- 3 files changed, 32 insertions(+), 31 deletions(-) diff --git a/.github/workflows/Dockerfile b/.github/workflows/Dockerfile index 1fd7198d..3d6a5856 100644 --- a/.github/workflows/Dockerfile +++ b/.github/workflows/Dockerfile @@ -3,10 +3,12 @@ FROM debian:bullseye-slim RUN apt-get -qq update \ && apt-get install -y --no-install-recommends \ bash \ - ca-certificates \ - build-essential \ curl \ git \ + ca-certificates \ + build-essential \ + ninja-build \ + python3-pip \ libglib2.0-dev \ libxml2-dev \ libjpeg-dev \ @@ -21,40 +23,39 @@ RUN apt-get -qq update \ libswscale-dev \ libopencv-core-dev \ libopencv-imgproc-dev \ - libopencv-dnn-dev + libopencv-objdetect-dev \ + libopencv-dnn-dev \ + && pip install --force meson \ + && rm -rf /var/lib/apt/lists/* RUN \ mkdir /root/vips \ - && cd /root/vips \ - && curl -s -S -L -o vips_releases.json "https://api.github.com/repos/libvips/libvips/releases" \ - && for VIPS_VERSION in "8.10" "8.11" "8.12"; do \ - mkdir $VIPS_VERSION \ - && export VIPS_RELEASE=$(grep -m 1 "\"tag_name\": \"v$VIPS_VERSION." vips_releases.json | sed -E 's/.*"v([^"]+)".*/\1/') \ - && echo "Building Vips $VIPS_RELEASE as $VIPS_VERSION" \ - && curl -s -S -L -o $VIPS_RELEASE.tar.gz https://github.com/libvips/libvips/releases/download/v$VIPS_RELEASE/vips-$VIPS_RELEASE.tar.gz \ - && tar -xzf $VIPS_RELEASE.tar.gz \ - && cd vips-$VIPS_RELEASE \ - && ./configure \ - --prefix=/root/vips/$VIPS_VERSION \ - --without-python \ - --without-gsf \ - --without-orc \ - --disable-debug \ - --disable-dependency-tracking \ - --disable-static \ - --enable-silent-rules \ - --enable-gtk-doc-html=no \ - --enable-gtk-doc=no \ - --enable-pyvips8=no \ - && make install \ - && cd .. \ - && rm -rf $VIPS_RELEASE.tar.gz vips-$VIPS_RELEASE; \ - done + && cd /root/vips \ + && curl -s -S -L -o vips_releases.json "https://api.github.com/repos/libvips/libvips/releases" \ + && for VIPS_VERSION in "8.13" "8.14"; do \ + mkdir $VIPS_VERSION \ + && export VIPS_RELEASE=$(grep -m 1 "\"tag_name\": \"v$VIPS_VERSION." vips_releases.json | sed -E 's/.*"v([^"]+)".*/\1/') \ + && echo "Building Vips $VIPS_RELEASE as $VIPS_VERSION" \ + && curl -s -S -L -o libvips-$VIPS_RELEASE.tar.gz https://github.com/libvips/libvips/archive/refs/tags/v$VIPS_RELEASE.tar.gz \ + && tar -xzf libvips-$VIPS_RELEASE.tar.gz \ + && cd libvips-$VIPS_RELEASE \ + && meson setup _build \ + --buildtype=release \ + --strip \ + --prefix=/root/vips/$VIPS_VERSION \ + --libdir=lib \ + -Dgtk_doc=false \ + -Dintrospection=false \ + && ninja -C _build \ + && ninja -C _build install \ + && cd .. \ + && rm -rf libvips-$VIPS_RELEASE.tar.gz libvips-$VIPS_RELEASE; \ + done RUN echo "Name: OpenCV\n" \ "Description: Open Source Computer Vision Library\n" \ "Version: 4.5.1\n" \ - "Libs: -L/usr/lib/x86_64-linux-gnu -lopencv_dnn -lopencv_imgproc -lopencv_core\n" \ + "Libs: -L/usr/lib/x86_64-linux-gnu -lopencv_dnn -lopencv_objdetect -lopencv_imgproc -lopencv_core\n" \ "Libs.private: -ldl -lm -lpthread -lrt\n" \ "Cflags: -I/usr/include/opencv4\n" \ > /usr/lib/x86_64-linux-gnu/pkgconfig/opencv4.pc diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b41953e4..4e1e61ec 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: go-version: ["1.19.x"] - vips-version: ["8.12"] + vips-version: ["8.14"] steps: - name: Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 589e2340..217dcc6d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: go-version: ["1.19.x", "1.18.x"] - vips-version: ["8.12", "8.11", "8.10"] + vips-version: ["8.14", "8.13"] steps: - name: Checkout uses: actions/checkout@v2