github.com/rck/u-root@v0.0.0-20180106144920-7eb602e381bb/travis.sh (about) 1 #!/bin/bash 2 3 set -e 4 5 echo "Check vendored dependencies" 6 (dep status) 7 8 echo "Build u-root" 9 (go build u-root.go) 10 11 echo "-----------------------> Initial bb test" 12 (./u-root -build=bb) 13 mv /tmp/initramfs.linux_amd64.cpio /tmp/i2 14 15 # Test for reproducible initramfs in busybox mode 16 echo "-----------------------> Second bb test" 17 (./u-root -build=bb) 18 19 echo "-----------------------> cmp bb test output (test reproducibility)" 20 cmp /tmp/initramfs.linux_amd64.cpio /tmp/i2 21 which go 22 23 # Test all architectures we care about. At some point we may just 24 # grow the build matrix. 25 echo "-----------------------> ARM64 test build" 26 (GOARCH=arm64 ./u-root -build=bb) 27 echo "-----------------------> ARM7 test build" 28 (GOARCH=arm GOARM=7 ./u-root -build=bb) 29 echo "-----------------------> ppc64le test build" 30 (GOARCH=ppc64le ./u-root -build=bb) 31 32 echo "-----------------------> First ramfs test" 33 (./u-root -build=source --tmpdir=/tmp/u-root) 34 35 echo "-----------------------> build all tools" 36 (cd cmds && CGO_ENABLED=0 go build -a -installsuffix uroot -ldflags '-s' ./...) 37 38 echo "-----------------------> What got built? ls -l cmds/*" 39 ls -l cmds/* 40 41 echo "-----------------------> go test" 42 (cd cmds && CGO_ENABLED=0 go test -a -installsuffix uroot -ldflags '-s' ./...) 43 44 echo "-----------------------> test -cover" 45 (cd cmds && CGO_ENABLED=0 go test -cover ./...) 46 (cd pkg && CGO_ENABLED=0 go test -cover ./...) 47 48 echo "-----------------------> go vet" 49 (go tool vet cmds pkg) 50 51 # is it go-gettable? 52 echo "-----------------------> test go-gettable" 53 (go get github.com/u-root/u-root) 54 55 echo "Did it blend"