Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis-CI #4

Merged
merged 26 commits into from
Nov 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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