@cryptotaxi247 / kubo / commits / d8a92224a

ci: test on 32bit os

License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>

Łukasz Magiera committed Sep 6, 2018 at 15:36 UTC d8a92224a794b964337fa79123b39ac4b7417b33
3 files changed +36 -17
ci/Jenkinsfile
+32 -13
@@ -98,6 +98,21 @@ def sharness_step = { run, osname, makeargs, ignore ->
98 }
99 }
100
101 +def gotest_step = { run ->
102 + timeout(time: gotest_timeout, unit: 'MINUTES') {
103 + run "make gx-deps"
104 +
105 + try {
106 + run test + ' -tags="nofuse" 2>&1 | tee output'
107 + run 'cat output | go-junit-report > junit-report-linux.xml'
108 + } catch (err) {
109 + throw err
110 + } finally {
111 + junit allowEmptyResults: true, testResults: 'junit-report-*.xml'
112 + }
113 + }
114 +}
115 +
116 /* PIPELINE */
117
118 ansiColor('xterm') { withEnv(['TERM=xterm-color']) {
@@ -157,19 +172,8 @@ ansiColor('xterm') { withEnv(['TERM=xterm-color']) {
172 },
173 linux: {
174 setupStep('linux') { run ->
160 - timeout(time: gotest_timeout, unit: 'MINUTES') {
161 - run 'go get -v github.com/jstemmer/go-junit-report'
162 - run "make gx-deps"
163 -
164 - try {
165 - run test + ' -tags="nofuse" 2>&1 | tee output'
166 - run 'cat output | go-junit-report > junit-report-linux.xml'
167 - } catch (err) {
168 - throw err
169 - } finally {
170 - junit allowEmptyResults: true, testResults: 'junit-report-*.xml'
171 - }
172 - }
175 + run 'go get -v github.com/jstemmer/go-junit-report'
176 + gotest_step(run)
177 }
178 },
179 linuxSharness: {
@@ -177,6 +181,21 @@ ansiColor('xterm') { withEnv(['TERM=xterm-color']) {
181 sharness_step(run, 'linux', '-Otarget', false)
182 }
183 },
184 + linux32: {
185 + setupStep('linux') { run ->
186 + run 'go get -v github.com/jstemmer/go-junit-report'
187 + withEnv(["GOARCH=386"]) {
188 + gotest_step(run)
189 + }
190 + }
191 + },
192 + linux32Sharness: {
193 + setupStep('linux') { run ->
194 + withEnv(["GOARCH=386", "TEST_NO_PLUGIN=1"]) {
195 + sharness_step(run, 'linux', '-Otarget', false)
196 + }
197 + }
198 + },
199 //macOS: {
200 // setupStep('macos') { run ->
201 // sharness_step(run, 'macos', '', true)
mk/golang.mk
+1 -1
@@ -26,7 +26,7 @@ go-tags=$(if $(GOTAGS), -tags="$(call join-with,$(space),$(GOTAGS))")
26 go-flags-with-tags=$(GOFLAGS)$(go-tags)
27
28 define go-build
29 -$(GOCC) build -i $(go-flags-with-tags) -o "$@" "$(call go-pkg-name,$<)"
29 +$(GOCC) build $(go-flags-with-tags) -o "$@" "$(call go-pkg-name,$<)"
30 endef
31
32 define go-try-build
test/bin/Rules.mk
+3 -3
@@ -30,18 +30,18 @@ TGTS_GX_$(d) := hang-fds
30 TGTS_GX_$(d) := $(addprefix $(d)/,$(TGTS_GX_$(d)))
31
32 $(TGTS_GX_$(d)):
33 - go build -i $(go-flags-with-tags) -o "$@" "$(call gx-path,$(notdir $@))"
33 + go build $(go-flags-with-tags) -o "$@" "$(call gx-path,$(notdir $@))"
34
35 TGTS_$(d) += $(TGTS_GX_$(d))
36
37 # multihash is special
38 $(d)/multihash:
39 - go build -i $(go-flags-with-tags) -o "$@" "gx/ipfs/$(shell gx deps find go-multihash)/go-multihash/multihash"
39 + go build $(go-flags-with-tags) -o "$@" "gx/ipfs/$(shell gx deps find go-multihash)/go-multihash/multihash"
40 TGTS_$(d) += $(d)/multihash
41
42 # cid-fmt is also special
43 $(d)/cid-fmt:
44 - go build -i $(go-flags-with-tags) -o "$@" "gx/ipfs/$(shell gx deps find go-cidutil)/go-cidutil/cid-fmt"
44 + go build $(go-flags-with-tags) -o "$@" "gx/ipfs/$(shell gx deps find go-cidutil)/go-cidutil/cid-fmt"
45 TGTS_$(d) += $(d)/cid-fmt
46
47 # random is also special