diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 787b462..3ffce8a 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -8,15 +8,26 @@ jobs: strategy: fail-fast: False matrix: - os: ['ubuntu-1804', 'ubuntu-2204', 'centos-7', 'centos-8'] + os: ['ubuntu-1804-headless', 'ubuntu-2204-headless', 'centos-8'] name: ${{ matrix.os }} - runs-on: macos-12 + runs-on: ubuntu-latest steps: + - name: Install pre requisites + run: sudo apt install virtualbox vagrant + #run: sudo apt update && sudo apt install virtualbox vagrant + + - name: Open up network interfaces for VM + run: | + sudo mkdir -p /etc/vbox/ + sudo touch /etc/vbox/networks.conf + sudo sh -c "echo '* 192.168.0.0/16' > /etc/vbox/networks.conf" + sudo sh -c "echo '* 3001::/64' >> /etc/vbox/networks.conf" + - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Cache Vagrant boxes - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.vagrant.d/boxes key: ${{ runner.os }}-vagrant-${{ matrix.os }} diff --git a/Vagrantfile.ubuntu-1804-headless b/Vagrantfile.ubuntu-1804-headless new file mode 100755 index 0000000..8558ec7 --- /dev/null +++ b/Vagrantfile.ubuntu-1804-headless @@ -0,0 +1,21 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +VAGRANTFILE_API_VERSION = "2" +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + + config.vm.define "metomi-vm-ubuntu-1804" + config.vm.box = "bento/ubuntu-18.04" + # Remove "desktop" from the args below if only accessing via SSH + # Remove "mosrs" from the args below if not accessing the Met Office Science Repository Service + config.vm.provision :shell, path: "install.sh", args: "ubuntu 1804 desktop mosrs" + config.ssh.forward_x11 = true + + config.vm.provider "virtualbox" do |v| + v.name = "metomi-vm-ubuntu-1804" + # Modify the line below if you need more than 1GB RAM + v.memory = 1024 + v.cpus = 2 + end + +end diff --git a/Vagrantfile.ubuntu-2204-headless b/Vagrantfile.ubuntu-2204-headless new file mode 100755 index 0000000..cd8d8d0 --- /dev/null +++ b/Vagrantfile.ubuntu-2204-headless @@ -0,0 +1,21 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +VAGRANTFILE_API_VERSION = "2" +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + + config.vm.define "metomi-vm-ubuntu-2204" + config.vm.box = "bento/ubuntu-22.04" + # Remove "desktop" from the args below if only accessing via SSH + # Remove "mosrs" from the args below if not accessing the Met Office Science Repository Service + config.vm.provision :shell, path: "install.sh", args: "ubuntu 2204 desktop mosrs" + config.ssh.forward_x11 = true + + config.vm.provider "virtualbox" do |v| + v.name = "metomi-vm-ubuntu-2204" + # Modify the line below if you need more than 1GB RAM + v.memory = 1024 + v.cpus = 2 + end + +end