Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Port lint scripts from bitcoin #1823

Merged
merged 16 commits into from
Aug 20, 2020
Merged
19 changes: 18 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,31 @@ script:
after_script:
- echo $TRAVIS_COMMIT_RANGE
jobs:
fast_finish: true
allow_failures:
- stage: lint

include:
- stage: lint
name: 'lint'
env:
cache: pip
language: python
python: '3.5'
install:
- set -o errexit; source ./ci/lint/04_install.sh
before_script:
- set -o errexit; source ./ci/lint/05_before_script.sh
script:
- set -o errexit; source ./ci/lint/06_script.sh

- stage: test
name: 'ARM [GOAL: install] [buster]'
arch: arm64 # Can disable QEMU_USER_CMD and run the tests natively without qemu
env: >-
FILE_ENV="./ci/test/00_setup_env_arm.sh"
QEMU_USER_CMD=""

- stage: test
name: 'Win32'
env: >-
Expand Down
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- improved statistics and SB contract core caching based on a bClean flag in the cache global
- new SB format and packing for bv11
- new SB contract hashing (native) for bv11
- changes to accomodate new beacon approach
- changes to accommodate new beacon approach
- Implement in memory versioning for team file ETags
- Implement local dynamic team requirement removal and whitelist #1502 (@cyrossignol)

Expand Down Expand Up @@ -253,7 +253,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Clean-up beacon manipulation (@Foggyx420)

### Fixed
- Building errors on Mac releated to SVG framework (@thecharlatan)
- Building errors on Mac related to SVG framework (@thecharlatan)
- neural data response
- neural network fixes (@Foggyx420)
- investor cpid's appearing as zeros in block index (@tomasbrod)
Expand Down Expand Up @@ -335,7 +335,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
- Move context sensitive DPoR block checks to ConnectBlock #922 (@tomasbrod).
- Check incoming blocks for malformed DPoR signature #922.
- Corect tally height on init #917 (@denravonska).
- Correct tally height on init #917 (@denravonska).
- Prevent staking of a block with a failed signature #948 (@Foggyx420).
- Fix UI and RPC slowdown regression #961 (@denravonska).
- Fix Debian lint errors #886 #885 #884 #883 (@caraka).
Expand Down Expand Up @@ -475,7 +475,7 @@ Internal test version used to sort out the forks.
(@Foggyx420).
- Fix stake modifier mismatch which caused nodes to get stuck on first
V8 block #581 (@tomasbrod).
- Fix beacon auto advertisment issue when done automatically #580 (@Foggyx420).
- Fix beacon auto advertisement issue when done automatically #580 (@Foggyx420).
- Fix for loss of PoR rewards due to reorganize #578 (@tomasbrod).
- Fix upgrader compile error on Linux #541 (@theMarix).
- Fix duplicate poll entries #539 (@denravonska).
Expand Down Expand Up @@ -554,7 +554,7 @@ Internal test version used to sort out the forks.
to broken function #362 (@skcin).
- Replace translations which were just question marks with new files from
the Bitcoin source tree: Arabic, Belarusian, Bulgarian, Greek, Persian,
Hebrew, Hindi, Japanese, Georgian, Kirghiz, Serbian, Thai, Ukranian,
Hebrew, Hindi, Japanese, Georgian, Kirghiz, Serbian, Thai, Ukrainian,
Urdu and Chinese.
- Don't print the "Bootup" and "Signing block" messages unless fDebug (@tomasbrod).
- Print beacons as they are loaded and debug3=true (@tomasbrod).
Expand Down
9 changes: 5 additions & 4 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
#!/bin/sh
# Copyright (c) 2013-2016 The Bitcoin Core developers
# Copyright (c) 2013-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

