From 4d5e442c2563de944e6a27fbf3bffe1cadf71b3e Mon Sep 17 00:00:00 2001 From: Ed Robinson Date: Mon, 24 Jul 2017 20:37:58 +0100 Subject: [PATCH 1/2] Adds automated build for OSX re #380 Signed-off-by: Ed Robinson --- .travis.yml | 16 ++++++++++++---- hack/travis_osx.sh | 10 ++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) create mode 100755 hack/travis_osx.sh diff --git a/.travis.yml b/.travis.yml index c5c539f3..090b0c67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,18 @@ -sudo: required -services: - - docker +matrix: + include: + - os: linux + sudo: required + services: + - docker + - os: osx notifications: email: false +install: + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install gpgme ; fi + script: - - make check + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then hack/travis_osx.sh ; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make check ; fi diff --git a/hack/travis_osx.sh b/hack/travis_osx.sh new file mode 100755 index 00000000..7b368b82 --- /dev/null +++ b/hack/travis_osx.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +set -e + +export GOPATH=$(pwd)/_gopath +_projectatomic="${GOPATH}/src/github.com/projectatomic" +mkdir -vp ${_projectatomic} +ln -vsf $(pwd) ${_projectatomic}/skopeo + +cd ${_projectatomic}/skopeo +make validate-local test-unit-local binary-local BUILDTAGS=containers_image_ostree_stub From bb84c696e27b5716bce8fcefb6919ffed0b5d934 Mon Sep 17 00:00:00 2001 From: Ed Robinson Date: Mon, 24 Jul 2017 20:39:13 +0100 Subject: [PATCH 2/2] Stubb out libostree support when building on OSX Signed-off-by: Ed Robinson --- Makefile | 3 ++- hack/darwin_tag.sh | 5 +++++ hack/travis_osx.sh | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100755 hack/darwin_tag.sh diff --git a/Makefile b/Makefile index 0e3f0465..89a106ec 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,8 @@ MANPAGES_MD = $(wildcard docs/*.md) BTRFS_BUILD_TAG = $(shell hack/btrfs_tag.sh) LIBDM_BUILD_TAG = $(shell hack/libdm_tag.sh) -LOCAL_BUILD_TAGS = $(BTRFS_BUILD_TAG) $(LIBDM_BUILD_TAG) +DARWIN_BUILD_TAG = $(shell hack/darwin_tag.sh) +LOCAL_BUILD_TAGS = $(BTRFS_BUILD_TAG) $(LIBDM_BUILD_TAG) $(DARWIN_BUILD_TAG) BUILDTAGS += $(LOCAL_BUILD_TAGS) # make all DEBUG=1 diff --git a/hack/darwin_tag.sh b/hack/darwin_tag.sh new file mode 100755 index 00000000..eaa09184 --- /dev/null +++ b/hack/darwin_tag.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +if [ $(uname) == "Darwin" ]; then + echo "containers_image_ostree_stub" +fi diff --git a/hack/travis_osx.sh b/hack/travis_osx.sh index 7b368b82..e4662f6a 100755 --- a/hack/travis_osx.sh +++ b/hack/travis_osx.sh @@ -7,4 +7,4 @@ mkdir -vp ${_projectatomic} ln -vsf $(pwd) ${_projectatomic}/skopeo cd ${_projectatomic}/skopeo -make validate-local test-unit-local binary-local BUILDTAGS=containers_image_ostree_stub +make validate-local test-unit-local binary-local