Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Add docker build #342

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
36 changes: 22 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
language: julia
sudo: false
os:
- linux
- osx
julia:
- 0.5
- 0.6
- nightly
sudo: required
services:
- docker

matrix:
include:
- os: linux
julia: 0.5
- os: linux
julia: 0.6
- os: linux
julia: nightly
- os: osx
julia: 0.5
- os: osx
julia: 0.6
- os: osx
julia: nightly
- os: linux
julia: 0.6
env: DOCKER_BUILD=true
notifications:
email: false
addons:
Expand All @@ -16,12 +29,7 @@ addons:
- xauth
- libgtk-3-0
script:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- if [[ `uname` = "Linux" ]]; then TESTCMD="xvfb-run julia"; else TESTCMD="julia"; fi
- $TESTCMD -e 'Pkg.clone(pwd()); using BinDeps;
println(BinDeps.debug("Gtk"));
Pkg.build("Gtk");
Pkg.test("Gtk"; coverage=true)'
- ./travis-script.sh
after_success:
- julia -e 'cd(Pkg.dir("Gtk"));
Pkg.add("Coverage");
Expand Down
2 changes: 1 addition & 1 deletion deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ deps = [
]

if @compat is_linux()
provides(AptGet, "libgtk-3-0", deps)
provides(AptGet, "libgtk-3-dev", deps)
provides(Yum, "gtk3", deps)
end

Expand Down
20 changes: 20 additions & 0 deletions travis-script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

set -ex

if [[ -a .git/shallow ]]; then
git fetch --unshallow
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why we need git history, but perhaps it would be faster to set this from the travis file:

git:
  depth: 2147483647

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's probably left over from the old PkgDev templates which did this. Your way is nicer.

fi
if [[ "$DOCKER_BUILD" = true ]]; then
docker build -t gtkjl . && sudo docker run gtkjl
else
if [[ `uname` = "Linux" ]]; then
TESTCMD="xvfb-run julia"
else
TESTCMD="julia"
fi
$TESTCMD -e 'Pkg.clone(pwd()); using BinDeps;
println(BinDeps.debug("Gtk"));
Pkg.build("Gtk");
Pkg.test("Gtk"; coverage=true)'
fi