From 321d631ffec7fd4abae435be0a882d27e31c6542 Mon Sep 17 00:00:00 2001 From: Guillaume Ballet Date: Thu, 5 Sep 2019 23:27:32 +0200 Subject: [PATCH] See if payload can be downloaded Test if some commands indeed work More tests Try sudo Try chroot only Work around some build issues More feedback from Travis' builds Run linter in the chroot Don't copy the disk image Fix rsyncs Show progress to keep travis active Add GOPATH in env First attempt at downloading packages Download root image Fix GOROOT Install instead of linting Also run tests Bind /proc and /sys for the tests to work --- .travis.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3a40ff5834..380e63fd04 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: go go_import_path: github.com/ethereum/go-ethereum -sudo: false +sudo: true jobs: include: # This builder only tests code linters on latest version of Go @@ -15,6 +15,24 @@ jobs: script: - go run build/ci.go lint + - stage: build + os: linux + dist: bionic + before_install: + - sudo apt install -y qemu-user-static xz-utils # qemu-system qemu-efi debootstrap + script: + - mkdir -p chrootdir + - wget https://github.com/gballet/ubuntu-18.4-go-rootfs/releases/download/ubuntu1804-go113/rootfs_v1.txz + - sudo tar xfJ rootfs_v1.txz -C chrootdir + - rm rootfs_v1.txz + - sudo cp `which qemu-aarch64-static` chrootdir/usr/bin + - sudo mkdir -p chrootdir/${TRAVIS_BUILD_DIR} + - sudo rsync -a --exclude 'chrootdir' ${TRAVIS_BUILD_DIR}/ chrootdir/${TRAVIS_BUILD_DIR}/ + - sudo mount --bind /proc chrootdir/proc + - sudo mount --bind /sys chrootdir/sys + - sudo chroot chrootdir qemu-aarch64-static /bin/bash -c "export GOROOT=/usr/local/go; export PATH=\$PATH:\$GOROOT/bin; cd ${TRAVIS_BUILD_DIR} && go run build/ci.go install" + - sudo chroot chrootdir qemu-aarch64-static /bin/bash -c "export GOROOT=/usr/local/go; export PATH=\$PATH:\$GOROOT/bin; cd ${TRAVIS_BUILD_DIR} && go run build/ci.go test" + - stage: build os: linux dist: xenial