cross-compile amd64 on linux

This commit is contained in:
Max Risuhin 2018-12-22 14:35:40 +02:00
parent cf504590b2
commit d20b67f928
2 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ matrix:
go_import_path: github.com/liamg/aminal go_import_path: github.com/liamg/aminal
before_install: before_install:
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then sudo apt-get install -y xorg-dev libgl1-mesa-dev - if [[ $TRAVIS_OS_NAME == 'linux' ]]; then sudo apt-get install -y xorg-dev libgl1-mesa-dev
gcc-multilib gcc-mingw-w64 && go get github.com/mitchellh/gox; fi gcc-multilib gcc-mingw-w64-x86-64 && go get github.com/mitchellh/gox; fi
script: script:
- make test - make test
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then make build-darwin-native; fi - if [[ $TRAVIS_OS_NAME == 'osx' ]]; then make build-darwin-native; fi
@ -30,7 +30,7 @@ deploy:
file: file:
- bin/darwin/aminal-darwin-amd64 - bin/darwin/aminal-darwin-amd64
- bin/linux/aminal-linux-amd64 - bin/linux/aminal-linux-amd64
- bin/windows/aminal-windows-386.exe - bin/windows/aminal-windows-amd64.exe
on: on:
repo: jumptrading/aminal repo: jumptrading/aminal
tags: true tags: true

View File

@ -28,7 +28,7 @@ build-linux:
.PHONY: windows-cross-compile .PHONY: windows-cross-compile
windows-cross-compile: windows-cross-compile:
mkdir -p bin/windows mkdir -p bin/windows
GOOS=windows GOARCH=386 CGO_ENABLED=1 CXX=i686-w64-mingw32-g++ CC=i686-w64-mingw32-gcc go build -o bin/windows/${BINARY}-windows-386.exe -ldflags "-X github.com/liamg/aminal/version.Version=${TRAVIS_TAG}" GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CXX=x86_64-w64-mingw32-g++ CC=x86_64-w64-mingw32-gcc go build -o bin/windows/${BINARY}-windows-amd64.exe -ldflags "-X github.com/liamg/aminal/version.Version=${TRAVIS_TAG}"
.PHONY: build-windows .PHONY: build-windows
build-windows: build-windows: