-
Notifications
You must be signed in to change notification settings - Fork 116
/
.travis.yml
47 lines (39 loc) · 1.78 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
language: go
go:
- 1.14.2
sudo: required
services:
- docker
before_install:
- sudo apt-get update -qq
- sudo apt-get install libasound2-dev alsa-utils alsa-oss
- sudo apt-get install libgl1-mesa-dev xorg-dev
install:
- go get -t -v ./pkg/...
script:
- go test ./pkg/... -v -race -coverprofile=coverage.txt -covermode=atomic -coverpkg=github.com/Humpheh/goboy/pkg/...
after_success:
- bash <(curl -s https://codecov.io/bash)
# Cross build the binaries before deploy
before_deploy:
- mkdir build
- mkdir package/build
- cd build
- go get github.com/karalabe/xgo
- xgo -go 1.14.2 --targets=windows/amd64,darwin/amd64 -out goboy -ldflags "-X main.version=$TRAVIS_TAG" --pkg cmd/goboy github.com/Humpheh/goboy
# Build the darwin bundle
- cd ../package/darwin
- ./build_darwin.sh ../../build/goboy-darwin-10.6-amd64
# Build (rename) the windows bundle
- cd ../windows
- ./build_windows.sh ../../build/goboy-windows-4.0-amd64.exe
- cd ../../ # Reset to root
deploy:
provider: releases
api_key:
secure: qOCgUt/HVRcCNispRwJm9Rw+iEQcHJKWRdPApVFon21b6NhDso2UhZgOy+z3HivL+SVE8aeYMyfNGnumOlERGsoALSh3ULNj9vShSKfMZS1sWp8tJjD5dV4+9W80tTwx62Ef9FU9OmGjzdgeY3PkL4tkEaUwwFA26kw/wibqxdwqh40LDAOs76DDjHMcnR3c8G5gehRpjDxV8Rbucjy7n7TK2axpGHtg68vSuyCv4K60GuDVuKz4xRguYDh8FO3HkfSxDVFB3mr0wlnEk4aqC6VT4J9UbRk3qkUAmEiZWG9YNAwq+rOm08oFVCqZE557ZGCHKkhd7WAOHSIjOVGfH+ZV8M2nr8/8LqganPnaVGEAVKJ1rrxHMGA+0oQY3s3QfkLy9fuz4fZpx9oMywLPFSOcLMpE1GxFi/uTpDJNtnBnbEAUUQNEtv7ZaQpT/podM00QbZWNf0O1J7D8olMMnvgoAkQeuCcZiuduH/Oxt7IlwbLsjdGgl4epQrUyQYDO4HqwdHjcEbRbkLhkcBRmn+0YEHQh84tSX0R/BNTfgCny69b1q/S2T0MO+ASFX+//q3f019A0/ClNZrqMjxp632CyIumKvTIOSWMbvOTvfoGJJLaBY7UdQ9aSk6/qDREuMxSymg/H3GTvVx3SHvD0MqF8SKpgSn65sVBPQCCRLcY=
file: package/build/*
file_glob: true
skip_cleanup: true
on:
tags: true