Add 32-bit linux build target for Travis (#389)

* Add 32bit build matrix test

* Adjust travis/Makefile

* Set dist back to xenial

* export CGO_ENABLED=1

* Add gcc-multilib

* Sudo installerino

* make check -> make test
This commit is contained in:
Adrian Gallagher
2019-12-03 08:44:57 +11:00
committed by GitHub
parent 24bddcc090
commit c27b8657e2
2 changed files with 33 additions and 4 deletions

View File

@@ -13,9 +13,10 @@ matrix:
script:
- npm run lint
- npm run build
- language: go
dist: xenial
name: 'GoCryptoTrader [back-end] [linux]'
name: 'GoCryptoTrader [back-end] [linux] [64-bit]'
go:
- 1.13.x
env:
@@ -30,12 +31,39 @@ matrix:
services:
- postgresql
before_script:
- psql -c 'create database gct_dev_ci;' -U postgres
- psql -c 'create database gct_dev_ci;' -U postgres
script:
- make check
after_success:
- bash <(curl -s https://codecov.io/bash)
- language: go
dist: xenial
name: 'GoCryptoTrader [back-end] [linux] [32-bit]'
go:
- 1.13.x
env:
- GO111MODULE=on
- NO_RACE_TEST=1
- PSQL_USER=postgres
- PSQL_HOST=localhost
- PSQL_DBNAME=gct_dev_ci
install: true
cache:
directories:
- $GOPATH/pkg/mod
services:
- postgresql
before_script:
- psql -c 'create database gct_dev_ci;' -U postgres
script:
- export GOARCH=386
- export CGO_ENABLED=1
- sudo apt-get install gcc-multilib
- make test
after_success:
- bash <(curl -s https://codecov.io/bash)
- language: go
os: osx
name: 'GoCryptoTrader [back-end] [darwin]'

View File

@@ -6,6 +6,7 @@ GCTLISTENPORT=9050
GCTPROFILERLISTENPORT=8085
CRON = $(TRAVIS_EVENT_TYPE)
DRIVER ?= psql
RACE_FLAG := $(if $(NO_RACE_TEST),,-race)
get:
GO111MODULE=on go get $(GCTPKG)
@@ -19,9 +20,9 @@ check: linter test
test:
ifeq ($(CRON), cron)
go test -race -tags=mock_test_off -coverprofile=coverage.txt -covermode=atomic ./...
go test $(RACE_FLAG) -tags=mock_test_off -coverprofile=coverage.txt -covermode=atomic ./...
else
go test -race -coverprofile=coverage.txt -covermode=atomic ./...
go test $(RACE_FLAG) -coverprofile=coverage.txt -covermode=atomic ./...
endif
build: