From 671cf813885763d21ede29f140d96cbbcf8b622b Mon Sep 17 00:00:00 2001 From: Robin Deits Date: Wed, 13 Dec 2017 15:54:03 -0500 Subject: [PATCH 1/9] switch to libgtk-3-dev from apt --- deps/build.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/build.jl b/deps/build.jl index 5b3351bf..81817c46 100755 --- a/deps/build.jl +++ b/deps/build.jl @@ -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 From ad6bab9d20401d3394c659361d080b039db53bc7 Mon Sep 17 00:00:00 2001 From: Robin Deits Date: Wed, 13 Dec 2017 16:57:42 -0500 Subject: [PATCH 2/9] try adding docker build on travis --- .travis.yml | 36 ++++++++++++++++++++++-------------- travis-script.sh | 20 ++++++++++++++++++++ 2 files changed, 42 insertions(+), 14 deletions(-) create mode 100755 travis-script.sh diff --git a/.travis.yml b/.travis.yml index c8f0f781..cd83425d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: @@ -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"); diff --git a/travis-script.sh b/travis-script.sh new file mode 100755 index 00000000..bc39c1c8 --- /dev/null +++ b/travis-script.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -ex + +if [[ -a .git/shallow ]]; then + git fetch --unshallow +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 \ No newline at end of file From 6753a650a130d29c67b03d04ede6baa5777a26f4 Mon Sep 17 00:00:00 2001 From: Robin Deits Date: Wed, 13 Dec 2017 17:09:53 -0500 Subject: [PATCH 3/9] add missing dockerfile --- Dockerfile | 55 ++++++++++++++++++++++++++++++++++++++++++++++++ travis-script.sh | 2 +- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..68ccd4ab --- /dev/null +++ b/Dockerfile @@ -0,0 +1,55 @@ +# Derived from https://github.com/docker-library/julia which is distributed +# under the terms of the MIT Expat license and is +# Copyright (c) 2014-2015 Docker, Inc. + + +# FROM ubuntu:trusty-20171117 +FROM ubuntu:xenial-20171114 +# FROM ubuntu:zesty-20171114 +# FROM ubuntu:artful-20171116 +# FROM debian:jessie + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + ca-certificates \ + curl + +ENV JULIA_PATH /usr/local/julia + +# https://julialang.org/downloads/ +ENV JULIA_VERSION 0.6.1 + +RUN set -ex; \ + \ +# https://julialang.org/downloads/#julia-command-line-version +# https://julialang-s3.julialang.org/bin/checksums/julia-0.6.1.sha256 +# this "case" statement is generated via "update.sh" + dpkgArch="$(dpkg --print-architecture)"; \ + case "${dpkgArch##*-}" in \ + amd64) tarArch='x86_64'; dirArch='x64'; sha256='d73f988b4d5889b30063f40c2f9ad4a2487f0ea87d6aa0b8ed53e789782bb323' ;; \ + armhf) tarArch='armv7l'; dirArch='armv7l'; sha256='ee2cea5a6e5763fb2ef38b585560000c7fb2cee9a7e2330d4eae278beed4d7e6' ;; \ + arm64) tarArch='aarch64'; dirArch='aarch64'; sha256='945c1657ca4a8d76b7136829cf06dddbd5343dfdfa6b20d2308ae0dc08c5ca79' ;; \ + i386) tarArch='i686'; dirArch='x86'; sha256='88cf40e45558958f9a23540d52209fd050d82512bbbe8dec03db7d0976cc645a' ;; \ + *) echo >&2 "error: current architecture ($dpkgArch) does not have a corresponding Julia binary release"; exit 1 ;; \ + esac; \ + \ + curl -fL -o julia.tar.gz "https://julialang-s3.julialang.org/bin/linux/${dirArch}/${JULIA_VERSION%[.-]*}/julia-${JULIA_VERSION}-linux-${tarArch}.tar.gz"; \ + curl -fL -o julia.tar.gz.asc "https://julialang-s3.julialang.org/bin/linux/${dirArch}/${JULIA_VERSION%[.-]*}/julia-${JULIA_VERSION}-linux-${tarArch}.tar.gz.asc"; \ + \ + mkdir "$JULIA_PATH"; \ + tar -xzf julia.tar.gz -C "$JULIA_PATH" --strip-components 1; \ + rm julia.tar.gz + + +ENV PATH $JULIA_PATH/bin:$PATH + +# Copy the current directory contents into the container at /app +ADD . /app + +# Set the working directory to /app +WORKDIR /app/Gtk + +RUN echo 'APT::Get::Assume-Yes "true";' | tee -a /etc/apt/apt.conf.d/00Do-not-ask + +RUN julia -e "Pkg.init()" +RUN DEBIAN_FRONTEND=noninteractive julia -e "Pkg.clone(pwd()); Pkg.build(\"Gtk\")" diff --git a/travis-script.sh b/travis-script.sh index bc39c1c8..8c8ee110 100755 --- a/travis-script.sh +++ b/travis-script.sh @@ -6,7 +6,7 @@ if [[ -a .git/shallow ]]; then git fetch --unshallow fi if [[ "$DOCKER_BUILD" = true ]]; then - docker build -t gtkjl . && sudo docker run gtkjl + docker build -t gtkjl . && docker run gtkjl else if [[ `uname` = "Linux" ]]; then TESTCMD="xvfb-run julia" From 2a68933c6ef1b0e3bf7304efd50762ae587676fb Mon Sep 17 00:00:00 2001 From: Robin Deits Date: Wed, 13 Dec 2017 17:11:04 -0500 Subject: [PATCH 4/9] git depth --- .travis.yml | 2 ++ travis-script.sh | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index cd83425d..c155e136 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,8 @@ language: julia sudo: required services: - docker +git: + depth: 99999999 matrix: include: diff --git a/travis-script.sh b/travis-script.sh index 8c8ee110..0bab9b71 100755 --- a/travis-script.sh +++ b/travis-script.sh @@ -2,9 +2,6 @@ set -ex -if [[ -a .git/shallow ]]; then - git fetch --unshallow -fi if [[ "$DOCKER_BUILD" = true ]]; then docker build -t gtkjl . && docker run gtkjl else From df50e424a67245fd9d99dffebb2eeaf230176368 Mon Sep 17 00:00:00 2001 From: Robin Deits Date: Wed, 13 Dec 2017 17:11:40 -0500 Subject: [PATCH 5/9] temporarily disable all other builds while I debug docker --- .travis.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index c155e136..6154c4f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,18 +7,18 @@ git: 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.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 From e608a17627fb531c04b0be9e98baf1fd461fd07a Mon Sep 17 00:00:00 2001 From: Robin Deits Date: Wed, 13 Dec 2017 17:17:28 -0500 Subject: [PATCH 6/9] fix paths --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 68ccd4ab..88f1d6d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,10 +44,10 @@ RUN set -ex; \ ENV PATH $JULIA_PATH/bin:$PATH # Copy the current directory contents into the container at /app -ADD . /app +ADD . /Gtk # Set the working directory to /app -WORKDIR /app/Gtk +WORKDIR /Gtk RUN echo 'APT::Get::Assume-Yes "true";' | tee -a /etc/apt/apt.conf.d/00Do-not-ask From 8bfea6a8988f7ee2bcff5327c0ba0d5a9b96fdca Mon Sep 17 00:00:00 2001 From: Robin Deits Date: Wed, 13 Dec 2017 17:26:35 -0500 Subject: [PATCH 7/9] run tests in docker --- Dockerfile | 7 +++++++ travis-script.sh | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 88f1d6d9..a545a186 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,3 +53,10 @@ RUN echo 'APT::Get::Assume-Yes "true";' | tee -a /etc/apt/apt.conf.d/00Do-not-as RUN julia -e "Pkg.init()" RUN DEBIAN_FRONTEND=noninteractive julia -e "Pkg.clone(pwd()); Pkg.build(\"Gtk\")" + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + xvfb \ + xauth + +RUN xvfb-run julia -e "Pkg.test(\"Gtk\")" diff --git a/travis-script.sh b/travis-script.sh index 0bab9b71..30afe788 100755 --- a/travis-script.sh +++ b/travis-script.sh @@ -3,7 +3,7 @@ set -ex if [[ "$DOCKER_BUILD" = true ]]; then - docker build -t gtkjl . && docker run gtkjl + docker build -t gtkjl . else if [[ `uname` = "Linux" ]]; then TESTCMD="xvfb-run julia" From eb5a97426a36f339f48509f0729d7da6d4e63a6a Mon Sep 17 00:00:00 2001 From: Robin Deits Date: Wed, 13 Dec 2017 17:32:06 -0500 Subject: [PATCH 8/9] restore builds --- .travis.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6154c4f4..c155e136 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,18 +7,18 @@ git: 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.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 From 8002f927733be12fda917c3ed7c8e952f6fc08d0 Mon Sep 17 00:00:00 2001 From: Robin Deits Date: Wed, 13 Dec 2017 17:44:28 -0500 Subject: [PATCH 9/9] remove empty continuation lines --- Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index a545a186..3c93d26a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,6 @@ ENV JULIA_PATH /usr/local/julia ENV JULIA_VERSION 0.6.1 RUN set -ex; \ - \ # https://julialang.org/downloads/#julia-command-line-version # https://julialang-s3.julialang.org/bin/checksums/julia-0.6.1.sha256 # this "case" statement is generated via "update.sh" @@ -32,10 +31,8 @@ RUN set -ex; \ i386) tarArch='i686'; dirArch='x86'; sha256='88cf40e45558958f9a23540d52209fd050d82512bbbe8dec03db7d0976cc645a' ;; \ *) echo >&2 "error: current architecture ($dpkgArch) does not have a corresponding Julia binary release"; exit 1 ;; \ esac; \ - \ curl -fL -o julia.tar.gz "https://julialang-s3.julialang.org/bin/linux/${dirArch}/${JULIA_VERSION%[.-]*}/julia-${JULIA_VERSION}-linux-${tarArch}.tar.gz"; \ curl -fL -o julia.tar.gz.asc "https://julialang-s3.julialang.org/bin/linux/${dirArch}/${JULIA_VERSION%[.-]*}/julia-${JULIA_VERSION}-linux-${tarArch}.tar.gz.asc"; \ - \ mkdir "$JULIA_PATH"; \ tar -xzf julia.tar.gz -C "$JULIA_PATH" --strip-components 1; \ rm julia.tar.gz