mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Merge pull request #731 from smira/build-improvements
Change build settings to speed up builds
This commit is contained in:
+1
-2
@@ -22,8 +22,7 @@ _testmain.go
|
|||||||
*.exe
|
*.exe
|
||||||
*.test
|
*.test
|
||||||
|
|
||||||
coverage.html
|
coverage.txt
|
||||||
coverage*.out
|
|
||||||
|
|
||||||
*.pyc
|
*.pyc
|
||||||
|
|
||||||
|
|||||||
+19
-12
@@ -3,12 +3,6 @@ sudo: required
|
|||||||
|
|
||||||
language: go
|
language: go
|
||||||
|
|
||||||
go:
|
|
||||||
- 1.8.x
|
|
||||||
- 1.9.x
|
|
||||||
- 1.10.x
|
|
||||||
- master
|
|
||||||
|
|
||||||
go_import_path: github.com/smira/aptly
|
go_import_path: github.com/smira/aptly
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
@@ -19,11 +13,26 @@ addons:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- secure: "YSwtFrMqh4oUvdSQTXBXMHHLWeQgyNEL23ChIZwU0nuDGIcQZ65kipu0PzefedtUbK4ieC065YCUi4UDDh6gPotB/Wu1pnYg3dyQ7rFvhaVYAAUEpajAdXZhlx+7+J8a4FZMeC/kqiahxoRgLbthF9019ouIqhGB9zHKI6/yZwc="
|
|
||||||
- secure: "EcCzJsqQ3HnIkprBPS1YHErsETcb7KQFBYEzVDE7RYDApWeapLq+r/twMtWMd/fkGeLzr3kWSg7nhSadeHMLYeMl9j+U7ncC5CWG5NMBOj/jowlb9cMCCDlmzMoZLAgR6jm1cJyrWCLsWVlv+D0ZiB0fx4xaBZP/gIr9g6nEwC8="
|
- secure: "EcCzJsqQ3HnIkprBPS1YHErsETcb7KQFBYEzVDE7RYDApWeapLq+r/twMtWMd/fkGeLzr3kWSg7nhSadeHMLYeMl9j+U7ncC5CWG5NMBOj/jowlb9cMCCDlmzMoZLAgR6jm1cJyrWCLsWVlv+D0ZiB0fx4xaBZP/gIr9g6nEwC8="
|
||||||
- secure: "OxiVNmre2JzUszwPNNilKDgIqtfX2gnRSsVz6nuySB1uO2yQsOQmKWJ9cVYgH2IB5H8eWXKOhexcSE28kz6TPLRuEcU9fnqKY3uEkdwm7rJfz9lf+7C4bJEUdA1OIzJppjnWUiXxD7CEPL1DlnMZM24eDQYqa/4WKACAgkK53gE="
|
- secure: "OxiVNmre2JzUszwPNNilKDgIqtfX2gnRSsVz6nuySB1uO2yQsOQmKWJ9cVYgH2IB5H8eWXKOhexcSE28kz6TPLRuEcU9fnqKY3uEkdwm7rJfz9lf+7C4bJEUdA1OIzJppjnWUiXxD7CEPL1DlnMZM24eDQYqa/4WKACAgkK53gE="
|
||||||
- NO_FTP_ACCESS: "yes"
|
- NO_FTP_ACCESS: "yes"
|
||||||
- BOTO_CONFIG: /dev/null
|
- BOTO_CONFIG: /dev/null
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
allow_failures:
|
||||||
|
- go: master
|
||||||
|
env: RUN_LONG_TESTS=no
|
||||||
|
fast_finish: true
|
||||||
|
include:
|
||||||
|
- go: 1.8.x
|
||||||
|
env: RUN_LONG_TESTS=no
|
||||||
|
- go: 1.9.x
|
||||||
|
env: RUN_LONG_TESTS=yes
|
||||||
|
- go: 1.10.x
|
||||||
|
env: RUN_LONG_TESTS=yes
|
||||||
|
- go: master
|
||||||
|
env: RUN_LONG_TESTS=no
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- virtualenv system/env
|
- virtualenv system/env
|
||||||
- . system/env/bin/activate
|
- . system/env/bin/activate
|
||||||
@@ -31,14 +40,12 @@ before_install:
|
|||||||
- pip install -U pip setuptools
|
- pip install -U pip setuptools
|
||||||
- pip install -r system/requirements.txt
|
- pip install -r system/requirements.txt
|
||||||
- make version
|
- make version
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- make prepare
|
- make prepare
|
||||||
|
|
||||||
script: make travis
|
after_success:
|
||||||
|
- bash <(curl -s https://codecov.io/bash)
|
||||||
matrix:
|
|
||||||
allow_failures:
|
|
||||||
- go: master
|
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
webhooks:
|
webhooks:
|
||||||
|
|||||||
@@ -4,19 +4,13 @@ PACKAGES=context database deb files gpg http query swift s3 utils
|
|||||||
PYTHON?=python
|
PYTHON?=python
|
||||||
TESTS?=
|
TESTS?=
|
||||||
BINPATH?=$(GOPATH)/bin
|
BINPATH?=$(GOPATH)/bin
|
||||||
|
RUN_LONG_TESTS?=yes
|
||||||
|
|
||||||
ifeq ($(GOVERSION), devel)
|
GO_1_10_AND_HIGHER=$(shell (printf '%s\n' go1.10 $(GOVERSION) | sort -cV >/dev/null 2>&1) && echo "yes")
|
||||||
TRAVIS_TARGET=coveralls
|
|
||||||
else
|
|
||||||
TRAVIS_TARGET=test
|
|
||||||
endif
|
|
||||||
|
|
||||||
all: test check system-test
|
all: test check system-test
|
||||||
|
|
||||||
prepare:
|
prepare:
|
||||||
go get -u github.com/mattn/goveralls
|
|
||||||
go get -u github.com/axw/gocov/gocov
|
|
||||||
go get -u golang.org/x/tools/cmd/cover
|
|
||||||
go get -u github.com/alecthomas/gometalinter
|
go get -u github.com/alecthomas/gometalinter
|
||||||
gometalinter --install
|
gometalinter --install
|
||||||
|
|
||||||
@@ -24,45 +18,39 @@ dev:
|
|||||||
go get -u github.com/golang/dep/...
|
go get -u github.com/golang/dep/...
|
||||||
go get -u github.com/laher/goxc
|
go get -u github.com/laher/goxc
|
||||||
|
|
||||||
coverage.out:
|
|
||||||
rm -f coverage.*.out
|
|
||||||
for i in $(PACKAGES); do go test -coverprofile=coverage.$$i.out -covermode=count ./$$i; done
|
|
||||||
echo "mode: count" > coverage.out
|
|
||||||
grep -v -h "mode: count" coverage.*.out >> coverage.out
|
|
||||||
rm -f coverage.*.out
|
|
||||||
|
|
||||||
coverage: coverage.out
|
|
||||||
go tool cover -html=coverage.out
|
|
||||||
rm -f coverage.out
|
|
||||||
|
|
||||||
check: system/env
|
check: system/env
|
||||||
|
ifeq ($(RUN_LONG_TESTS), yes)
|
||||||
if [ -x travis_wait ]; then \
|
if [ -x travis_wait ]; then \
|
||||||
travis_wait gometalinter --config=linter.json ./...; \
|
travis_wait gometalinter --config=linter.json ./...; \
|
||||||
else \
|
else \
|
||||||
gometalinter --config=linter.json ./...; \
|
gometalinter --config=linter.json ./...; \
|
||||||
fi
|
fi
|
||||||
. system/env/bin/activate && flake8 --max-line-length=200 --exclude=system/env/ system/
|
. system/env/bin/activate && flake8 --max-line-length=200 --exclude=system/env/ system/
|
||||||
|
endif
|
||||||
|
|
||||||
install:
|
install:
|
||||||
go install -v -ldflags "-X main.Version=$(VERSION)"
|
go install -v -ldflags "-X main.Version=$(VERSION)"
|
||||||
|
|
||||||
system/env: system/requirements.txt
|
system/env: system/requirements.txt
|
||||||
|
ifeq ($(RUN_LONG_TESTS), yes)
|
||||||
rm -rf system/env
|
rm -rf system/env
|
||||||
virtualenv system/env
|
virtualenv system/env
|
||||||
system/env/bin/pip install -r system/requirements.txt
|
system/env/bin/pip install -r system/requirements.txt
|
||||||
|
endif
|
||||||
|
|
||||||
system-test: install system/env
|
system-test: install system/env
|
||||||
|
ifeq ($(RUN_LONG_TESTS), yes)
|
||||||
if [ ! -e ~/aptly-fixture-db ]; then git clone https://github.com/aptly-dev/aptly-fixture-db.git ~/aptly-fixture-db/; fi
|
if [ ! -e ~/aptly-fixture-db ]; then git clone https://github.com/aptly-dev/aptly-fixture-db.git ~/aptly-fixture-db/; fi
|
||||||
if [ ! -e ~/aptly-fixture-pool ]; then git clone https://github.com/aptly-dev/aptly-fixture-pool.git ~/aptly-fixture-pool/; fi
|
if [ ! -e ~/aptly-fixture-pool ]; then git clone https://github.com/aptly-dev/aptly-fixture-pool.git ~/aptly-fixture-pool/; fi
|
||||||
PATH=$(BINPATH)/:$(PATH) && . system/env/bin/activate && APTLY_VERSION=$(VERSION) $(PYTHON) system/run.py --long $(TESTS)
|
PATH=$(BINPATH)/:$(PATH) && . system/env/bin/activate && APTLY_VERSION=$(VERSION) $(PYTHON) system/run.py --long $(TESTS)
|
||||||
|
endif
|
||||||
travis: $(TRAVIS_TARGET) check system-test
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
ifeq ($(GO_1_10_AND_HIGHER), yes)
|
||||||
|
go test -v ./... -gocheck.v=true -race -coverprofile=coverage.txt -covermode=atomic
|
||||||
|
else
|
||||||
go test -v `go list ./... | grep -v vendor/` -gocheck.v=true
|
go test -v `go list ./... | grep -v vendor/` -gocheck.v=true
|
||||||
|
endif
|
||||||
coveralls: coverage.out
|
|
||||||
$(BINPATH)/goveralls -service travis-ci.org -coverprofile=coverage.out -repotoken=$(COVERALLS_TOKEN)
|
|
||||||
|
|
||||||
mem.png: mem.dat mem.gp
|
mem.png: mem.dat mem.gp
|
||||||
gnuplot mem.gp
|
gnuplot mem.gp
|
||||||
@@ -83,4 +71,4 @@ man:
|
|||||||
version:
|
version:
|
||||||
@echo $(VERSION)
|
@echo $(VERSION)
|
||||||
|
|
||||||
.PHONY: coverage.out man version
|
.PHONY: man version
|
||||||
|
|||||||
+2
-2
@@ -5,8 +5,8 @@ aptly
|
|||||||
.. image:: https://api.travis-ci.org/smira/aptly.svg?branch=master
|
.. image:: https://api.travis-ci.org/smira/aptly.svg?branch=master
|
||||||
:target: https://travis-ci.org/smira/aptly
|
:target: https://travis-ci.org/smira/aptly
|
||||||
|
|
||||||
.. image:: https://coveralls.io/repos/smira/aptly/badge.svg?branch=master
|
.. image:: https://codecov.io/gh/smira/aptly/branch/master/graph/badge.svg
|
||||||
:target: https://coveralls.io/r/smira/aptly?branch=master
|
:target: https://codecov.io/gh/smira/aptly
|
||||||
|
|
||||||
.. image:: https://badges.gitter.im/Join Chat.svg
|
.. image:: https://badges.gitter.im/Join Chat.svg
|
||||||
:target: https://gitter.im/smira/aptly?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
|
:target: https://gitter.im/smira/aptly?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
|
||||||
|
|||||||
Reference in New Issue
Block a user