Skip to content

build: imagor 1.4.13, libvips 8.15.2, go 1.22.5 (#86) #457

build: imagor 1.4.13, libvips 8.15.2, go 1.22.5 (#86)

build: imagor 1.4.13, libvips 8.15.2, go 1.22.5 (#86) #457

Workflow file for this run

name: test
on: [push, pull_request]
jobs:
build:
name: Test
runs-on: ubuntu-22.04
env:
CGO_CFLAGS_ALLOW: -Xpreprocessor
VIPS_VERSION: 8.15.2
FFMPEG_VERSION: 5.1.2
V: 4
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.22
- name: Check out code
uses: actions/checkout@v2
- name: Install linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
meson ninja-build \
libglib2.0-dev libexpat-dev librsvg2-dev libpng-dev \
libjpeg-turbo8-dev libimagequant-dev libfftw3-dev \
libpoppler-glib-dev libxml2-dev \
libopenslide-dev libcfitsio-dev liborc-0.4-dev libpango1.0-dev \
libtiff5-dev libgsf-1-dev giflib-tools libwebp-dev libheif-dev \
yasm libx264-dev libx265-dev libnuma-dev libvpx-dev libtheora-dev \
librtmp-dev libvorbis-dev \
libopenjp2-7-dev libcgif-dev
- name: Cache libvips
uses: actions/cache@v3
with:
path: vips-${{ env.VIPS_VERSION }}
key: ${{ runner.os }}-vips-${{ env.V }}-${{ env.VIPS_VERSION }}
restore-keys: |
${{ runner.os }}-vips-${{ env.V }}-
- name: Build libvips from source
run: |
if [ ! -d "vips-${{ env.VIPS_VERSION }}" ]
then
wget https://github.com/libvips/libvips/releases/download/v${{ env.VIPS_VERSION }}/vips-${{ env.VIPS_VERSION }}.tar.xz
tar xf vips-${{ env.VIPS_VERSION }}.tar.xz
fi
cd vips-${{ env.VIPS_VERSION }}
meson setup _build \
--buildtype=release \
--strip \
--prefix=/usr/local \
--libdir=lib \
-Dgtk_doc=false \
-Dmagick=disabled \
-Dintrospection=disabled
ninja -C _build
sudo ninja -C _build install
sudo ldconfig
- name: Cache ffmpeg
uses: actions/cache@v3
with:
path: ffmpeg-${{ env.FFMPEG_VERSION }}
key: ${{ runner.os }}-ffmpeg-${{ env.V }}-${{ env.FFMPEG_VERSION }}
restore-keys: |
${{ runner.os }}-ffmpeg-${{ env.V }}-
- name: Build ffmpeg from source
run: |
if [ ! -d "ffmpeg-${{ env.FFMPEG_VERSION }}" ]
then
wget https://ffmpeg.org/releases/ffmpeg-${{ env.FFMPEG_VERSION }}.tar.bz2
tar jvxf ffmpeg-${{ env.FFMPEG_VERSION }}.tar.bz2
fi
cd ffmpeg-${{ env.FFMPEG_VERSION }}
./configure --prefix=/usr/local \
--disable-debug \
--disable-doc \
--disable-ffplay \
--disable-static \
--enable-shared \
--enable-version3 \
--enable-gpl \
--enable-libtheora \
--enable-libvorbis \
--enable-librtmp \
--enable-libwebp \
--enable-libvpx \
--enable-libx265 \
--enable-libx264
make && sudo make install
sudo ldconfig
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Get dependencies
run: make get
- name: Test
run: make test
- name: Commit golden files
if: github.event_name != 'pull_request'
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "test: update golden files"
file_pattern: "testdata/golden"
- name: Coveralls
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov