Skip to content

Commit b4412af

Browse files
authored
Introduce CI workflow (#69)
* Commit jmagick_build.yml, GitHub Action workflow. Remove Travis setting file. configure.ac cosmetic changes * Use AC_SYS_LARGEFILE instead of own checks * Use AS_HELP_STRING, to arrange help string indent docker improve * Use docker image `dpokidov/imagemagick` to build ImageMagick misc * Add .gitignore * Use cache on GitHub Action * Add os and jdk matrix * Fix for autotools doc style
1 parent cbe6e85 commit b4412af

File tree

10 files changed

+527
-327
lines changed

10 files changed

+527
-327
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: jmagick Makefile CI (multiple jdk versions)
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches: [ "master" ]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest # jammy
11+
12+
name: ${{ matrix.jdk }} on ${{ matrix.os }}
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
jdk: ['8', '11']
17+
os: ['ubuntu', 'bullseye']
18+
exclude:
19+
- jdk: '8'
20+
os: 'bullseye'
21+
22+
container:
23+
image: dpokidov/imagemagick:7.1.1-10-${{ matrix.os }}
24+
options: --user root
25+
26+
steps:
27+
- uses: actions/checkout@v3
28+
29+
- name: Package update
30+
run: apt-get update -y && apt-get install -y sudo curl wget apt-utils
31+
32+
- name: Install build tools
33+
run: apt-get install -y autoconf automake libtool build-essential pkg-config openjdk-${{ matrix.jdk }}-jdk
34+
35+
- name: Prepare autotools
36+
run: |
37+
touch NEWS AUTHORS ChangeLog
38+
autoreconf --force --install
39+
automake --add-missing
40+
41+
- name: Configure
42+
run: |
43+
./configure --with-java-home=/usr/lib/jvm/java-${{ matrix.jdk }}-openjdk-amd64
44+
45+
- name: Make
46+
run: make

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ obj
1111
/config.log
1212
/config.status
1313
/configure
14+
/configure~
1415
/ltmain.sh
1516
/config.guess
1617
/config.sub
18+
/missing
19+
/Makefile
20+
/Makefile.in
21+
/compile
22+
23+
.idea/

.travis.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

Changelog.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ IM Before version 6.2.9 does not support the DivideCompositeOp CompositeOperator
3737

3838
========== Changelog ===========
3939

40+
2023-11-23
41+
* Added CI workflow support, configure.ac improved, see https://github.com/techblue/jmagick/commits/master for recent changes
42+
43+
2023-06-09
44+
* Added build support for Java 11, 17
45+
4046
2014-08-02 Christian Ferbar
4147
* Add Kerning, InterwordSpacing, InterlineSpacing, getTypeMetrics, FormatMagickCaption
4248

Dockerfile

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
FROM ubuntu:14.04
1+
FROM dpokidov/imagemagick:7.1.1-10-ubuntu
22

3-
RUN apt-get update
4-
RUN apt-get install -y openjdk-7-jdk libmagickcore-dev libmagickwand-dev make
3+
RUN apt-get update -y
4+
RUN apt-get install -y autoconf automake libtool build-essential pkg-config openjdk-11-jdk
55

6-
ADD docker/build.sh /
7-
RUN chmod +x /build.sh
8-
WORKDIR /src
9-
VOLUME /src
10-
VOLUME /build
11-
CMD /build.sh
6+
COPY . .
127

8+
RUN touch NEWS AUTHORS ChangeLog
9+
RUN autoreconf --force --install
10+
RUN automake --add-missing
1311

12+
RUN ./configure --with-java-home=/usr/lib/jvm/java-11-openjdk-amd64
13+
RUN make
1414

15+
# override "dpokidov/imagemagick" default entrypoint
16+
ENTRYPOINT [""]

Make.def.in

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
# Some macro definitions.
33
#
44

5-
OS = @OS@
6-
75
# Versions
86
MAJOR = @VER_MAJOR@
97
MINOR = @VER_MINOR@
@@ -71,5 +69,8 @@ MAGICK_LIB_PATH = @MAGICK_LIB_PATH@
7169
# Java include directories
7270
JAVA_INCLUDES = @JAVA_INCLUDES@
7371

74-
#Shared library extension
72+
# Shared library extension
7573
SHARED_LIB_EXT = @SHARED_LIB_EXT@
74+
75+
# osx or not
76+
DARWIN = @DARWIN@

Make.rules

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
# Copyright (C) 1999 Eric Yeo. All rights reserved.
22

3-
CYGPATH := $(shell command -v cygpath 2> /dev/null)
4-
53
# Fix obscure libtool issue
64
ifdef CYGPATH
75
export echo=echo
86
endif
97

10-
ifeq ($(strip $(OS)),Darwin)
11-
DARWIN = true
12-
endif
13-
14-
158
# This is the main Java sources.
169
ifndef JAVA_SRC_DIR
1710
JAVA_SRC_DIR = $(PROJ_BASE_DIR)src

Makefile renamed to Makefile.am

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,17 @@
1111
MAKE_PATH = .
1212
include $(MAKE_PATH)/Make.def
1313

14-
CYGPATH := $(shell command -v cygpath 2> /dev/null)
15-
1614
DIRS = src
17-
ifdef CYGPATH
18-
JAR_FILE = "$(shell cygpath -C UTF8 -w "$(LIB_DIR)/jmagick-$(MAJOR).$(MINOR).$(MICRO).jar")"
19-
CLEAN_LIST = $(LIB_DIR)/jmagick-$(MAJOR).$(MINOR).$(MICRO).jar
20-
JAVADOC_DEST = "$(shell cygpath -C UTF8 -s -w "$(DEST)$(JAVADOC_DIR)")"
21-
JAVADOC_SRC = "$(shell cygpath -C UTF8 -s -w "$(JAVA_SRC_DIR)")"
15+
if USE_CYGPATH
16+
JAR_FILE = "$(shell cygpath -C UTF8 -w "$(LIB_DIR)/jmagick-$(MAJOR).$(MINOR).$(MICRO).jar")"
17+
CLEAN_LIST = $(LIB_DIR)/jmagick-$(MAJOR).$(MINOR).$(MICRO).jar
18+
JAVADOC_DEST = "$(shell cygpath -C UTF8 -s -w "$(DEST)$(JAVADOC_DIR)")"
19+
JAVADOC_SRC = "$(shell cygpath -C UTF8 -s -w "$(JAVA_SRC_DIR)")"
2220
else
23-
JAR_FILE = $(LIB_DIR)/jmagick-$(MAJOR).$(MINOR).$(MICRO).jar
24-
CLEAN_LIST = $(JAR_FILE)
25-
JAVADOC_DEST = $(DEST)$(JAVADOC_DIR)
26-
JAVADOC_SRC = $(JAVA_SRC_DIR)
21+
JAR_FILE = $(LIB_DIR)/jmagick-$(MAJOR).$(MINOR).$(MICRO).jar
22+
CLEAN_LIST = $(JAR_FILE)
23+
JAVADOC_DEST = $(DEST)$(JAVADOC_DIR)
24+
JAVADOC_SRC = $(JAVA_SRC_DIR)
2725
endif
2826

2927
all: dir default-target

0 commit comments

Comments
 (0)