From 2b29c2d7d0910e40486523dd9d6a4de8a213719a Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Mon, 25 Feb 2019 15:56:42 +1300 Subject: [PATCH] Added 'pre-push' build targets, added to pull request instructions. --- .github/pull_request_template.md | 6 ++++-- Makefile | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index c5e3f0d2c1..91aad767f8 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -23,6 +23,8 @@ Because of this, the following embargo is put in place: 5. All pull requests are reviewed. Be ready to receive constructive criticism, and to learn and improve your coding style. Also, be ready to clarify anything that isn't already sufficiently explained in the code and text of the pull request, and to defend your ideas. -6. If your pull request is a fix for one or more issues that are open in GitHub, add a comment to your pull request, and add the issue numbers of the issues that are fixed in the form `Fixes #`. This will cause the issues to be closed when the pull request is merged; +6. We use continuos integration (CI) with [Travis](https://travis-ci.com/betaflight) to build build all targets and run the test suite for every pull request. Pull requests that fail any of the builds or fail tests will most likely not be reviewed before they are fixed to build successfully and pass the tests. In order to get a quick idea if there are things that need fixing **before** opening a pull request or pushing an update into an existing pull request, run `make pre-push` to run a representative subset of the CI build. _Note: This is not an exhaustive test(which will take hours to run on any desktop type system), so even if this passes the CI build might still fail._ -7. Remove this Text :). +7. If your pull request is a fix for one or more issues that are open in GitHub, add a comment to your pull request, and add the issue numbers of the issues that are fixed in the form `Fixes #`. This will cause the issues to be closed when the pull request is merged; + +8. Remove this Text :). diff --git a/Makefile b/Makefile index 13b3594093..9e8c485ebf 100644 --- a/Makefile +++ b/Makefile @@ -347,6 +347,10 @@ all_with_unsupported: $(VALID_TARGETS) ## unsupported : Build unsupported targets unsupported: $(UNSUPPORTED_TARGETS) +## pre-push : The minimum verification that should be run before pushing, to check if CI has a chance of succeeding +pre-push: + $(MAKE) BETAFLIGHTF3_clean BETAFLIGHTF3 OMNIBUSF4_clean OMNIBUSF4 SPRACINGF7DUAL_clean SPRACINGF7DUAL SITL_clean SITL clean_test test-representative EXTRA_FLAGS=-Werror + ## official : Build all official (travis) targets official: $(OFFICIAL_TARGETS)