Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

Commit

Permalink
Rebase/v3.2.1 (#24)
Browse files Browse the repository at this point in the history
feat: release v3.2.1
  • Loading branch information
fenos authored Nov 30, 2023
1 parent 62ef38b commit c15dbef
Show file tree
Hide file tree
Showing 121 changed files with 2,360 additions and 4,715 deletions.
16 changes: 16 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
BasedOnStyle: GNU
AccessModifierOffset: -2
AlignAfterOpenBracket: DontAlign
AlignEscapedNewlines: DontAlign
AlignOperands: DontAlign
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Stroustrup
IndentWidth: 2
SortIncludes: Never
SpaceAfterCStyleCast: true
SpaceBeforeParens: ControlStatements
TabWidth: 2
UseTab: Never
ColumnLimit: 0
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: imgproxy
25 changes: 20 additions & 5 deletions .github/workflows/Dockerfile → .github/ci-docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:bullseye-slim
FROM debian:stable-slim

RUN apt-get -qq update \
&& apt-get install -y --no-install-recommends \
Expand All @@ -7,8 +7,11 @@ RUN apt-get -qq update \
git \
ca-certificates \
build-essential \
ninja-build \
gobject-introspection \
libgirepository1.0-dev \
python3-pip \
python3-venv \
libssl-dev \
libglib2.0-dev \
libxml2-dev \
libjpeg-dev \
Expand All @@ -25,14 +28,27 @@ RUN apt-get -qq update \
libopencv-imgproc-dev \
libopencv-objdetect-dev \
libopencv-dnn-dev \
&& pip install --force meson \
&& python3 -m venv /root/.python \
&& /root/.python/bin/pip install meson ninja \
&& rm -rf /var/lib/apt/lists/*

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y \
&& export PATH="/root/.cargo/bin:$PATH" \
&& cargo install cargo-c \
&& cd /root \
&& git clone --depth 1 https://github.com/DarthSim/quantizr.git \
&& cd quantizr \
&& cargo cinstall --release --library-type=cdylib \
&& rm -rf /root/.rustup /root/.cargo

ENV PATH="/root/.python/bin:$PATH"
ENV LD_LIBRARY_PATH="/usr/local/lib"

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.13" "8.14"; do \
&& for VIPS_VERSION in "8.13" "8.14" "8.15"; 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" \
Expand All @@ -45,7 +61,6 @@ RUN \
--prefix=/root/vips/$VIPS_VERSION \
--libdir=lib \
-Dgtk_doc=false \
-Dintrospection=false \
&& ninja -C _build \
&& ninja -C _build install \
&& cd .. \
Expand Down
4 changes: 4 additions & 0 deletions .github/ci-docker/hooks/push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
DATETAG=$(date +%Y%m%d%H%M)
docker tag $IMAGE_NAME $DOCKER_REPO:$DATETAG
docker push $DOCKER_REPO:$DATETAG
26 changes: 0 additions & 26 deletions .github/workflows/docs-lint.yml

This file was deleted.

12 changes: 6 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
lint:
runs-on: ubuntu-latest
container:
image: darthsim/imgproxy-ci:202302212110
image: darthsim/imgproxy-ci:202311211816
strategy:
matrix:
go-version: ["1.20.4"]
vips-version: ["8.14"]
go-version: ["1.21.4"]
vips-version: ["8.15"]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -34,9 +34,9 @@ jobs:
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.51.2
version: v1.55.0
args: --timeout 5m0s
skip-cache: true
env:
LD_LIBRARY_PATH: "${{ env.LD_LIBRARY_PATH }}:/root/vips/${{ matrix.vips-version }}/lib"
PKG_CONFIG_PATH: "${{ env.PKG_CONFIG_PATH }}:/root/vips/${{ matrix.vips-version }}/lib/pkgconfig"
LD_LIBRARY_PATH: "/usr/local/lib:/root/vips/${{ matrix.vips-version }}/lib"
PKG_CONFIG_PATH: "/usr/local/lib/pkgconfig:/root/vips/${{ matrix.vips-version }}/lib/pkgconfig"
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
test:
runs-on: ubuntu-latest
container:
image: darthsim/imgproxy-ci:202302212110
image: darthsim/imgproxy-ci:202311211816
strategy:
matrix:
go-version: ["1.20.4"]
vips-version: ["8.14"]
go-version: ["1.21.4"]
vips-version: ["8.15"]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -34,5 +34,5 @@ jobs:
- name: Test
run: go test ./...
env:
LD_LIBRARY_PATH: "${{ env.LD_LIBRARY_PATH }}:/root/vips/${{ matrix.vips-version }}/lib"
PKG_CONFIG_PATH: "${{ env.PKG_CONFIG_PATH }}:/root/vips/${{ matrix.vips-version }}/lib/pkgconfig"
LD_LIBRARY_PATH: "/usr/local/lib:/root/vips/${{ matrix.vips-version }}/lib"
PKG_CONFIG_PATH: "/usr/local/lib/pkgconfig:/root/vips/${{ matrix.vips-version }}/lib/pkgconfig"
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ run:
linters:
disable-all: true
enable:
- deadcode
# - errcheck
- gocritic
# - goconst
Expand All @@ -15,11 +14,9 @@ linters:
- govet
- ineffassign
- staticcheck
- structcheck
- stylecheck
- typecheck
- unused
- varcheck

linters-settings:
govet:
Expand Down
3 changes: 2 additions & 1 deletion .lefthook/pre-commit/lint
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/bin/sh

if ! git diff --staged --name-only | grep -qe ".*\.go$"; then
if ! git diff --staged --name-only | grep -qE ".*\.go$|\.golangci\.yml$"; then
echo "Nothing to lint"
exit 0;
fi

if [ -x "$(which brew)" ]; then
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$(brew --prefix libffi)/lib/pkgconfig"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$(brew --prefix libarchive)/lib/pkgconfig"
fi

export CGO_LDFLAGS_ALLOW="-s|-w"
Expand Down
1 change: 1 addition & 0 deletions .lefthook/pre-push/test
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

if [ -x "$(which brew)" ]; then
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$(brew --prefix libffi)/lib/pkgconfig"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$(brew --prefix libarchive)/lib/pkgconfig"
fi

export CGO_LDFLAGS_ALLOW="-s|-w"
Expand Down
Loading

0 comments on commit c15dbef

Please sign in to comment.