mirror of
https://github.com/SmartHoneybee/ubiquitous-memory
synced 2025-04-30 15:49:39 +02:00
travis (#2)
This commit is contained in:
parent
d5d79ef272
commit
c12c170dd9
58
.travis.yml
Normal file
58
.travis.yml
Normal file
@ -0,0 +1,58 @@
|
||||
language: c
|
||||
dist: trusty
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- sourceline: 'deb https://dl.yarnpkg.com/debian/ stable main'
|
||||
key_url: 'https://dl.yarnpkg.com/debian/pubkey.gpg'
|
||||
- sourceline: 'deb https://deb.nodesource.com/node_8.x trusty main'
|
||||
key_url: 'https://deb.nodesource.com/gpgkey/nodesource.gpg.key'
|
||||
packages:
|
||||
- nodejs
|
||||
- yarn
|
||||
- build-essential
|
||||
env:
|
||||
global:
|
||||
- GOV=1.9
|
||||
- GOPATH=$HOME/go
|
||||
- GOROOT=$HOME/$GOV/go
|
||||
- PATH=$GOROOT/bin:$PATH:$GOPATH/bin
|
||||
matrix:
|
||||
- V=4.3.0
|
||||
- V=4.3.1
|
||||
before_install:
|
||||
- install -d $GOPATH $GOROOT
|
||||
- wget https://storage.googleapis.com/golang/go$GOV.linux-amd64.tar.gz
|
||||
- tar -C $HOME/$GOV -xzf go$GOV.linux-amd64.tar.gz
|
||||
- node --version
|
||||
- yarn versions
|
||||
- go version
|
||||
- ulimit -n 8096
|
||||
- install -d ~/go/src/github.com/mattermost
|
||||
- cd ~/go/src/github.com/mattermost
|
||||
- wget "https://github.com/mattermost/mattermost-server/archive/v${V}.tar.gz"
|
||||
- tar xf "v${V}.tar.gz"
|
||||
- mv "mattermost-server-${V}" mattermost-server
|
||||
- rm "v${V}.tar.gz"
|
||||
- wget "https://github.com/mattermost/mattermost-webapp/archive/v${V}.tar.gz"
|
||||
- tar xf "v${V}.tar.gz"
|
||||
- mv "mattermost-webapp-${V}" mattermost-webapp
|
||||
- rm "v${V}.tar.gz"
|
||||
script:
|
||||
- cd ~/go/src/github.com/mattermost/mattermost-webapp
|
||||
- make build -i
|
||||
- cd ~/go/src/github.com/mattermost/mattermost-server
|
||||
- patch -p1 < $TRAVIS_BUILD_DIR/make.patch
|
||||
- go get -d ./... || true
|
||||
- go list -f '{{ join .Deps "\n" }}' | xargs go get -d || true
|
||||
- make build-linux package
|
||||
after_failure:
|
||||
- cat /tmp/webapp.log
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key: "${GITHUB_OAUTH_TOKEN}"
|
||||
file: "~/go/src/github.com/mattermost/mattermost-server/dist/mattermost-*-linux-arm.tar.gz"
|
||||
file_glob: true
|
||||
skip_cleanup: true
|
||||
on:
|
||||
tags: true
|
63
make.patch
Normal file
63
make.patch
Normal file
@ -0,0 +1,63 @@
|
||||
diff --git a/build/release.mk b/build/release.mk
|
||||
index 5eaee80..e0e13bf 100644
|
||||
--- a/build/release.mk
|
||||
+++ b/build/release.mk
|
||||
@@ -3,7 +3,7 @@ dist: | check-style test package
|
||||
|
||||
build-linux:
|
||||
@echo Build Linux amd64
|
||||
- env GOOS=linux GOARCH=amd64 $(GO) install $(GOFLAGS) $(GO_LINKER_FLAGS) ./cmd/platform
|
||||
+ env GOOS=linux GOARCH=arm $(GO) install $(GOFLAGS) $(GO_LINKER_FLAGS) ./cmd/platform
|
||||
|
||||
build-osx:
|
||||
@echo Build OSX amd64
|
||||
@@ -32,6 +32,7 @@ package:
|
||||
|
||||
@# Resource directories
|
||||
cp -RL config $(DIST_PATH)
|
||||
+ mv $(DIST_PATH)/config/default.json $(DIST_PATH)/config/config.json
|
||||
cp -RL fonts $(DIST_PATH)
|
||||
cp -RL templates $(DIST_PATH)
|
||||
cp -RL i18n $(DIST_PATH)
|
||||
@@ -61,38 +62,14 @@ endif
|
||||
|
||||
@# ----- PLATFORM SPECIFIC -----
|
||||
|
||||
- @# Make osx package
|
||||
- @# Copy binary
|
||||
-ifeq ($(BUILDER_GOOS_GOARCH),"darwin_amd64")
|
||||
- cp $(GOPATH)/bin/platform $(DIST_PATH)/bin # from native bin dir, not cross-compiled
|
||||
-else
|
||||
- cp $(GOPATH)/bin/darwin_amd64/platform $(DIST_PATH)/bin # from cross-compiled bin dir
|
||||
-endif
|
||||
- @# Package
|
||||
- tar -C dist -czf $(DIST_PATH)-$(BUILD_TYPE_NAME)-osx-amd64.tar.gz mattermost
|
||||
- @# Cleanup
|
||||
- rm -f $(DIST_PATH)/bin/platform
|
||||
-
|
||||
- @# Make windows package
|
||||
- @# Copy binary
|
||||
-ifeq ($(BUILDER_GOOS_GOARCH),"windows_amd64")
|
||||
- cp $(GOPATH)/bin/platform.exe $(DIST_PATH)/bin # from native bin dir, not cross-compiled
|
||||
-else
|
||||
- cp $(GOPATH)/bin/windows_amd64/platform.exe $(DIST_PATH)/bin # from cross-compiled bin dir
|
||||
-endif
|
||||
- @# Package
|
||||
- cd $(DIST_ROOT) && zip -9 -r -q -l mattermost-$(BUILD_TYPE_NAME)-windows-amd64.zip mattermost && cd ..
|
||||
- @# Cleanup
|
||||
- rm -f $(DIST_PATH)/bin/platform.exe
|
||||
-
|
||||
@# Make linux package
|
||||
@# Copy binary
|
||||
-ifeq ($(BUILDER_GOOS_GOARCH),"linux_amd64")
|
||||
+ifeq ($(BUILDER_GOOS_GOARCH),"linux_arm")
|
||||
cp $(GOPATH)/bin/platform $(DIST_PATH)/bin # from native bin dir, not cross-compiled
|
||||
else
|
||||
- cp $(GOPATH)/bin/linux_amd64/platform $(DIST_PATH)/bin # from cross-compiled bin dir
|
||||
+ cp $(GOPATH)/bin/linux_arm/platform $(DIST_PATH)/bin # from cross-compiled bin dir
|
||||
endif
|
||||
@# Package
|
||||
- tar -C dist -czf $(DIST_PATH)-$(BUILD_TYPE_NAME)-linux-amd64.tar.gz mattermost
|
||||
+ tar -C dist -czf $(DIST_PATH)-$(BUILD_TYPE_NAME)-linux-arm.tar.gz mattermost
|
||||
@# Don't clean up native package so dev machines will have an unzipped package available
|
||||
@#rm -f $(DIST_PATH)/bin/platform
|
Loading…
x
Reference in New Issue
Block a user