Feat: Expose export params #2131
Workflow file for this run
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
name: test | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Test | |
runs-on: ubuntu-20.04 | |
env: | |
CGO_CFLAGS_ALLOW: -Xpreprocessor | |
VIPS_VERSION: 8.14.3 | |
V: 5 | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ^1.20 | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Install linux dependencies | |
run: | | |
sudo add-apt-repository -y ppa:lovell/cgif | |
sudo add-apt-repository -y ppa:strukturag/libde265 | |
sudo add-apt-repository -y ppa:strukturag/libheif | |
sudo apt-get update | |
sudo apt-get install -y \ | |
python3-pip ninja-build \ | |
glib-2.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 \ | |
libopenjp2-7-dev libcgif-dev | |
sudo pip3 install meson | |
- 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=false | |
ninja -C _build | |
sudo ninja -C _build 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 |