Merge pull request #382 from errm/errm/automate-osx-build

Adds automated build for OSX
This commit is contained in:
Miloslav Trmač 2017-07-26 17:08:02 +02:00 committed by GitHub
commit 75811bd4b1
4 changed files with 29 additions and 5 deletions

View File

@ -1,10 +1,18 @@
sudo: required
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

View File

@ -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

5
hack/darwin_tag.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
if [ $(uname) == "Darwin" ]; then
echo "containers_image_ostree_stub"
fi

10
hack/travis_osx.sh Executable file
View File

@ -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