export LC_ALL=C
set -e
srcdir="$(dirname $0)"
srcdir="$(dirname "$0")"
cd "$srcdir"
if [ -z ${LIBTOOLIZE} ] && GLIBTOOLIZE="`which glibtoolize 2>/dev/null`"; then
if [ -z "${LIBTOOLIZE}" ] && GLIBTOOLIZE="$(command -v glibtoolize)"; then
LIBTOOLIZE="${GLIBTOOLIZE}"
export LIBTOOLIZE
fi
which autoreconf >/dev/null || \
command -v autoreconf >/dev/null || \
(echo "configuration failed, please install autoconf first" && exit 1)
autoreconf --install --force --warnings=all
20 changes: 20 additions & 0 deletions ci/lint/04_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
#
# Copyright (c) 2018-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

export LC_ALL=C

travis_retry sudo apt update && sudo apt install -y clang-format-9
sudo update-alternatives --install /usr/bin/clang-format clang-format $(which clang-format-9 ) 100
sudo update-alternatives --install /usr/bin/clang-format-diff clang-format-diff $(which clang-format-diff-9) 100

travis_retry pip3 install codespell==1.17.1
travis_retry pip3 install flake8==3.8.3
travis_retry pip3 install yq
travis_retry pip3 install mypy==0.781

SHELLCHECK_VERSION=v0.7.1
curl -sL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar --xz -xf - --directory /tmp/
export PATH="/tmp/shellcheck-${SHELLCHECK_VERSION}:${PATH}"
9 changes: 9 additions & 0 deletions ci/lint/05_before_script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
#
# Copyright (c) 2018-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

export LC_ALL=C

git fetch --unshallow
26 changes: 26 additions & 0 deletions ci/lint/06_script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
#
# Copyright (c) 2018-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

export LC_ALL=C

if [ "$TRAVIS_EVENT_TYPE" = "pull_request" ]; then
test/lint/commit-script-check.sh $TRAVIS_COMMIT_RANGE
fi

#test/lint/git-subtree-check.sh src/crypto/ctaes
#test/lint/git-subtree-check.sh src/secp256k1
#test/lint/git-subtree-check.sh src/univalue
#test/lint/git-subtree-check.sh src/leveldb
#test/lint/git-subtree-check.sh src/crc32c
#test/lint/check-doc.py
#test/lint/check-rpc-mappings.py .
test/lint/lint-all.sh

#if [ "$TRAVIS_REPO_SLUG" = "gridcoin-community/Gridcoin-Research" ] && [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then
# git log --merges --before="2 days ago" -1 --format='%H' > ./contrib/verify-commits/trusted-sha512-root-commit
# travis_retry gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $(<contrib/verify-commits/trusted-keys) &&
# ./contrib/verify-commits/verify-commits.py --clean-merge=2;
#fi
Empty file modified ci/test/00_setup_env.sh
100644 → 100755
Empty file.
Empty file modified ci/test/00_setup_env_arm.sh
100644 → 100755
Empty file.
Empty file modified ci/test/00_setup_env_linux_i386.sh
100644 → 100755
Empty file.
Empty file modified ci/test/00_setup_env_mac.sh
100644 → 100755
Empty file.
Empty file modified ci/test/00_setup_env_mac_host.sh
100644 → 100755
Empty file.
Empty file modified ci/test/00_setup_env_native.sh
100644 → 100755
Empty file.
Empty file modified ci/test/00_setup_env_win32.sh
100644 → 100755
Empty file.
Empty file modified ci/test/00_setup_env_win64.sh
100644 → 100755
Empty file.
Empty file modified ci/test/03_before_install.sh
100644 → 100755
Empty file.
Empty file modified ci/test/04_install.sh
100644 → 100755
Empty file.
Empty file modified ci/test/05_before_script.sh
100644 → 100755
Empty file.
Empty file modified ci/test/06_script_a.sh
100644 → 100755
Empty file.
Empty file modified ci/test/06_script_b.sh
100644 → 100755
Empty file.
Empty file modified ci/test_run_all.sh
100644 → 100755
Empty file.
Loading