mirror of
https://github.com/corda/corda.git
synced 2025-01-01 02:36:44 +00:00
Merge pull request #386 from ReadyTalk/travis-publishing
Add artifact publishing to oss.jfrog.org with TravisCI
This commit is contained in:
commit
83f40a832a
23
.travis.yml
23
.travis.yml
@ -1,12 +1,19 @@
|
|||||||
language: cpp
|
language: cpp
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- sudo apt-get update -qq
|
||||||
|
- sudo apt-get install -y libc6-dev-i386 mingw-w64 gcc-mingw-w64-x86-64 g++-mingw-w64-i686 binutils-mingw-w64-x86-64 lib32z1-dev zlib1g-dev g++-mingw-w64-x86-64
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
matrix:
|
||||||
|
- BUILD_STEP=""
|
||||||
|
- BUILD_STEP="PUBLISH"
|
||||||
global:
|
global:
|
||||||
- TERM=dumb
|
- TERM=dumb
|
||||||
- secure: Pe7OLUvdk3DeTAShyaYsdAXBcnjdNOrtfTPt1mCP5+JKBUw3z0n7BpTgATVRBmkn866pDqxL0N3+jBgjKUpEpqOj23bTB2AeDdIzlYkFGvTd3GQQV1lMFn16I9LOgWJhkfICTJ1rIYiNf8xSkJoeKGB7eGUM0KGsTvelFfsaGVc=
|
- secure: rh1utD4shKmYtokItuRYEF9WsfTnvZO5XqnTU4DHTS7quHHgLihtOO2/3+B+2W2hEd5Obr2or8zx+zmzWcNUyLokZ0j/FRLWSScNkLzTtm12pupLrncY+/g1NIdfbhn+OLRIzBz6zB6m6a2qWFEJ+bScUNGD/7wZVtzkujqlDEE=
|
||||||
# BINTRAY_USER
|
- secure: j9DOzZMCYk/BzhKK9u4XMKpCzyGOsvP2cLTp6cXE7/tkWDAPVv6BFmeqNbiLTEqk0aGX+HYbY/2YVtpRZmDzfeWtnBFF5mL1Y1tgzx1Kf155C+P6rZgt5PiQTUdXlp2umuRifY1BbXAPc3DZ2UOPUjWKnLHVbZLQRgO1zimmMx8=
|
||||||
- secure: CauPpj2QrbgEaePEPQx+FDeZqc46HmWXHfdAyn+DA9g6np3RMyc+N/ESrJ9efc4E772rnxory2QRyyNffzi29ceNTpIzsIRDuk5WvvC+zePEsQm8kX1afsDK5g16QEvJN24jGSW9ci9uxuknqjeKVOukcFQdxssIyDe11tYWJeI=
|
|
||||||
# BINTRAY_API_KEY
|
matrix:
|
||||||
- secure: Gao6KTkCbqrdCDI2hQswh1v+SpHBeF4hR1WXmCe9gjmPyJb731K2eWigQOrhPOw7Ns3nubo1FwCb5YevYmwPMLryh0f4sKJyqLL1MLbffNl5GttNF2oO3p73cJpgBfHdzabAMwAYGYbneqUZ0Qn4K8RkzXUaoBDv465KmZhqbA0=
|
fast_finish: true
|
||||||
script: "./test/ci.sh"
|
|
||||||
after_success:
|
script: ./test/ci.sh ${BUILD_STEP}
|
||||||
- "./gradlew artifactoryPublish"
|
|
||||||
|
11
build.gradle
11
build.gradle
@ -107,12 +107,6 @@ model {
|
|||||||
operatingSystem SupportedOS.valueOf(platform.toUpperCase())
|
operatingSystem SupportedOS.valueOf(platform.toUpperCase())
|
||||||
architecture "${arch}"
|
architecture "${arch}"
|
||||||
}
|
}
|
||||||
if(platformArch != currentPlatformArch) {
|
|
||||||
create(currentPlatformArch) {
|
|
||||||
operatingSystem SupportedOS.CURRENT
|
|
||||||
architecture "${currentArch}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
@ -235,7 +229,7 @@ publishing {
|
|||||||
artifact("${nativeBuildDir}/avian${binSuffix}") {
|
artifact("${nativeBuildDir}/avian${binSuffix}") {
|
||||||
name "avian"
|
name "avian"
|
||||||
type publishBinSuffix
|
type publishBinSuffix
|
||||||
extension binSuffix
|
extension publishBinSuffix
|
||||||
}
|
}
|
||||||
|
|
||||||
artifact("${nativeBuildDir}/libavian.a") {
|
artifact("${nativeBuildDir}/libavian.a") {
|
||||||
@ -249,6 +243,9 @@ publishing {
|
|||||||
}
|
}
|
||||||
|
|
||||||
artifactoryPublish {
|
artifactoryPublish {
|
||||||
|
onlyIf {
|
||||||
|
System.env.'TRAVIS_BRANCH' == "master" && !System.env.'TRAVIS_PULL_REQUEST'.toBoolean()
|
||||||
|
}
|
||||||
dependsOn assemble
|
dependsOn assemble
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,4 +1,4 @@
|
|||||||
#Thu Aug 28 14:47:06 MDT 2014
|
#Fri Jan 02 11:31:32 MST 2015
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
58
test/ci.sh
58
test/ci.sh
@ -1,9 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -eo pipefail
|
||||||
|
|
||||||
root_dir=$(pwd)
|
root_dir=$(pwd)
|
||||||
|
|
||||||
|
flags="${@}"
|
||||||
|
|
||||||
run() {
|
run() {
|
||||||
echo '==============================================='
|
echo '==============================================='
|
||||||
if [ ! $(pwd) = ${root_dir} ]; then
|
if [ ! $(pwd) = ${root_dir} ]; then
|
||||||
@ -23,10 +25,24 @@ run_cmake() {
|
|||||||
cd ..
|
cd ..
|
||||||
}
|
}
|
||||||
|
|
||||||
flags="${@}"
|
publish() {
|
||||||
|
local platforms="${1}"
|
||||||
|
local arches="${2}"
|
||||||
|
|
||||||
|
local platform
|
||||||
|
for platform in ${platforms}; do
|
||||||
|
local arch
|
||||||
|
for arch in ${arches}; do
|
||||||
|
echo "------ Publishing ${platform}-${arch} ------"
|
||||||
|
./gradlew artifactoryPublish -Pplatform=${platform} -Parch=${arch}
|
||||||
|
done
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
has_flag() {
|
has_flag() {
|
||||||
local arg=$1
|
local arg=${1}
|
||||||
|
|
||||||
|
local f
|
||||||
for f in ${flags}; do
|
for f in ${flags}; do
|
||||||
local key=$(echo $f | awk -F '=' '{print $1}')
|
local key=$(echo $f | awk -F '=' '{print $1}')
|
||||||
if [ ${key} = ${arg} ]; then
|
if [ ${key} = ${arg} ]; then
|
||||||
@ -38,19 +54,29 @@ has_flag() {
|
|||||||
|
|
||||||
make_target=test
|
make_target=test
|
||||||
|
|
||||||
test `uname -o` = "Cygwin" || run_cmake -DCMAKE_BUILD_TYPE=Debug
|
if [[ "${1}" == "PUBLISH" ]]; then
|
||||||
|
if [[ $(uname -s) == "Darwin" || ${TRAVIS_OS_NAME} == "osx" ]]; then
|
||||||
|
publish "macosx" "i386 x86_64"
|
||||||
|
elif [[ $(uname -s) == "Linux" ]]; then
|
||||||
|
publish "linux windows" "i386 x86_64"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [[ $(uname -o) != "Cygwin" ]]; then
|
||||||
|
run_cmake -DCMAKE_BUILD_TYPE=Debug
|
||||||
|
fi
|
||||||
|
|
||||||
run make jdk-test
|
run make jdk-test
|
||||||
run make ${flags} ${make_target}
|
run make ${flags} ${make_target}
|
||||||
run make ${flags} mode=debug ${make_target}
|
run make ${flags} mode=debug ${make_target}
|
||||||
run make ${flags} process=interpret ${make_target}
|
run make ${flags} process=interpret ${make_target}
|
||||||
|
|
||||||
(has_flag openjdk-src || ! has_flag openjdk) && \
|
(has_flag openjdk-src || ! has_flag openjdk) && \
|
||||||
run make ${flags} mode=debug bootimage=true ${make_target} && \
|
run make ${flags} mode=debug bootimage=true ${make_target} && \
|
||||||
run make ${flags} bootimage=true ${make_target}
|
run make ${flags} bootimage=true ${make_target}
|
||||||
|
|
||||||
(! has_flag openjdk && ! has_flag android) && \
|
(! has_flag openjdk && ! has_flag android) && \
|
||||||
run make ${flags} openjdk=$JAVA_HOME ${make_target}
|
run make ${flags} openjdk=$JAVA_HOME ${make_target}
|
||||||
|
|
||||||
run make ${flags} tails=true continuations=true heapdump=true ${make_target}
|
run make ${flags} tails=true continuations=true heapdump=true ${make_target}
|
||||||
run make ${flags} codegen-targets=all
|
run make ${flags} codegen-targets=all
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user