Skip to content

Commit d448bac

Browse files
authored
Merge pull request #86 from timburks/travis-linux
Add ubuntu.sh setup script and configure travis to test both osx and linux.
2 parents a6edfde + 0b14e7f commit d448bac

File tree

2 files changed

+92
-1
lines changed

2 files changed

+92
-1
lines changed

.travis.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
language: objective-c
1+
matrix:
2+
include:
3+
- os: linux
4+
language: c
5+
dist: trusty
6+
sudo: required
7+
- os: osx
8+
language: objective-c
9+
osx_image: xcode8.3
10+
before_install:
11+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./ubuntu.sh; fi
212
before_script:
313
- make
414
- ./mininush tools/nuke install

ubuntu.sh

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
#!/bin/bash
2+
#
3+
# Use this script in a bare Ubuntu distribution to install
4+
# clang, libobjc2, GNUstep, and other dependencies that
5+
# will allow you to build and run Nu.
6+
#
7+
# libobjc2 is an updated runtime that seeks compatibility
8+
# with Apple's modern Objective-C runtime. This new runtime
9+
# allows Nu to be ported to Linux+GNUstep without difficulty.
10+
#
11+
# Tested with ubuntu-14.04
12+
# Other Ubuntu and Debian installations may also work well.
13+
#
14+
# Thanks to Tobias Lensing for pointing the way.
15+
# http://blog.tlensing.org/2013/02/24/objective-c-on-linux-setting-up-gnustep-clang-llvm-objective-c-2-0-blocks-runtime-gcd-on-ubuntu-12-04/
16+
#
17+
18+
sudo apt-get update
19+
sudo apt-get install curl -y
20+
sudo apt-get install ssh -y
21+
sudo apt-get install git -y
22+
sudo apt-get install libreadline-dev -y
23+
sudo apt-get install libicu-dev -y
24+
sudo apt-get install openssl -y
25+
sudo apt-get install build-essential -y
26+
sudo apt-get install clang -y
27+
sudo apt-get install libblocksruntime-dev -y
28+
sudo apt-get install libkqueue-dev -y
29+
sudo apt-get install libpthread-workqueue-dev -y
30+
sudo apt-get install gobjc -y
31+
sudo apt-get install libxml2-dev -y
32+
sudo apt-get install libjpeg-dev -y
33+
sudo apt-get install libtiff-dev -y
34+
sudo apt-get install libpng12-dev -y
35+
sudo apt-get install libcups2-dev -y
36+
sudo apt-get install libfreetype6-dev -y
37+
sudo apt-get install libcairo2-dev -y
38+
sudo apt-get install libxt-dev -y
39+
sudo apt-get install libgl1-mesa-dev -y
40+
sudo apt-get remove libdispatch-dev -y
41+
sudo apt-get install gdb -y
42+
43+
mkdir -p /tmp/SETUP
44+
cd /tmp/SETUP
45+
46+
#
47+
# A few modifications were needed to fix problems with
48+
# libobjc2 and gnustep-base. To maintain stability, we
49+
# work with a fork on github.
50+
#
51+
git clone https://github.com/nulang/gnustep-libobjc2.git
52+
git clone https://github.com/nulang/gnustep-make.git
53+
git clone https://github.com/nulang/gnustep-base.git
54+
55+
echo Installing libobjc2
56+
export CC=clang
57+
cd gnustep-libobjc2
58+
make clean
59+
make
60+
sudo make install
61+
cd /tmp/SETUP
62+
63+
echo Installing gnustep-make
64+
cd gnustep-make
65+
./configure
66+
make clean
67+
make
68+
sudo make install
69+
cd /tmp/SETUP
70+
71+
echo Installing gnustep-base
72+
cd gnustep-base
73+
./configure
74+
make clean
75+
make
76+
sudo make install
77+
cd /tmp/SETUP
78+
79+
sudo apt-get install libdispatch-dev -y
80+
81+
echo Pre-install script finished successfully. You may now build Nu.

0 commit comments

Comments
 (0)