Skip to content

Commit

Permalink
Build only without sync for this release
Browse files Browse the repository at this point in the history
  • Loading branch information
fealebenpae authored and nirinchev committed Dec 14, 2016
1 parent aebf752 commit 33bdfa4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 95 deletions.
94 changes: 1 addition & 93 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ def wrapperConfigurations = [
Debug: 'dbg',
Release: ''
]
def configuration = 'Debug'
def configuration = 'Release'

def nuget = '/usr/local/bin/nuget'
def xbuild = '/usr/local/bin/xbuild'
Expand Down Expand Up @@ -119,89 +119,13 @@ stage('Build without sync') {
)
}

stage('Build with sync') {
parallel(
'iOS': {
node('osx') {
getArchive()

dir('wrappers') {
sh "make ios${wrapperConfigurations[configuration]}"
}

stash includes: "wrappers/build/${configuration}-ios-universal/*", name: 'ios-wrappers-sync'
}
node('xamarin-mac') {
getArchive()

unstash 'ios-wrappers-sync'

sh "${nuget} restore Realm.sln"

sh "${xbuild} Platform.XamarinIOS/Tests.XamarinIOS/Tests.XamarinIOS.csproj /p:Configuration=${configuration} /p:Platform=iPhoneSimulator /p:SolutionDir=\"${workspace}/\""

stash includes: "Platform.XamarinIOS/Realm.Sync.XamarinIOS/bin/iPhoneSimulator/${configuration}/Realm.Sync.*", name: 'nuget-ios-sync'

dir("Platform.XamarinIOS/Tests.XamarinIOS/bin/iPhoneSimulator/${configuration}") {
stash includes: 'Tests.XamarinIOS.app/**/*', name: 'ios-tests-sync'
}
}
},
'Android': {
node('xamarin-mac') {
getArchive()

dir('wrappers') {
withEnv(["NDK_ROOT=${env.HOME}/Library/Developer/Xamarin/android-ndk/android-ndk-r10e"]) {
sh "make android${wrapperConfigurations[configuration]}"
}
}

stash includes: "wrappers/build/${configuration}-android/**/*", name: 'android-wrappers-sync'
}
node('xamarin-mac') {
getArchive()
def workspace = pwd()

unstash 'android-wrappers-sync'

sh "${nuget} restore Realm.sln"

dir('Platform.XamarinAndroid/Tests.XamarinAndroid') {
sh "${xbuild} Tests.XamarinAndroid.csproj /p:Configuration=${configuration} /t:SignAndroidPackage /p:AndroidUseSharedRuntime=false /p:EmbedAssembliesIntoApk=True /p:SolutionDir=\"${workspace}/\""
dir("bin/${configuration}") {
stash includes: 'io.realm.xamarintests-Signed.apk', name: 'android-tests-sync'
}
}

stash includes: "Platform.XamarinAndroid/Realm.Sync.XamarinAndroid/bin/${configuration}/Realm.Sync.*", name: 'nuget-android-sync'
}
},
'PCL': {
node('xamarin-mac') {
getArchive()
sh "${nuget} restore Realm.sln"
sh "${xbuild} Platform.PCL/Realm.Sync.PCL/Realm.Sync.PCL.csproj /p:Configuration=${configuration}"
stash includes: "Platform.PCL/Realm.Sync.PCL/bin/${configuration}/Realm.Sync.*", name: 'nuget-pcl-sync'
}
}
)
}

stage('Test without sync') {
parallel(
'iOS': iOSTest('ios-tests-nosync'),
'Android': AndroidTest('android-tests-nosync')
)
}

stage('Test with sync') {
parallel(
'iOS': iOSTest('ios-tests-sync'),
'Android': AndroidTest('android-tests-sync')
)
}

def iOSTest(stashName) {
return {
node('osx') {
Expand Down Expand Up @@ -295,22 +219,6 @@ stage('NuGet') {
unstash 'nuget-android-database'

dir('NuGet/Realm.Database') {
sh "${nuget} pack Realm.Database.nuspec -version ${versionString} -NoDefaultExcludes -Properties Configuration=${configuration}"
archive "Realm.Database.${versionString}.nupkg"
}
}
},
'Realm': {
node('xamarin-mac') {
getArchive()

unstash 'nuget-pcl-sync'
unstash 'ios-wrappers-sync'
unstash 'nuget-ios-sync'
unstash 'android-wrappers-sync'
unstash 'nuget-android-sync'

dir('NuGet/Realm') {
sh "${nuget} pack Realm.nuspec -version ${versionString} -NoDefaultExcludes -Properties Configuration=${configuration}"
archive "Realm.${versionString}.nupkg"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata minClientVersion="2.8">
<id>Realm.Database</id>
<id>Realm</id>
<version>$version$</version>
<title>Realm.Database</title>
<title>Realm</title>
<authors>Realm</authors>
<owners>Realm</owners>
<developmentDependency>true</developmentDependency>
Expand Down

0 comments on commit 33bdfa4

Please sign in to comment.