Skip to content

Commit

Permalink
Add 32-bit linux build target for Travis (thrasher-corp#389)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
thrasher- authored Dec 2, 2019
1 parent 24bddcc commit c27b865
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
32 changes: 30 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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]'
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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:
Expand Down

0 comments on commit c27b865

Please sign in to comment.