From 1e57c9b6082fcb2c8db60f3afa16162efa0637e0 Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Sun, 15 Mar 2020 17:53:29 -0400 Subject: [PATCH 1/6] [ci] Update travis deploy section --- .travis.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7aacf301..58a58154 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,8 +17,9 @@ env: matrix: include: - stage: RPI - if: branch = release*$ + if: tag IS present install: + - export D_ARCH="RPI" - DEFAULT_ARCH=rpi1 make install-docker-deps - DEFAULT_ARCH=rpi2 make install-docker-deps - DEFAULT_ARCH=rpi3 make install-docker-deps @@ -31,8 +32,9 @@ matrix: - make lint - make run-docker CMD='make test' - stage: Android - if: branch = release*$ + if: tag IS present install: + - export D_ARCH="Android" - DEFAULT_ARCH=android make install-docker-deps - make install-deps-no-envs script: @@ -46,6 +48,7 @@ matrix: before_install: - source ./ci-scripts/install-$TRAVIS_OS_NAME.sh install: + - export D_ARCH="Linux" - make install-docker-deps - make install-deps-no-envs - make install-linters @@ -100,6 +103,7 @@ matrix: before_install: - source ./ci-scripts/install-$TRAVIS_OS_NAME.sh install: + - export D_ARCH="MacOS" - make install-deps - make install-coveralls before_script: @@ -134,15 +138,18 @@ before_deploy: - export ARCH="$(uname -m)" - export OS="$(uname -s)" - make prepare-release - - make build + - if [["$D_ARCH" == "RPI"]]; then DEFAULT_TARGET=rpi1 make build-docker; DEFAULT_TARGET=rpi2 make build; DEFAULT_TARGET=rpi3 make build-docker; fi + - if [["$D_ARCH" == "Android"]]; then DEFAULT_TARGET=android make build-docker; fi + - if [["$D_ARCH" == "Linux"]]; then DEFAULT_TARGET=linux make build-docker; fi + - if [["$D_ARCH" == "MacOS"]]; then make build; fi - ( cd deploy && tar czf ../fibercryptowallet-${VERSION}-${OS}-${ARCH}.tar.gz ./* ) - pwd && ls -l . deploy: provider: releases api_key: secure: DCM8aKdci6IA7dF9a84V6FEK+VkfEGoitre/wdxeZs7z4obKY41MhejHvWe017tuLhWqARwuud4PgEDcypVVDN2zB5d/D94O3JQHIDfL643WWTS7JOd+93vfOVmQ3jcGg5yRwt4T8fH3RUwNgQjagXeWLnoAhgAvUzGeAUN26AUFS4TXMmf0tnfGRGsrd8tMcnmsPxWcmrog1GllJ1m7GQ55ua1FuYV3ldyX6bnxQSx/B73T8pCvmz9OIW14nZVHgPrdOeVgHy2JlA10dKe59i1CTBevbo050CEIAque6RkzW52AQTKksmd/X2GnxODkqaZ8dux5b/uCv8Stht1jebM8AwZID8nmnmlpUHrafuZilu/m3RJ/j7YuF+UsNGOPeLG+z1tb3KcSENihRPsFOh4YHFTPHkDBbMcvg+2EKfbOIOrg/+js7Ycmmjx1NoLZgYpmMuq6mBu/TZDuFmFNVtDwevieG7berfVyvIyr3TJEdW+bm+vHGpdTcZho1cMrSmaB2r9j9UADKrRrRAU7vHCjozufg4+dnGjYHHQNCecpeirsbCymq3d7Wgezkm/LK4c0vDbtHuXo1q5VxrMjizzuBNCmiRyguGt0zSWvemU68x8W+OjmnFNJRyEa/g//2BLBQrn6A3qC+Qv5tn1REClW7xMcZXcDjIjmIW7z2Gw= - file: fibercryptowallet-${VERSION}-${OS}-${ARCH}.tar.gz - kip_cleanup: true + file: fibercryptowallet-${VERSION}-${OS}-${D_ARCH}.tar.gz + skip_cleanup: true draft: true overwrite: true on: From 86b3ccb82b92c28617b7c17d3d84275f8f043fb6 Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Mon, 16 Mar 2020 09:12:35 -0400 Subject: [PATCH 2/6] [ci] Comment RPI and Android deploy section on travis --- .travis.yml | 56 ++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/.travis.yml b/.travis.yml index 58a58154..e837e032 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,34 +16,34 @@ env: matrix: include: - - stage: RPI - if: tag IS present - install: - - export D_ARCH="RPI" - - DEFAULT_ARCH=rpi1 make install-docker-deps - - DEFAULT_ARCH=rpi2 make install-docker-deps - - DEFAULT_ARCH=rpi3 make install-docker-deps - - make install-deps-no-envs - script: - - make clean - - DEFAULT_TARGET=rpi1 make build-docker - - DEFAULT_TARGET=rpi2 make build-docker - - DEFAULT_TARGET=rpi3 make build-docker - - make lint - - make run-docker CMD='make test' - - stage: Android - if: tag IS present - install: - - export D_ARCH="Android" - - DEFAULT_ARCH=android make install-docker-deps - - make install-deps-no-envs - script: - - make clean - - DEFAULT_TARGET=android make build-docker - - DEFAULT_TARGET=android-emulator make build-docker - - make lint - - make run-docker CMD='make test' - - make run-docker CMD='make install coveralls ; make test-cover-travis' +# - stage: RPI +# if: tag IS present +# install: +# - export D_ARCH="RPI" +# - DEFAULT_ARCH=rpi1 make install-docker-deps +# - DEFAULT_ARCH=rpi2 make install-docker-deps +# - DEFAULT_ARCH=rpi3 make install-docker-deps +# - make install-deps-no-envs +# script: +# - make clean +# - DEFAULT_TARGET=rpi1 make build-docker +# - DEFAULT_TARGET=rpi2 make build-docker +# - DEFAULT_TARGET=rpi3 make build-docker +# - make lint +# - make run-docker CMD='make test' +# - stage: Android +# if: tag IS present +# install: +# - export D_ARCH="Android" +# - DEFAULT_ARCH=android make install-docker-deps +# - make install-deps-no-envs +# script: +# - make clean +# - DEFAULT_TARGET=android make build-docker +# - DEFAULT_TARGET=android-emulator make build-docker +# - make lint +# - make run-docker CMD='make test' +# - make run-docker CMD='make install coveralls ; make test-cover-travis' - stage: Linux before_install: - source ./ci-scripts/install-$TRAVIS_OS_NAME.sh From ca10e409a5a8ff3c9c47ede5f2d0f36e2c5c42f0 Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Mon, 16 Mar 2020 09:27:16 -0400 Subject: [PATCH 3/6] [ci] restore rpi but not work on tags --- .travis.yml | 56 ++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/.travis.yml b/.travis.yml index e837e032..65cdfbaa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,34 +16,34 @@ env: matrix: include: -# - stage: RPI -# if: tag IS present -# install: -# - export D_ARCH="RPI" -# - DEFAULT_ARCH=rpi1 make install-docker-deps -# - DEFAULT_ARCH=rpi2 make install-docker-deps -# - DEFAULT_ARCH=rpi3 make install-docker-deps -# - make install-deps-no-envs -# script: -# - make clean -# - DEFAULT_TARGET=rpi1 make build-docker -# - DEFAULT_TARGET=rpi2 make build-docker -# - DEFAULT_TARGET=rpi3 make build-docker -# - make lint -# - make run-docker CMD='make test' -# - stage: Android -# if: tag IS present -# install: -# - export D_ARCH="Android" -# - DEFAULT_ARCH=android make install-docker-deps -# - make install-deps-no-envs -# script: -# - make clean -# - DEFAULT_TARGET=android make build-docker -# - DEFAULT_TARGET=android-emulator make build-docker -# - make lint -# - make run-docker CMD='make test' -# - make run-docker CMD='make install coveralls ; make test-cover-travis' + - stage: RPI + if: branch = release*$ + install: + - export D_ARCH="RPI" + - DEFAULT_ARCH=rpi1 make install-docker-deps + - DEFAULT_ARCH=rpi2 make install-docker-deps + - DEFAULT_ARCH=rpi3 make install-docker-deps + - make install-deps-no-envs + script: + - make clean + - DEFAULT_TARGET=rpi1 make build-docker + - DEFAULT_TARGET=rpi2 make build-docker + - DEFAULT_TARGET=rpi3 make build-docker + - make lint + - make run-docker CMD='make test' + - stage: Android + if: branch = release*$ + install: + - export D_ARCH="Android" + - DEFAULT_ARCH=android make install-docker-deps + - make install-deps-no-envs + script: + - make clean + - DEFAULT_TARGET=android make build-docker + - DEFAULT_TARGET=android-emulator make build-docker + - make lint + - make run-docker CMD='make test' + - make run-docker CMD='make install coveralls ; make test-cover-travis' - stage: Linux before_install: - source ./ci-scripts/install-$TRAVIS_OS_NAME.sh From 1ead63c81c168c65368114172ef51d9471dc990c Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Mon, 16 Mar 2020 15:58:10 -0400 Subject: [PATCH 4/6] [ci] Update release step for build app --- .travis.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 65cdfbaa..c2cbce2f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -138,10 +138,8 @@ before_deploy: - export ARCH="$(uname -m)" - export OS="$(uname -s)" - make prepare-release - - if [["$D_ARCH" == "RPI"]]; then DEFAULT_TARGET=rpi1 make build-docker; DEFAULT_TARGET=rpi2 make build; DEFAULT_TARGET=rpi3 make build-docker; fi - - if [["$D_ARCH" == "Android"]]; then DEFAULT_TARGET=android make build-docker; fi - - if [["$D_ARCH" == "Linux"]]; then DEFAULT_TARGET=linux make build-docker; fi - - if [["$D_ARCH" == "MacOS"]]; then make build; fi + - if [[ $D_ARCH == "Linux" ]]; then echo DEFAULT_TARGET=linux make build-docker ; else echo "False"; fi + - if [[ $D_ARCH == "MacOS" ]]; then make build; else echo "False"; fi - ( cd deploy && tar czf ../fibercryptowallet-${VERSION}-${OS}-${ARCH}.tar.gz ./* ) - pwd && ls -l . deploy: From 0e9c23da3ce218a364d5bbb8dc2846fa178a451d Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Mon, 16 Mar 2020 18:55:14 -0400 Subject: [PATCH 5/6] [ci] Remove echo in build on linux releases --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c2cbce2f..2f2694a6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -138,7 +138,7 @@ before_deploy: - export ARCH="$(uname -m)" - export OS="$(uname -s)" - make prepare-release - - if [[ $D_ARCH == "Linux" ]]; then echo DEFAULT_TARGET=linux make build-docker ; else echo "False"; fi + - if [[ $D_ARCH == "Linux" ]]; then DEFAULT_TARGET=linux make build-docker ; else echo "False"; fi - if [[ $D_ARCH == "MacOS" ]]; then make build; else echo "False"; fi - ( cd deploy && tar czf ../fibercryptowallet-${VERSION}-${OS}-${ARCH}.tar.gz ./* ) - pwd && ls -l . From 42cf6048c4376981b1ee36d372eccda8720c231a Mon Sep 17 00:00:00 2001 From: Marcos Maceo Date: Fri, 20 Mar 2020 18:59:34 -0400 Subject: [PATCH 6/6] [ci] Update github token for travis --- .travis.yml | 202 +++++++++++++++++++++++++--------------------------- 1 file changed, 99 insertions(+), 103 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2f2694a6..4932aad3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,76 +1,100 @@ sudo: required language: go go: - - 1.12.6 +- 1.12.6 services: - - docker - - xvfb +- docker +- xvfb go_import_path: github.com/fibercrypto/fibercryptowallet cache: directories: - - $GOPATH/src/github.com/therecipe - - $GOPATH/bin + - "$GOPATH/src/github.com/therecipe" + - "$GOPATH/bin" env: global: - - XARGS="-screen 0 1024x768x24" - + - XARGS="-screen 0 1024x768x24" matrix: include: - - stage: RPI - if: branch = release*$ - install: - - export D_ARCH="RPI" - - DEFAULT_ARCH=rpi1 make install-docker-deps - - DEFAULT_ARCH=rpi2 make install-docker-deps - - DEFAULT_ARCH=rpi3 make install-docker-deps - - make install-deps-no-envs - script: - - make clean - - DEFAULT_TARGET=rpi1 make build-docker - - DEFAULT_TARGET=rpi2 make build-docker - - DEFAULT_TARGET=rpi3 make build-docker - - make lint - - make run-docker CMD='make test' - - stage: Android - if: branch = release*$ - install: - - export D_ARCH="Android" - - DEFAULT_ARCH=android make install-docker-deps - - make install-deps-no-envs - script: - - make clean - - DEFAULT_TARGET=android make build-docker - - DEFAULT_TARGET=android-emulator make build-docker - - make lint - - make run-docker CMD='make test' - - make run-docker CMD='make install coveralls ; make test-cover-travis' - - stage: Linux - before_install: - - source ./ci-scripts/install-$TRAVIS_OS_NAME.sh - install: - - export D_ARCH="Linux" - - make install-docker-deps - - make install-deps-no-envs - - make install-linters - before_script: - - echo "PATH=$PATH"; - - echo "PIP=$PIP"; - - PYTHON=python3 PIP=pip3 make -C tmp/hardware-wallet clean - - PYTHON=python3 PIP=pip3 make -C tmp/hardware-wallet/tiny-firmware/protob install-deps-nanopb - - PYTHON=python3 PIP=pip3 make -C tmp/hardware-wallet/tiny-firmware/protob/nanopb/vendor/nanopb/generator/proto - - PYTHON=python3 PIP=pip3 make -C tmp/hardware-wallet emulator - - make -C ./tmp/hardware-wallet run-emulator & true; - # Run self-tests - - ps aux | grep emulator - - script: - - make clean - - DEFAULT_TARGET=linux make build-docker - - make clean - - make run-docker CMD='make test' - - make run-docker CMD='make test-skyhw' - - make lint - - make run-docker CMD='make install-coveralls ; make test-cover-travis' + - stage: RPI + if: branch = release*$ + install: + - export D_ARCH="RPI" + - DEFAULT_ARCH=rpi1 make install-docker-deps + - DEFAULT_ARCH=rpi2 make install-docker-deps + - DEFAULT_ARCH=rpi3 make install-docker-deps + - make install-deps-no-envs + script: + - make clean + - DEFAULT_TARGET=rpi1 make build-docker + - DEFAULT_TARGET=rpi2 make build-docker + - DEFAULT_TARGET=rpi3 make build-docker + - make lint + - make run-docker CMD='make test' + - stage: Android + if: branch = release*$ + install: + - export D_ARCH="Android" + - DEFAULT_ARCH=android make install-docker-deps + - make install-deps-no-envs + script: + - make clean + - DEFAULT_TARGET=android make build-docker + - DEFAULT_TARGET=android-emulator make build-docker + - make lint + - make run-docker CMD='make test' + - make run-docker CMD='make install coveralls ; make test-cover-travis' + - stage: Linux + before_install: + - source ./ci-scripts/install-$TRAVIS_OS_NAME.sh + install: + - export D_ARCH="Linux" + - make install-docker-deps + - make install-deps-no-envs + - make install-linters + before_script: + - echo "PATH=$PATH"; + - echo "PIP=$PIP"; + - PYTHON=python3 PIP=pip3 make -C tmp/hardware-wallet clean + - PYTHON=python3 PIP=pip3 make -C tmp/hardware-wallet/tiny-firmware/protob install-deps-nanopb + - PYTHON=python3 PIP=pip3 make -C tmp/hardware-wallet/tiny-firmware/protob/nanopb/vendor/nanopb/generator/proto + - PYTHON=python3 PIP=pip3 make -C tmp/hardware-wallet emulator + - make -C ./tmp/hardware-wallet run-emulator & true; + - ps aux | grep emulator + script: + - make clean + - DEFAULT_TARGET=linux make build-docker + - make clean + - make run-docker CMD='make test' + - make run-docker CMD='make test-skyhw' + - make lint + - make run-docker CMD='make install-coveralls ; make test-cover-travis' + - stage: MacOS + os: osx + osx_image: xcode10.2 + before_install: + - source ./ci-scripts/install-$TRAVIS_OS_NAME.sh + install: + - export D_ARCH="MacOS" + - make install-deps + - make install-coveralls + before_script: + - echo "PATH=$PATH"; + - echo "PIP=$PIP"; + - ( sudo Xvfb :99 -ac ${XARGS}; echo "Xvfb ok" )& export DISPLAY=:99 + - PYTHON=python3 PIP=pip3 make -C tmp/hardware-wallet clean + - PYTHON=python3 PIP=pip3 make -C tmp/hardware-wallet/tiny-firmware/protob install-deps-nanopb + - PYTHON=python3 PIP=pip3 make -C tmp/hardware-wallet/tiny-firmware/protob/nanopb/vendor/nanopb/generator/proto + - PYTHON=python3 PIP=pip3 make -C tmp/hardware-wallet emulator + - make -C ./tmp/hardware-wallet run-emulator & true; + - ps aux | grep emulator + script: + - make clean + - make build + - make test + - make test-skyhw + - make build-icon + - make lint + - make test-cover-travis # FIXME: Restore Windows builds # - stage: Windows # os: windows @@ -97,55 +121,27 @@ matrix: # - make test # - make build-icon # - make test-cover-travis - - stage: MacOS - os: osx - osx_image: xcode10.2 - before_install: - - source ./ci-scripts/install-$TRAVIS_OS_NAME.sh - install: - - export D_ARCH="MacOS" - - make install-deps - - make install-coveralls - before_script: - - echo "PATH=$PATH"; - - echo "PIP=$PIP"; - # Start Xvfb on osx - - ( sudo Xvfb :99 -ac ${XARGS}; echo "Xvfb ok" )& export DISPLAY=:99 - - PYTHON=python3 PIP=pip3 make -C tmp/hardware-wallet clean - - PYTHON=python3 PIP=pip3 make -C tmp/hardware-wallet/tiny-firmware/protob install-deps-nanopb - - PYTHON=python3 PIP=pip3 make -C tmp/hardware-wallet/tiny-firmware/protob/nanopb/vendor/nanopb/generator/proto - - PYTHON=python3 PIP=pip3 make -C tmp/hardware-wallet emulator - - make -C ./tmp/hardware-wallet run-emulator & true; - # Run self-tests - - ps aux | grep emulator - script: - - make clean - - make build - - make test - - make test-skyhw - - make build-icon - - make lint - - make test-cover-travis notifications: email: false webhooks: urls: - - https://fathomless-fjord-24024.herokuapp.com/notify - - https://coveralls.io/webhook - + - https://fathomless-fjord-24024.herokuapp.com/notify + - https://coveralls.io/webhook before_deploy: - - export VERSION="$(git describe --tags --exact-match HEAD 2> /dev/null)" - - export ARCH="$(uname -m)" - - export OS="$(uname -s)" - - make prepare-release - - if [[ $D_ARCH == "Linux" ]]; then DEFAULT_TARGET=linux make build-docker ; else echo "False"; fi - - if [[ $D_ARCH == "MacOS" ]]; then make build; else echo "False"; fi - - ( cd deploy && tar czf ../fibercryptowallet-${VERSION}-${OS}-${ARCH}.tar.gz ./* ) - - pwd && ls -l . +- export VERSION="$(git describe --tags --exact-match HEAD 2> /dev/null)" +- export ARCH="$(uname -m)" +- export OS="$(uname -s)" +- make prepare-release +- if [[ $D_ARCH == "Linux" ]]; then DEFAULT_TARGET=linux make build-docker ; else + echo "False"; fi +- if [[ $D_ARCH == "MacOS" ]]; then make build; else echo "False"; fi +- "( cd deploy && tar czf ../fibercryptowallet-${VERSION}-${OS}-${ARCH}.tar.gz ./* + \ )" +- pwd && ls -l . deploy: provider: releases api_key: - secure: DCM8aKdci6IA7dF9a84V6FEK+VkfEGoitre/wdxeZs7z4obKY41MhejHvWe017tuLhWqARwuud4PgEDcypVVDN2zB5d/D94O3JQHIDfL643WWTS7JOd+93vfOVmQ3jcGg5yRwt4T8fH3RUwNgQjagXeWLnoAhgAvUzGeAUN26AUFS4TXMmf0tnfGRGsrd8tMcnmsPxWcmrog1GllJ1m7GQ55ua1FuYV3ldyX6bnxQSx/B73T8pCvmz9OIW14nZVHgPrdOeVgHy2JlA10dKe59i1CTBevbo050CEIAque6RkzW52AQTKksmd/X2GnxODkqaZ8dux5b/uCv8Stht1jebM8AwZID8nmnmlpUHrafuZilu/m3RJ/j7YuF+UsNGOPeLG+z1tb3KcSENihRPsFOh4YHFTPHkDBbMcvg+2EKfbOIOrg/+js7Ycmmjx1NoLZgYpmMuq6mBu/TZDuFmFNVtDwevieG7berfVyvIyr3TJEdW+bm+vHGpdTcZho1cMrSmaB2r9j9UADKrRrRAU7vHCjozufg4+dnGjYHHQNCecpeirsbCymq3d7Wgezkm/LK4c0vDbtHuXo1q5VxrMjizzuBNCmiRyguGt0zSWvemU68x8W+OjmnFNJRyEa/g//2BLBQrn6A3qC+Qv5tn1REClW7xMcZXcDjIjmIW7z2Gw= + secure: d+faEpSLTcV4Xrvmz7D7WOwc5I99zReYxHQJqzixjw4G6qVed30Ra2eUfJ+84kkkuy/xFZKwdR52rZGCeHNxlUr0AeFX385ZuCbVpgyJiHa0h39IckFgOmDei7nUZ43cdAe+GR63W/AePVs+SvKXnh3y+iZMMa2n73AiaX4H8cFLmWPznODW78gED+jmatpKJ43/83/JPhVbliX7nYV61Icgcb1mH6QLNnFMUfxiDZmaRT9lc3xvCZB6cqoKBGf7sAu/bLM9R7VWjr8kBOV8deN9x92vO3p0+ED1s6XS9Ku73wo7VkGsWsqD2c8CMP8F6bHVYx0ixOahKTnRJzHoZVzo1fuMWUev3MxlZwbPVAt4VVVCQxMoj/+ZgQXyPNI6ystPqMpF9q9ot8T6EiwhUITJATtChZqj0nwmlgjS7przGZAe3f1Oj5yFUPk00VAs2qg8UPPHL/tM+gjT0oamqiNr8iNNpmjTLvjbMvaLQLnDSLS0yAnL3nVyfYz//dmkfyhAtKFNu+CxNwGoOptUSdikMEUGows8Q4G0Rw5CmP5+fPOQC71xOQ8l8FX0mNvSQt8sV74MX63xq+eDNOCHdxKHga+ReNNbVK6NFJJLaKatL8E8jD119igB2ZVPuAOCdPTXiQXS+FUjJPCMbmDMgJdWRl+CPQoJwrQjXUqvAGc= file: fibercryptowallet-${VERSION}-${OS}-${D_ARCH}.tar.gz skip_cleanup: true draft: true