Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dpmatthews committed Mar 26, 2024
1 parent 5ca6446 commit 3af8a4c
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
21 changes: 21 additions & 0 deletions Vagrantfile.ubuntu-1804-headless
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions Vagrantfile.ubuntu-2204-headless
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3af8a4c

Please sign in to comment.