Skip to content

Commit

Permalink
Travis-CI (#4)
Browse files Browse the repository at this point in the history
* (#3) [Travis-CI] Started travis

* (#3) [Travis-CI] swift version

* (#3) [Travis-CI] builder submodule and travis update

* (#3) [Travis-CI] makefile

* (#3) [Travis-CI] installation script

* (#3) [Travis-CI] update travis.yml

* (#3) [Travis-CI] build script

* (#3) badges

* (#3) new package builder

* update package

* remove --force

* (#3) file moved

* (#3) (#4) Travis tweaks

* Update .travis.yml

* Update .travis.yml

* Update travis

* Zlib

* Zlib

* Update .travis.yml

* Update .travis.yml

* Update .travis.yml

* install script

* Update README.md

* Update README.md

* Update install-imagemagick.sh
  • Loading branch information
naithar authored Nov 23, 2016
1 parent 28b4ba6 commit 1e6de32
Show file tree
Hide file tree
Showing 11 changed files with 79 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "Package-Builder"]
path = Package-Builder
url = https://github.com/naithar/Package-Builder.git

2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.1
3.0
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
matrix:
include:
- os: linux
dist: trusty
sudo: required
- os: osx
osx_image: xcode8
sudo: required

before_install:
- sh ./common/install-imagemagick.sh
- git submodule update --init --remote --merge --recursive

script:
- ./Package-Builder/build-package.sh $TRAVIS_BUILD_DIR
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export BUILDER_SCRIPTS_DIR=Package-Builder/build

-include Package-Builder/build/Makefile

Package-Builder/build/Makefile:
@echo --- Fetching Package-Builder submodule
git submodule update --init --remote --merge --recursive
1 change: 1 addition & 0 deletions Package-Builder
Submodule Package-Builder added at d2d203
31 changes: 26 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
# Swift MagickWand

This package supports 6.9.6 version of ImageMagick.
[![Swift](https://img.shields.io/badge/swift-3.0-orange.svg?style=flat)](https://swift.org)
[![imagemagick](https://img.shields.io/badge/ImageMagick-6.9.6-orange.svg?style=flat)](https://www.imagemagick.org/script/index.php)
[![Build Status](https://travis-ci.org/naithar/MagickWand.svg?branch=master)](https://travis-ci.org/naithar/MagickWand)
[![MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](/LICENSE)
![macOS](https://img.shields.io/badge/os-macOS-green.svg?style=flat)
![Linux](https://img.shields.io/badge/os-linux-green.svg?style=flat)
![SPM](https://img.shields.io/badge/Swift_Package_Manager-compatible-orange.svg?style=flat)

This package supports 6.9.6 version of ImageMagick.

## Installing

## Intallation

### Linux and Mac OSX

#### Install ImageMagick

```
curl -OL http://www.imagemagick.org/download/ImageMagick-6.9.6-5.tar.gz
tar -xzf ImageMagick-6.9.6-5.tar.gz
Expand All @@ -16,12 +26,23 @@ make
sudo make install
```

## Building
You may also need to install dependencies for ImageMagick.
Or run an [install-script.sh](common/install-imagemagick.sh) which also installs `ZLIB` dependency.

#### Add Package

Add this package to `dependencies` in your `Package.swift` file.

```
.Package(url: "https://github.com/naithar/MagickWand.git", majorVersion: 0, minor: 2)
```

## Building and Testing

### Linux and Mac OSX

```
swift build -Xcc -I/usr/local/include/ImageMagick-6/ -Xlinker -L/usr/local/lib/ -Xcc -DMAGICKCORE_HDRI_ENABLE=0 -Xcc -DMAGICKCORE_QUANTUM_DEPTH=16
swift build -Xcc -I/usr/local/include/ImageMagick-6/ -Xlinker -L/usr/local/lib/ -Xcc -DMAGICKCORE_HDRI_ENABLE=0 -Xcc -DMAGICKCORE_QUANTUM_DEPTH=8
swift test -Xcc -I/usr/local/include/ImageMagick-6/ -Xlinker -L/usr/local/lib/ -Xcc -DMAGICKCORE_HDRI_ENABLE=0 -Xcc -DMAGICKCORE_QUANTUM_DEPTH=16
swift test -Xcc -I/usr/local/include/ImageMagick-6/ -Xlinker -L/usr/local/lib/ -Xcc -DMAGICKCORE_HDRI_ENABLE=0 -Xcc -DMAGICKCORE_QUANTUM_DEPTH=8
```
1 change: 1 addition & 0 deletions common/build/linux
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
swift build -Xcc -I/usr/local/include/ImageMagick-6/ -Xlinker -L/usr/local/lib/ -Xcc -DMAGICKCORE_HDRI_ENABLE=0 -Xcc -DMAGICKCORE_QUANTUM_DEPTH=16
1 change: 1 addition & 0 deletions common/build/macOS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
swift build -Xcc -I/usr/local/include/ImageMagick-6/ -Xlinker -L/usr/local/lib/ -Xcc -DMAGICKCORE_HDRI_ENABLE=0 -Xcc -DMAGICKCORE_QUANTUM_DEPTH=16
21 changes: 21 additions & 0 deletions common/install-imagemagick.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
echo ">> Installing ZLIB"

curl -OL https://www.imagemagick.org/download/delegates/zlib-1.2.8.tar.gz
tar -xzf zlib-1.2.8.tar.gz
cd zlib-1.2.8
./configure --prefix=/usr/local
make
sudo make install
cd ..
rm -rf zlib-1.2.8*

echo ">> Installing ImageMagick 6.9.6-5"

curl -OL https://www.imagemagick.org/download/ImageMagick-6.9.6-5.tar.gz
tar -xzf ImageMagick-6.9.6-5.tar.gz
cd ImageMagick-6.9.6-5
./configure --prefix=/usr/local --disable-static --with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8 --disable-openmp --with-gs-font-dir=/usr/local/share/ghostscript/fonts
make
sudo make install
cd ..
rm -rf ImageMagick-6.9.6-5*
1 change: 1 addition & 0 deletions common/test/linux
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
swift test -Xcc -I/usr/local/include/ImageMagick-6/ -Xlinker -L/usr/local/lib/ -Xcc -DMAGICKCORE_HDRI_ENABLE=0 -Xcc -DMAGICKCORE_QUANTUM_DEPTH=16
1 change: 1 addition & 0 deletions common/test/macOS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
swift test -Xcc -I/usr/local/include/ImageMagick-6/ -Xlinker -L/usr/local/lib/ -Xcc -DMAGICKCORE_HDRI_ENABLE=0 -Xcc -DMAGICKCORE_QUANTUM_DEPTH=16

0 comments on commit 1e6de32

Please sign in to comment.