Debian Codegraph @

Vagrantfile

raw
1 GOVERSION = "1.17.8"
2
3 Vagrant.configure("2") do |config|
4 config.vm.define "ubuntu" do |ubuntu|
5 ubuntu.vm.box = "generic/ubuntu2004"
6 end
7 config.vm.define "freebsd" do |freebsd|
8 freebsd.vm.box = "generic/freebsd13"
9 end
10 config.ssh.forward_agent = true
11 config.vm.synced_folder ".", "/home/vagrant/go/src/github.com/mistifyio/go-zfs", create: true
12 config.vm.provision "shell", inline: <<-EOF
13 set -euxo pipefail
14
15 os=$(uname -s|tr '[A-Z]' '[a-z]')
16 case $os in
17 linux) apt-get update -y && apt-get install -y --no-install-recommends gcc libc-dev zfsutils-linux ;;
18 esac
19
20 cd /tmp
21 curl -fLO --retry-max-time 30 --retry 10 https://go.dev/dl/go#{GOVERSION}.$os-amd64.tar.gz
22 tar -C /usr/local -zxf go#{GOVERSION}.$os-amd64.tar.gz
23 ln -nsf /usr/local/go/bin/go /usr/local/bin/go
24 rm -rf go*.tar.gz
25
26 chown -R vagrant:vagrant /home/vagrant/go
27 cd /home/vagrant/go/src/github.com/mistifyio/go-zfs
28 go test -c
29 sudo ./go-zfs.test -test.v
30 CGO_ENABLED=0 go test -c
31 sudo ./go-zfs.test -test.v
32 EOF
33 end