Remove xgo builds (#1628)
This commit is contained in:
parent
26880b83d7
commit
94228bce2e
15
Makefile
15
Makefile
|
@ -39,9 +39,6 @@ DOCKER_IMAGE_CUSTOM_TAG ?= $(RELEASE_TAG)
|
||||||
DOCKER_TEST_WORKDIR = /go/src/github.com/status-im/status-go/
|
DOCKER_TEST_WORKDIR = /go/src/github.com/status-im/status-go/
|
||||||
DOCKER_TEST_IMAGE = golang:1.10
|
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.
|
# This is a code for automatic help generator.
|
||||||
# It supports ANSI colors and categories.
|
# It supports ANSI colors and categories.
|
||||||
# To add new item into help output, simply add comments
|
# 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
|
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"
|
@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
|
statusgo-library: ##@cross-compile Build status-go as static library for current platform
|
||||||
@echo "Building static library..."
|
@echo "Building static library..."
|
||||||
go build -buildmode=c-archive -o $(GOBIN)/libstatus.a $(BUILD_FLAGS) ./lib
|
go build -buildmode=c-archive -o $(GOBIN)/libstatus.a $(BUILD_FLAGS) ./lib
|
||||||
|
@ -212,9 +200,6 @@ release: check-existing-release
|
||||||
echo "Aborting." && exit 1; \
|
echo "Aborting." && exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
xgo-install:
|
|
||||||
go get -u github.com/karalabe/xgo
|
|
||||||
|
|
||||||
gomobile-install: xtools-install
|
gomobile-install: xtools-install
|
||||||
go get golang.org/x/mobile/cmd/gomobile
|
go get golang.org/x/mobile/cmd/gomobile
|
||||||
|
|
||||||
|
|
|
@ -64,16 +64,13 @@ pipeline {
|
||||||
stage('Docker') { steps { script {
|
stage('Docker') { steps { script {
|
||||||
dock = lib.buildBranch('status-go/platforms/docker')
|
dock = lib.buildBranch('status-go/platforms/docker')
|
||||||
} } }
|
} } }
|
||||||
stage('XGO') { steps { script {
|
|
||||||
xgo = lib.buildBranch('status-go/platforms/xgo')
|
|
||||||
} } }
|
|
||||||
} // parallel
|
} // parallel
|
||||||
} // stage(Build)
|
} // stage(Build)
|
||||||
|
|
||||||
stage('Archive') {
|
stage('Archive') {
|
||||||
steps { script {
|
steps { script {
|
||||||
sh("rm -fr ${env.RELEASE_DIR}/*")
|
sh("rm -fr ${env.RELEASE_DIR}/*")
|
||||||
[ios, android, linux, xgo].each { platformBuild ->
|
[ios, android, linux].each { platformBuild ->
|
||||||
lib.copyArts(platformBuild)
|
lib.copyArts(platformBuild)
|
||||||
}
|
}
|
||||||
dir(env.RELEASE_DIR) {
|
dir(env.RELEASE_DIR) {
|
||||||
|
|
|
@ -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
|
|
||||||
}
|
|
Loading…
Reference in New Issue