Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI #34

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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']
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The VMs fail if the GUI is enabled so I've added headless versions for testing.
"centos-7" was failing with a weird LANG error but I don't this is worth investigating given it's age.

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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Loading