Skip to content

Commit 6a7d64a

Browse files
committed
Use gotify/build
1 parent a7be064 commit 6a7d64a

2 files changed

Lines changed: 16 additions & 17 deletions

File tree

.travis.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
1-
sudo: required
2-
dist: xenial
31
language: go
42
go:
53
- "1.11.5"
64

5+
services:
6+
- docker
7+
78
notifications:
89
email: false
910

10-
addons:
11-
apt:
12-
packages:
13-
- gcc-aarch64-linux-gnu
14-
- g++-aarch64-linux-gnu
15-
- gcc-arm-linux-gnueabihf
16-
- g++-arm-linux-gnueabihf
17-
1811
env:
1912
- GO111MODULE=on
2013

@@ -26,9 +19,7 @@ script:
2619
- make check
2720

2821
before_deploy:
29-
- GOOS=linux GOARCH=amd64 make build
30-
- CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ GOOS=linux GOARCH=arm64 make build
31-
- CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ GOOS=linux GOARCH=arm GOARM=7 make build
22+
- make build
3223

3324
deploy:
3425
- provider: releases
@@ -37,4 +28,4 @@ deploy:
3728
file: build/*.so
3829
skip_cleanup: true
3930
on:
40-
tags: true
31+
tags: true

Makefile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,17 @@ check-go-mod: create-bulid-dir
1414
gomod-cap -from ${BUILDDIR}/gotify-server.mod -to go.mod -check=true
1515
rm ${BUILDDIR}/gotify-server.mod || true
1616

17-
build: create-bulid-dir
18-
CGO_ENABLED=1 go build -o build/${PLUGIN_NAME}-${GOOS}-${GOARCH}${GOARM}.so -buildmode=plugin ${PLUGIN_ENTRY}
17+
build-linux-amd64:
18+
docker run --rm -v "$$PWD/.:/proj" -w /proj gotify/build:v1-linux-amd64 go build -a -installsuffix cgo -ldflags "-w -s" -buildmode=plugin -o build/${PLUGIN_NAME}-linux-amd64.so /proj
19+
20+
build-linux-arm-7:
21+
docker run --rm -v "$$PWD/.:/proj" -w /proj gotify/build:v1-linux-arm-7 go build -a -installsuffix cgo -ldflags "-w -s" -buildmode=plugin -o build/${PLUGIN_NAME}-linux-arm-7.so /proj
22+
23+
build-linux-arm64:
24+
docker run --rm -v "$$PWD/.:/proj" -w /proj gotify/build:v1-linux-arm64 go build -a -installsuffix cgo -ldflags "-w -s" -buildmode=plugin -o build/${PLUGIN_NAME}-linux-arm64.so /proj
25+
26+
build: build-linux-arm-7 build-linux-amd64 build-linux-arm64
1927

2028
check: check-go-mod
2129

22-
.PHONY: build
30+
.PHONY: build

0 commit comments

Comments
 (0)