Skip to content

Commit

Permalink
Introduce CI workflow (#69)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
hangingman authored Nov 23, 2023
1 parent cbe6e85 commit b4412af
Show file tree
Hide file tree
Showing 10 changed files with 527 additions and 327 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/jmagick_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: jmagick Makefile CI (multiple jdk versions)

on:
push:
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: ubuntu-latest # jammy

name: ${{ matrix.jdk }} on ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
jdk: ['8', '11']
os: ['ubuntu', 'bullseye']
exclude:
- jdk: '8'
os: 'bullseye'

container:
image: dpokidov/imagemagick:7.1.1-10-${{ matrix.os }}
options: --user root

steps:
- uses: actions/checkout@v3

- name: Package update
run: apt-get update -y && apt-get install -y sudo curl wget apt-utils

- name: Install build tools
run: apt-get install -y autoconf automake libtool build-essential pkg-config openjdk-${{ matrix.jdk }}-jdk

- name: Prepare autotools
run: |
touch NEWS AUTHORS ChangeLog
autoreconf --force --install
automake --add-missing
- name: Configure
run: |
./configure --with-java-home=/usr/lib/jvm/java-${{ matrix.jdk }}-openjdk-amd64
- name: Make
run: make
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ obj
/config.log
/config.status
/configure
/configure~
/ltmain.sh
/config.guess
/config.sub
/missing
/Makefile
/Makefile.in
/compile

.idea/
4 changes: 0 additions & 4 deletions .travis.yml

This file was deleted.

6 changes: 6 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ IM Before version 6.2.9 does not support the DivideCompositeOp CompositeOperator

========== Changelog ===========

2023-11-23
* Added CI workflow support, configure.ac improved, see https://github.com/techblue/jmagick/commits/master for recent changes

2023-06-09
* Added build support for Java 11, 17

2014-08-02 Christian Ferbar
* Add Kerning, InterwordSpacing, InterlineSpacing, getTypeMetrics, FormatMagickCaption

Expand Down
20 changes: 11 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
FROM ubuntu:14.04
FROM dpokidov/imagemagick:7.1.1-10-ubuntu

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

ADD docker/build.sh /
RUN chmod +x /build.sh
WORKDIR /src
VOLUME /src
VOLUME /build
CMD /build.sh
COPY . .

RUN touch NEWS AUTHORS ChangeLog
RUN autoreconf --force --install
RUN automake --add-missing

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

# override "dpokidov/imagemagick" default entrypoint
ENTRYPOINT [""]
7 changes: 4 additions & 3 deletions Make.def.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# Some macro definitions.
#

OS = @OS@

# Versions
MAJOR = @VER_MAJOR@
MINOR = @VER_MINOR@
Expand Down Expand Up @@ -71,5 +69,8 @@ MAGICK_LIB_PATH = @MAGICK_LIB_PATH@
# Java include directories
JAVA_INCLUDES = @JAVA_INCLUDES@

#Shared library extension
# Shared library extension
SHARED_LIB_EXT = @SHARED_LIB_EXT@

# osx or not
DARWIN = @DARWIN@
7 changes: 0 additions & 7 deletions Make.rules
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
# Copyright (C) 1999 Eric Yeo. All rights reserved.

CYGPATH := $(shell command -v cygpath 2> /dev/null)

# Fix obscure libtool issue
ifdef CYGPATH
export echo=echo
endif

ifeq ($(strip $(OS)),Darwin)
DARWIN = true
endif


# This is the main Java sources.
ifndef JAVA_SRC_DIR
JAVA_SRC_DIR = $(PROJ_BASE_DIR)src
Expand Down
20 changes: 9 additions & 11 deletions Makefile → Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,17 @@
MAKE_PATH = .
include $(MAKE_PATH)/Make.def

CYGPATH := $(shell command -v cygpath 2> /dev/null)

DIRS = src
ifdef CYGPATH
JAR_FILE = "$(shell cygpath -C UTF8 -w "$(LIB_DIR)/jmagick-$(MAJOR).$(MINOR).$(MICRO).jar")"
CLEAN_LIST = $(LIB_DIR)/jmagick-$(MAJOR).$(MINOR).$(MICRO).jar
JAVADOC_DEST = "$(shell cygpath -C UTF8 -s -w "$(DEST)$(JAVADOC_DIR)")"
JAVADOC_SRC = "$(shell cygpath -C UTF8 -s -w "$(JAVA_SRC_DIR)")"
if USE_CYGPATH
JAR_FILE = "$(shell cygpath -C UTF8 -w "$(LIB_DIR)/jmagick-$(MAJOR).$(MINOR).$(MICRO).jar")"
CLEAN_LIST = $(LIB_DIR)/jmagick-$(MAJOR).$(MINOR).$(MICRO).jar
JAVADOC_DEST = "$(shell cygpath -C UTF8 -s -w "$(DEST)$(JAVADOC_DIR)")"
JAVADOC_SRC = "$(shell cygpath -C UTF8 -s -w "$(JAVA_SRC_DIR)")"
else
JAR_FILE = $(LIB_DIR)/jmagick-$(MAJOR).$(MINOR).$(MICRO).jar
CLEAN_LIST = $(JAR_FILE)
JAVADOC_DEST = $(DEST)$(JAVADOC_DIR)
JAVADOC_SRC = $(JAVA_SRC_DIR)
JAR_FILE = $(LIB_DIR)/jmagick-$(MAJOR).$(MINOR).$(MICRO).jar
CLEAN_LIST = $(JAR_FILE)
JAVADOC_DEST = $(DEST)$(JAVADOC_DIR)
JAVADOC_SRC = $(JAVA_SRC_DIR)
endif

all: dir default-target
Expand Down
Loading

0 comments on commit b4412af

Please sign in to comment.