Skip to content

Commit

Permalink
Merge master into improve_icc_handling
Browse files Browse the repository at this point in the history
  • Loading branch information
toaster committed Mar 3, 2024
2 parents 54c53b2 + 48c3867 commit 2af8104
Show file tree
Hide file tree
Showing 160 changed files with 838 additions and 572 deletions.
18 changes: 3 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,22 @@ on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
env:
CGO_CFLAGS_ALLOW: -Xpreprocessor
strategy:
matrix:
os: [ubuntu-22.04, macos-11]
runs-on: ubuntu-latest

steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.13
go-version: ^1.21

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Install linux deps
if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get -y install libopenjp2-7
sudo apt-get update
sudo apt-get -y install libvips-dev
- name: Install macos deps
if: matrix.os == 'macos-11'
run: |
brew install vips
- name: Get dependencies
run: |
go get -v -t -d ./...
Expand All @@ -43,7 +32,6 @@ jobs:
run: go test -v -coverprofile=profile.cov ./...

- name: Coveralls
if: matrix.os == 'ubuntu-22.04'
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov
18 changes: 1 addition & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,6 @@ Use [homebrew](https://brew.sh/) to install vips and pkg-config:
brew install vips pkg-config
```

### Ubuntu

You need a recent libvips to work with govips. New govips functionality is continuously added which takes advantage of new libvips functionality. Groovy (20.10) and Hirsute (21.04) repositories have working versions. However on Focal (20.04), you need to install libvips and dependencies from a backports repository:

```bash
sudo add-apt-repository -y ppa:strukturag/libde265
sudo add-apt-repository -y ppa:strukturag/libheif
sudo add-apt-repository ppa:tonimelisma/ppa
```

Then:

```bash
sudo apt -y install libvips-dev
```

### Windows

The recommended approach on Windows is to use Govips via WSL and Ubuntu.
Expand Down Expand Up @@ -121,7 +105,7 @@ MALLOC_ARENA_MAX=2 application

This will reduce GLib memory appetites by reducing the number of malloc arenas
that it can create. By default GLib creates one are per thread, and this would
follow to a memory fragmentation.
follow to memory fragmentation.

## Contributing

Expand Down
27 changes: 0 additions & 27 deletions build/Dockerfile-ubuntu-18.04

This file was deleted.

29 changes: 0 additions & 29 deletions build/Dockerfile-ubuntu-20.04

This file was deleted.

5 changes: 3 additions & 2 deletions build/Dockerfile-ubuntu-20.10
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This Dockerfile can be used to build Ubuntu/Debian packages with govips

FROM ubuntu:20.10

ENV DEBIAN_FRONTEND noninteractive
Expand All @@ -9,7 +11,6 @@ RUN apt-get update
RUN apt-get -y --no-install-recommends install software-properties-common gpg-agent
RUN apt-get -y --no-install-recommends install \
build-essential devscripts lsb-release dput wget git golang nvi
RUN add-apt-repository -y ppa:tonimelisma/ppa
RUN apt-get -y install --no-install-recommends libvips-dev
RUN go get golang.org/dl/go1.15.4
RUN ~/go/bin/go1.15.4 download
Expand All @@ -20,7 +21,7 @@ RUN cd ~/go/src/github.com/davidbyttow/govips && ~/go/bin/go1.15.4 test -v ./...


ENV DEBFULLNAME="Toni Melisma"
ENV DEBEMAIL="toni[email protected]"
ENV DEBEMAIL="toni@melisma.net"
ENV PPANAME="tonimelisma"
ENV DISTRIBUTION="groovy"
ENV DISTVERSION="20.10"
Expand Down
17 changes: 17 additions & 0 deletions build/Dockerfile-ubuntu-23.10
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This Dockerfile can be used to test and build govips

FROM ubuntu:23.10

ENV DEBIAN_FRONTEND noninteractive

# Enable deb-src APT sources and get build tools
RUN sed -e '/^#\sdeb-src /s/^# *//;t;d' "/etc/apt/sources.list" \
>> "/etc/apt/sources.list.d/ubuntu-sources.list"
RUN apt-get update
RUN apt-get -y --no-install-recommends install \
build-essential git golang
RUN apt-get -y --no-install-recommends install ca-certificates
RUN apt-get -y --no-install-recommends install lsb-release
RUN apt-get -y install --no-install-recommends libvips-dev
RUN mkdir -p ~/go/src/github.com/davidbyttow
RUN cd ~/go/src/github.com/davidbyttow && git clone -v https://github.com/davidbyttow/govips.git
8 changes: 2 additions & 6 deletions build/build.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
#!/bin/sh

docker build -t govips-ubuntu:18.04 -f Dockerfile-ubuntu-18.04 ./ || (echo build failed 1>&2 && exit 1)
docker build -t govips-ubuntu:20.04 -f Dockerfile-ubuntu-20.04 ./ || (echo build failed 1>&2 && exit 1)
docker build -t govips-ubuntu:20.10 -f Dockerfile-ubuntu-20.10 ./ || (echo build failed 1>&2 && exit 1)
docker build -t govips-ubuntu:23.10 -f Dockerfile-ubuntu-23.10 ./ || (echo build failed 1>&2 && exit 1)

mkdir -p /tmp/volume

echo To run the container:
echo docker run --rm -it -v /tmp/volume:/volume govips-ubuntu:18.04
echo docker run --rm -it -v /tmp/volume:/volume govips-ubuntu:20.04
echo docker run --rm -it -v /tmp/volume:/volume govips-ubuntu:20.10
echo docker run --rm -it -v /tmp/volume:/volume govips-ubuntu:23.10
Loading

0 comments on commit 2af8104

Please sign in to comment.