Vagrant/Fabric setup for testing Ubuntu, FreeBSD

This commit is contained in:
Nathan Fiedler
2016-02-13 13:09:06 -08:00
parent 0c3c8888a7
commit dd78d6bfac
8 changed files with 121 additions and 46 deletions

View File

@ -2,16 +2,16 @@
## Mac OS X
[Homebrew](http://brew.sh) is the easiest way to install everything on Mac.
1. Install Xcode
1. Install Homebrew
1. Install Git
1. Install Rust and Cargo
1. Install ImageMagick
```
$ xcode-select --install
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew install git
$ brew install rust
$ brew install imagemagick
```
@ -20,51 +20,21 @@ Then build in the usual manner, as shown in the `README.md` file (i.e. `cargo bu
## FreeBSD
1. Install Git
1. Install Rust
1. Install Cargo
1. Install ImageMagick
1. Install the Clang libraries
```
$ sudo pkg install -y git
$ sudo pkg install -y rust
$ sudo pkg install -y cargo
$ sudo pkg install -y ImageMagick-nox11
$ sudo pkg install -y clang-devel
```
See the FreeBSD `fabfile.py` for an example of how to install everything. In particular, note that it may be necessary to set `LIBCLANG_PATH` to the path containing the `libclang.so` library.
### Building
The rust-bindgen tool (or one of its dependencies) needs a little help finding the Clang library during the build process, so set `LIBCLANG_PATH` to the path of `libclang.so`. The steps below work for FreeBSD 10.2.
```
$ setenv LIBCLANG_PATH /usr/local/llvm-devel/lib
$ cargo build
$ cargo test
```
Then build in the usual manner, as shown in the `README.md` file (i.e. `cargo build` and `cargo test`).
## Ubuntu Linux
1. Install Git
1. Install Rust and Cargo
1. Install ImageMagick
1. Install the Clang libraries
These steps are known to work for Ubuntu Linux 14.04 LTS.
See the Ubuntu `fabfile.py` for an example of how to install everything.
```
$ sudo apt-get install git
$ curl -sSf https://static.rust-lang.org/rustup.sh | sh
$ sudo apt-get build-dep imagemagick
$ wget http://www.imagemagick.org/download/ImageMagick.tar.gz
$ tar zxf ImageMagick.tar.gz
$ cd ImageMagick-*
$ ./configure
$ make
$ sudo make install
$ cd ..
$ sudo apt-get install libclang-dev
```
Then build in the usual manner, as shown in the `README.md` file (i.e. `cargo build` and `cargo test`).
Then build in the usual manner, as shown in the `README.md` file (i.e. `cargo build` and `cargo test`). If running the tests fails because the MagickWand library cannot be found, try rebuilding the ldconfig cache (`sudo ldconfig`).