diff --git a/Makefile b/Makefile index 47d2bc0b1b2..967a3bf6467 100644 --- a/Makefile +++ b/Makefile @@ -39,9 +39,6 @@ DOCKER_IMAGE_CUSTOM_TAG ?= $(RELEASE_TAG) DOCKER_TEST_WORKDIR = /go/src/github.com/status-im/status-go/ DOCKER_TEST_IMAGE = golang:1.10 -XGO_NAME ?= status-go -XGO_TARGETS ?= linux/amd64,windows/amd64,darwin/amd64 - # This is a code for automatic help generator. # It supports ANSI colors and categories. # To add new item into help output, simply add comments @@ -105,15 +102,6 @@ statusgo-ios: ##@cross-compile Build status-go for iOS gomobile bind -v -target=ios -ldflags="-s -w" $(BUILD_FLAGS_MOBILE) -o build/bin/Statusgo.framework github.com/status-im/status-go/mobile @echo "iOS framework cross compilation done in build/bin/Statusgo.framework" -statusgo-xgo: xgo-install ##@cross-compile Build status-go for xgo targets - $(GOPATH)/bin/xgo -v \ - -out=$(XGO_NAME) \ - -dest=$(GOBIN) \ - -targets=$(XGO_TARGETS) \ - -tags '$(BUILD_TAGS)' \ - $(BUILD_FLAGS) ./cmd/statusd - @echo "Linux cross compilation done." - statusgo-library: ##@cross-compile Build status-go as static library for current platform @echo "Building static library..." go build -buildmode=c-archive -o $(GOBIN)/libstatus.a $(BUILD_FLAGS) ./lib @@ -212,9 +200,6 @@ release: check-existing-release echo "Aborting." && exit 1; \ fi -xgo-install: - go get -u github.com/karalabe/xgo - gomobile-install: xtools-install go get golang.org/x/mobile/cmd/gomobile diff --git a/_assets/ci/Jenkinsfile b/_assets/ci/Jenkinsfile index ad35a9b62ca..c2c095f0890 100644 --- a/_assets/ci/Jenkinsfile +++ b/_assets/ci/Jenkinsfile @@ -64,16 +64,13 @@ pipeline { stage('Docker') { steps { script { dock = lib.buildBranch('status-go/platforms/docker') } } } - stage('XGO') { steps { script { - xgo = lib.buildBranch('status-go/platforms/xgo') - } } } } // parallel } // stage(Build) stage('Archive') { steps { script { sh("rm -fr ${env.RELEASE_DIR}/*") - [ios, android, linux, xgo].each { platformBuild -> + [ios, android, linux].each { platformBuild -> lib.copyArts(platformBuild) } dir(env.RELEASE_DIR) { diff --git a/_assets/ci/Jenkinsfile.xgo b/_assets/ci/Jenkinsfile.xgo deleted file mode 100644 index b40da4c8ccf..00000000000 --- a/_assets/ci/Jenkinsfile.xgo +++ /dev/null @@ -1,81 +0,0 @@ -pipeline { - agent { label 'linux' } - - parameters { - string( - name: 'BRANCH', - defaultValue: 'publis-status-go-bin', - description: 'Name of branch to build.' - ) - booleanParam( - name: 'RELEASE', - defaultValue: false, - description: 'Enable to create build for release.', - ) - } - - options { - timestamps() - disableConcurrentBuilds() - /* Go requires a certain directory structure */ - checkoutToSubdirectory('src/github.com/status-im/status-go') - /* manage how many builds we keep */ - buildDiscarder(logRotator( - numToKeepStr: '30', - daysToKeepStr: '30', - )) - } - - - environment { - BUILD_PLATFORM = 'xgo' - STATUS_PATH = "${env.WORKSPACE}/src/github.com/status-im/status-go" - CI_DIR = "${env.STATUS_PATH}/_assets/ci" - GOPATH = "${env.WORKSPACE}" - PATH = "/usr/local/go/bin:${env.PATH}:${env.GOPATH}/bin" - } - - stages { - stage('Prep') { - steps { script { dir(env.STATUS_PATH) { - lib = load("${env.STATUS_PATH}/_assets/ci/lib.groovy") - /* clarify what we're building */ - println("Version: ${lib.getVersion()}") - println("Git Branch: ${lib.gitBranch()}") - println("Git Commit: ${lib.gitCommit()}") - /* prepare dependencies */ - sh 'make xgo-install' - } } } - } - - stage('Build') { - steps { script { dir(env.STATUS_PATH) { - sh 'make statusgo-xgo' - /* append timestamp and commit to names */ - def results = findFiles(glob: 'build/bin/status-go-*') - results.each { file -> - def newName = file.path.replace("amd64", "amd64-${lib.suffix()}") - sh "mv ${file.path} ${newName}" - } - } } } - } - - stage('Archive') { - steps { dir(env.STATUS_PATH) { - archiveArtifacts('build/bin/status-go-*') - } } - } - - stage('Upload') { steps { dir(env.STATUS_PATH) { script { - def binaries = findFiles(glob: 'build/bin/status-go-*') - binaries.each { binary -> lib.uploadArtifact(binary.path) } - } } } } - } - post { - success { script { load("${CI_DIR}/ghcmgr.groovy").postBuild(true) } } - failure { script { load("${CI_DIR}/ghcmgr.groovy").postBuild(false) } } - always { dir(env.STATUS_PATH) { - sh 'make clean' - } } - } // post -}