ci: test on 32bit os

License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
This commit is contained in:
Łukasz Magiera 2018-09-06 15:36:36 +02:00 committed by Steven Allen
parent 5f11ed79be
commit d8a92224a7
3 changed files with 36 additions and 17 deletions

45
ci/Jenkinsfile vendored
View File

@ -98,6 +98,21 @@ def sharness_step = { run, osname, makeargs, ignore ->
}
}
def gotest_step = { run ->
timeout(time: gotest_timeout, unit: 'MINUTES') {
run "make gx-deps"
try {
run test + ' -tags="nofuse" 2>&1 | tee output'
run 'cat output | go-junit-report > junit-report-linux.xml'
} catch (err) {
throw err
} finally {
junit allowEmptyResults: true, testResults: 'junit-report-*.xml'
}
}
}
/* PIPELINE */
ansiColor('xterm') { withEnv(['TERM=xterm-color']) {
@ -157,19 +172,8 @@ ansiColor('xterm') { withEnv(['TERM=xterm-color']) {
},
linux: {
setupStep('linux') { run ->
timeout(time: gotest_timeout, unit: 'MINUTES') {
run 'go get -v github.com/jstemmer/go-junit-report'
run "make gx-deps"
try {
run test + ' -tags="nofuse" 2>&1 | tee output'
run 'cat output | go-junit-report > junit-report-linux.xml'
} catch (err) {
throw err
} finally {
junit allowEmptyResults: true, testResults: 'junit-report-*.xml'
}
}
run 'go get -v github.com/jstemmer/go-junit-report'
gotest_step(run)
}
},
linuxSharness: {
@ -177,6 +181,21 @@ ansiColor('xterm') { withEnv(['TERM=xterm-color']) {
sharness_step(run, 'linux', '-Otarget', false)
}
},
linux32: {
setupStep('linux') { run ->
run 'go get -v github.com/jstemmer/go-junit-report'
withEnv(["GOARCH=386"]) {
gotest_step(run)
}
}
},
linux32Sharness: {
setupStep('linux') { run ->
withEnv(["GOARCH=386", "TEST_NO_PLUGIN=1"]) {
sharness_step(run, 'linux', '-Otarget', false)
}
}
},
//macOS: {
// setupStep('macos') { run ->
// sharness_step(run, 'macos', '', true)

View File

@ -26,7 +26,7 @@ go-tags=$(if $(GOTAGS), -tags="$(call join-with,$(space),$(GOTAGS))")
go-flags-with-tags=$(GOFLAGS)$(go-tags)
define go-build
$(GOCC) build -i $(go-flags-with-tags) -o "$@" "$(call go-pkg-name,$<)"
$(GOCC) build $(go-flags-with-tags) -o "$@" "$(call go-pkg-name,$<)"
endef
define go-try-build

View File

@ -30,18 +30,18 @@ TGTS_GX_$(d) := hang-fds
TGTS_GX_$(d) := $(addprefix $(d)/,$(TGTS_GX_$(d)))
$(TGTS_GX_$(d)):
go build -i $(go-flags-with-tags) -o "$@" "$(call gx-path,$(notdir $@))"
go build $(go-flags-with-tags) -o "$@" "$(call gx-path,$(notdir $@))"
TGTS_$(d) += $(TGTS_GX_$(d))
# multihash is special
$(d)/multihash:
go build -i $(go-flags-with-tags) -o "$@" "gx/ipfs/$(shell gx deps find go-multihash)/go-multihash/multihash"
go build $(go-flags-with-tags) -o "$@" "gx/ipfs/$(shell gx deps find go-multihash)/go-multihash/multihash"
TGTS_$(d) += $(d)/multihash
# cid-fmt is also special
$(d)/cid-fmt:
go build -i $(go-flags-with-tags) -o "$@" "gx/ipfs/$(shell gx deps find go-cidutil)/go-cidutil/cid-fmt"
go build $(go-flags-with-tags) -o "$@" "gx/ipfs/$(shell gx deps find go-cidutil)/go-cidutil/cid-fmt"
TGTS_$(d) += $(d)/cid-fmt
# random is also special