Skip to content

Commit

Permalink
use out for output, use CGO_ENABLED=1 and GO111MODULE=off for Android
Browse files Browse the repository at this point in the history
For details see: #1574

Signed-off-by: Jakub Sokołowski <[email protected]>
  • Loading branch information
jakubgs committed Aug 19, 2019
1 parent 8383fee commit 4fbddc2
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 13 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ release: check-existing-release
xgo-install:
go get -u github.com/karalabe/xgo

gomobile-install:
go get -u golang.org/x/mobile/cmd/gomobile
gomobile-install: xtools-install
go get golang.org/x/mobile/cmd/gomobile

release-install:
go get -u github.com/c4milo/github-release
Expand All @@ -221,6 +221,10 @@ gen-install:
go get -u github.com/kevinburke/go-bindata/[email protected]
go get -u github.com/golang/protobuf/[email protected]

xtools-install:
# special fix for gomobile issues
go get golang.org/x/tools/go/packages

modvendor-install:
# a tool to vendor non-go files
go get -u github.com/goware/modvendor
Expand Down
2 changes: 1 addition & 1 deletion _assets/ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pipeline {
GOPATH = "${env.WORKSPACE}"
PATH = "/usr/local/go/bin:${env.PATH}:${env.GOPATH}/bin"
/* This will override the var in Makefile */
RELEASE_DIR = "${env.WORKSPACE}/pkg"
RELEASE_DIR = "${env.WORKSPACE}/out"
}

stages {
Expand Down
10 changes: 7 additions & 3 deletions _assets/ci/Jenkinsfile.android
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ pipeline {
}

environment {
/* fix for gomobile complaining about missing packages */
CGO_ENABLED = "1"
GO111MODULE = "off"
/* Other stuff */
BUILD_PLATFORM = 'android'
STATUS_PATH = "${env.WORKSPACE}/src/github.com/status-im/status-go"
CI_DIR = "${env.STATUS_PATH}/_assets/ci"
Expand All @@ -47,7 +51,7 @@ pipeline {
println("Git Branch: ${lib.gitBranch()}")
println("Git Commit: ${lib.gitCommit()}")
/* save and create a dir for artifacts */
dest = "${env.WORKSPACE}/pkg"
dest = "${env.WORKSPACE}/out"
sh "mkdir -p ${dest}"
/* for easier reuse */
artifact = "status-go-android-${lib.suffix()}.aar"
Expand All @@ -63,11 +67,11 @@ pipeline {
} } }

stage('Archive') { steps {
archiveArtifacts("pkg/${artifact}")
archiveArtifacts("out/${artifact}")
} }

stage('Upload') { steps { script {
env.PKG_URL = lib.uploadArtifact("pkg/${artifact}")
env.PKG_URL = lib.uploadArtifact("out/${artifact}")
} } }
} // stages
post {
Expand Down
11 changes: 8 additions & 3 deletions _assets/ci/Jenkinsfile.ios
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ pipeline {
}

environment {
/* fix for gomobile complaining about missing packages */
CGO_ENABLED = "1"
GO111MODULE = "off"
/* Other stuff */
BUILD_PLATFORM = 'ios'
STATUS_PATH = "${env.WORKSPACE}/src/github.com/status-im/status-go"
CI_DIR = "${env.STATUS_PATH}/_assets/ci"
Expand All @@ -42,7 +46,7 @@ pipeline {
println("Git Branch: ${lib.gitBranch()}")
println("Git Commit: ${lib.gitCommit()}")
/* save and create a dir for artifacts */
dest = "${env.WORKSPACE}/pkg"
dest = "${env.WORKSPACE}/out"
sh "mkdir -p ${dest}"
/* for easier reuse */
artifact = "status-go-ios-${lib.suffix()}.zip"
Expand All @@ -54,18 +58,19 @@ pipeline {

stage('Compile') { steps { dir(env.STATUS_PATH) {
sh 'make statusgo-ios'
sh 'go get golang.org/x/tools/go/packages'
dir('build/bin') {
sh 'zip -r status-go-ios.zip Statusgo.framework'
sh "cp status-go-ios.zip ${dest}/${artifact}"
}
} } }

stage('Archive') { steps {
archiveArtifacts("pkg/${artifact}")
archiveArtifacts("out/${artifact}")
} }

stage('Upload') { steps { script {
env.PKG_URL = lib.uploadArtifact("pkg/${artifact}")
env.PKG_URL = lib.uploadArtifact("out/${artifact}")
} } }
} // stages
post {
Expand Down
6 changes: 3 additions & 3 deletions _assets/ci/Jenkinsfile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pipeline {
println("Git Branch: ${lib.gitBranch()}")
println("Git Commit: ${lib.gitCommit()}")
/* save and create a dir for artifacts */
dest = "${env.WORKSPACE}/pkg"
dest = "${env.WORKSPACE}/out"
sh "mkdir -p ${dest}"
/* for easier reuse */
artifact = "status-go-desktop-${lib.suffix()}.zip"
Expand All @@ -57,11 +57,11 @@ pipeline {
} } }

stage('Archive') { steps {
archiveArtifacts("pkg/${artifact}")
archiveArtifacts("out/${artifact}")
} }

stage('Upload') { steps { script {
env.PKG_URL = lib.uploadArtifact("pkg/${artifact}")
env.PKG_URL = lib.uploadArtifact("out/${artifact}")
} } }
} // stages
post {
Expand Down
1 change: 0 additions & 1 deletion _assets/ci/Jenkinsfile.xgo
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ pipeline {
failure { script { load("${CI_DIR}/ghcmgr.groovy").postBuild(false) } }
always { dir(env.STATUS_PATH) {
sh 'make clean'
sh "rm -fr ${dest}"
} }
} // post
}

0 comments on commit 4fbddc2

Please sign in to comment.