.travis.yml (5245B)
1 dist: bionic 2 language: python 3 python: 4 - 3.6 5 - 3.7 6 - 3.8 7 git: 8 depth: false 9 before_install: 10 - git tag 11 install: 12 - sudo apt-get -y install libsecp256k1-0 13 - pip install -r contrib/requirements/requirements-travis.txt 14 cache: 15 - pip: true 16 - directories: 17 - /tmp/electrum-build 18 script: 19 - tox 20 after_success: 21 - if [ "$TRAVIS_BRANCH" = "master" ]; then pip install requests && contrib/push_locale; fi 22 - coveralls 23 jobs: 24 include: 25 - name: "Regtest functional tests" 26 language: python 27 python: 3.7 28 install: 29 - sudo add-apt-repository -y ppa:luke-jr/bitcoincore 30 - sudo apt-get -qq update 31 - sudo apt-get install -yq bitcoind 32 - sudo apt-get -y install libsecp256k1-0 33 - pip install .[tests] 34 - pip install electrumx 35 before_script: 36 - electrum/tests/regtest/start_bitcoind.sh 37 - electrum/tests/regtest/start_electrumx.sh 38 script: 39 - python -m unittest electrum/tests/regtest.py 40 after_success: True 41 - name: "Flake8 linter tests" 42 language: python 43 install: pip install flake8 44 script: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics 45 - stage: binary builds 46 if: (branch = master) OR (tag IS present) 47 name: "Windows build" 48 language: c 49 python: false 50 env: 51 - TARGET_OS=Windows 52 services: 53 - docker 54 before_install: # we need a newer version of docker; 20.10+ seems to work 55 - sudo rm -rf /var/lib/apt/lists/* 56 - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 57 - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" 58 - sudo apt-get update 59 - sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce 60 - docker version 61 install: 62 - sudo docker build --no-cache -t electrum-wine-builder-img ./contrib/build-wine/ 63 script: 64 - sudo docker run --name electrum-wine-builder-cont -v $PWD:/opt/wine64/drive_c/electrum --rm --workdir /opt/wine64/drive_c/electrum/contrib/build-wine electrum-wine-builder-img ./build.sh 65 after_success: true 66 - if: (branch = master) OR (tag IS present) 67 name: "Android build" 68 language: python 69 python: 3.7 70 services: 71 - docker 72 install: 73 - pip install requests && ./contrib/pull_locale 74 - ./contrib/make_packages 75 - sudo docker build --no-cache -t electrum-android-builder-img contrib/android 76 script: 77 - sudo chown -R 1000:1000 . 78 # Output something every minute or Travis kills the job 79 - while sleep 60; do echo "=====[ $SECONDS seconds still running ]====="; done & 80 - sudo docker run -it -u 1000:1000 --rm --name electrum-android-builder-cont --env CI=true -v $PWD:/home/user/wspace/electrum --workdir /home/user/wspace/electrum electrum-android-builder-img ./contrib/android/make_apk 81 # kill background sleep loop 82 - kill %1 83 - ls -la bin 84 - if [ $(ls bin | grep -c Electrum-*) -eq 0 ]; then exit 1; fi 85 after_success: true 86 # disabled for now as travis started to always time out: 87 - if: false AND ((branch = master) OR (tag IS present)) 88 name: "MacOS build" 89 os: osx 90 language: c 91 env: 92 - TARGET_OS=macOS 93 python: false 94 install: 95 - git fetch --all --tags 96 script: ./contrib/osx/make_osx 97 after_script: ls -lah dist && md5 dist/* 98 after_success: true 99 - if: (branch = master) OR (tag IS present) 100 name: "AppImage build" 101 language: c 102 python: false 103 services: 104 - docker 105 install: 106 - sudo docker build --no-cache -t electrum-appimage-builder-img ./contrib/build-linux/appimage/ 107 script: 108 - sudo docker run --name electrum-appimage-builder-cont -v $PWD:/opt/electrum --rm --workdir /opt/electrum/contrib/build-linux/appimage electrum-appimage-builder-img ./build.sh 109 after_success: true 110 - if: (branch = master) OR (tag IS present) 111 name: "tarball build" 112 language: c 113 python: false 114 services: 115 - docker 116 before_install: 117 # hack: travis already cloned the repo, but we re-clone now, as we need to have umask set BEFORE cloning 118 - umask 0022 119 - mkdir fresh_clone && cd fresh_clone 120 - git clone https://github.com/$TRAVIS_REPO_SLUG.git && cd electrum 121 - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then git fetch origin pull/$TRAVIS_PULL_REQUEST/merge; fi 122 - git checkout $TRAVIS_COMMIT 123 - echo "Second git clone ready at $PWD" 124 install: 125 - sudo docker build --no-cache -t electrum-sdist-builder-img ./contrib/build-linux/sdist/ 126 script: 127 - echo "Building sdist at $PWD" 128 - sudo docker run --name electrum-sdist-builder-cont -v $PWD:/opt/electrum --rm --workdir /opt/electrum/contrib/build-linux/sdist electrum-sdist-builder-img ./build.sh 129 after_success: true 130 - stage: release check 131 install: 132 - git fetch --all --tags 133 script: 134 - ./contrib/deterministic-build/check_submodules.sh 135 after_success: true 136 if: tag IS present