From 4c16c82500645de83907743555e7256af86a9423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Fri, 11 Nov 2016 12:06:24 +0200 Subject: travis, build: cocoapods build fixes and travis caches --- .travis.yml | 9 +++++++++ build/ci.go | 2 +- build/pod.podspec | 2 +- mobile/glog.go | 29 ----------------------------- mobile/init.go | 35 +++++++++++++++++++++++++++++++++++ 5 files changed, 46 insertions(+), 31 deletions(-) delete mode 100644 mobile/glog.go create mode 100644 mobile/init.go diff --git a/.travis.yml b/.travis.yml index c9b8b5025..c93b57907 100644 --- a/.travis.yml +++ b/.travis.yml @@ -59,6 +59,10 @@ matrix: env: - azure-osx - mobile + cache: + directories: + - $HOME/.android.platforms + - $HOME/.cocoapods script: - go run build/ci.go install - go run build/ci.go archive -type tar -signer OSX_SIGNING_KEY -upload gethstore/builds @@ -71,8 +75,13 @@ matrix: - brew update - brew install android-sdk maven - export ANDROID_HOME=/usr/local/opt/android-sdk + + - mkdir -p $ANDROID_HOME/platforms + - mv -f $HOME/.android.platforms $ANDROID_HOME/platforms - echo "y" | android update sdk --no-ui --filter platform + - go run build/ci.go aar -signer ANDROID_SIGNING_KEY -deploy https://oss.sonatype.org -upload gethstore/builds + - mv -f $ANDROID_HOME/platforms $HOME/.android.platforms install: - go get golang.org/x/tools/cmd/cover diff --git a/build/ci.go b/build/ci.go index b4dbd7dbd..e8e08268b 100644 --- a/build/ci.go +++ b/build/ci.go @@ -799,7 +799,7 @@ func doXCodeFramework(cmdline []string) { if *deploy != "" { meta := newPodMetadata(env) build.Render("build/pod.podspec", meta.Name+".podspec", 0755, meta) - build.MustRunCommand("pod", *deploy, "push", meta.Name+".podspec") + build.MustRunCommand("pod", *deploy, "push", meta.Name+".podspec", "--allow-warnings") } } diff --git a/build/pod.podspec b/build/pod.podspec index 2718522db..c43af3e82 100644 --- a/build/pod.podspec +++ b/build/pod.podspec @@ -17,6 +17,6 @@ Pod::Spec.new do |spec| curl https://gethstore.blob.core.windows.net/builds/geth-ios-all-{{.Version}}.tar.gz | tar -xvz mkdir Frameworks mv geth-ios-all-{{.Version}}/Geth.framework Frameworks - rm geth-ios-all-{{.Version}} + rm -rf geth-ios-all-{{.Version}} CMD end diff --git a/mobile/glog.go b/mobile/glog.go deleted file mode 100644 index ce7c2ec2b..000000000 --- a/mobile/glog.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2016 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -// Contains wrappers and init code for the logger. - -package geth - -import ( - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" -) - -func init() { - glog.SetV(logger.Info) - glog.SetToStderr(true) -} diff --git a/mobile/init.go b/mobile/init.go new file mode 100644 index 000000000..0fbc6bd3e --- /dev/null +++ b/mobile/init.go @@ -0,0 +1,35 @@ +// Copyright 2016 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +// Contains initialization code for the mbile library. + +package geth + +import ( + "runtime" + + "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/logger/glog" +) + +func init() { + // Initialize the logger + glog.SetV(logger.Info) + glog.SetToStderr(true) + + // Initialize the goroutine count + runtime.GOMAXPROCS(runtime.NumCPU()) +} -- cgit v1.2.3