From c1b3b71dda117868a46f2bb293823f94871e91ff Mon Sep 17 00:00:00 2001 From: Maximilian Kratz Date: Tue, 5 Dec 2023 16:07:20 +0100 Subject: [PATCH 1/3] Switches back to self-hosted Actions runners --- .github/workflows/vagrant-up.yml | 16 ++++++++-------- README.md | 4 +++- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/vagrant-up.yml b/.github/workflows/vagrant-up.yml index 41cd20d..fab01c0 100644 --- a/.github/workflows/vagrant-up.yml +++ b/.github/workflows/vagrant-up.yml @@ -22,15 +22,16 @@ on: jobs: vagrant-provision: - # Running on macOS, because macOS-based GitHub-hosted action runners do support nested virtualization. + # Running on self-hosted system(s), because GitHub-hosted action runners did break too often. # https://github.com/actions/runner-images/issues/433 - runs-on: macos-12 - + runs-on: [self-hosted] steps: + - name: clean up old VMs + run: | + vboxmanage list vms | \ + grep -o -P '(?<={).*(?=})' | \ + while read line ; do vboxmanage unregistervm $line --delete ; done - uses: actions/checkout@v3 - - name: install dependencies - run: | - brew install wget unzip gnu-tar gnu-sed - name: show Vagrant version run: vagrant --version - name: run vagrant up @@ -45,9 +46,8 @@ jobs: vboxmanage export emoflon -o emoflon.ovf sed -i -e '//,/<\/BIOS>/d' emoflon.ovf sed -i -e '//,/<\/RemoteDisplay>/d' emoflon.ovf - gtar -cvf emoflon.ova emoflon.ovf emoflon-disk001.vmdk + tar -cvf emoflon.ova emoflon.ovf emoflon-disk001.vmdk rm -rf emoflon.ovf emoflon-disk001.vmdk - # ^gtar (to use gnu-tar) instead of macOS tar - name: upload artifact uses: actions/upload-artifact@v3 with: diff --git a/README.md b/README.md index a6ac9f3..88454ff 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,8 @@ Unfortunately, only the macOS-based GitHub-hosted action runners do support nest Therefore, we've adapted the CI-configuration to provision the **eMoflon-IBeX-VM** on a macOS-based runner until nested virtualization support gets added to the Linux-based runners. +Unfortunately, these workflows did break **very often** lately so we switched back to self-hosted Linux-based runners. + ### Self-hosted Linux-based runners Currently, all actions must be run by a self-hosted GitHub runner, because GitHub-hosted runners do not provide the VT-x flag: @@ -62,4 +64,4 @@ Required packages (at least): - `VirtualBox` - `vagrant` -**Please keep in mind that your runner (VM) needs the virtualization flag enabled and at least 6 GB of RAM!** +**Please keep in mind that your runner (VM) needs the virtualization flag enabled and at least 10 GB of RAM!** From a65df5610f3f0bd2b1fb6eb1e21a139cfdedba03 Mon Sep 17 00:00:00 2001 From: Maximilian Kratz Date: Tue, 5 Dec 2023 16:29:54 +0100 Subject: [PATCH 2/3] Adds a script for the basic runner setup --- runner-setup.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 runner-setup.sh diff --git a/runner-setup.sh b/runner-setup.sh new file mode 100644 index 0000000..b20bccc --- /dev/null +++ b/runner-setup.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set -e + +USERNAME=maxkratz + +# utilities + sudo +apt-get update +apt-get install -yq sudo tmux htop wget grep sed gpg unzip tar +/sbin/adduser $USERNAME sudo + +# VirtualBox +wget -O- -q https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --dearmour -o /usr/share/keyrings/oracle_vbox_2016.gpg +echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle_vbox_2016.gpg] http://download.virtualbox.org/virtualbox/debian bookworm contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list + +apt-get update +apt-get install -yq virtualbox-7.0 + +# Vagrant +apt-get install -yq vagrant + +echo "=> Prerequisites installed. Ready for GitHub Actions runner installation." From a3a49ed2ea7ca627ef6bc63d5dcea73fe8b159b7 Mon Sep 17 00:00:00 2001 From: Maximilian Kratz Date: Tue, 5 Dec 2023 16:35:06 +0100 Subject: [PATCH 3/3] CI: Specify runner group --- .github/workflows/vagrant-up.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/vagrant-up.yml b/.github/workflows/vagrant-up.yml index fab01c0..c19e5ac 100644 --- a/.github/workflows/vagrant-up.yml +++ b/.github/workflows/vagrant-up.yml @@ -24,7 +24,9 @@ jobs: vagrant-provision: # Running on self-hosted system(s), because GitHub-hosted action runners did break too often. # https://github.com/actions/runner-images/issues/433 - runs-on: [self-hosted] + runs-on: + group: Default + labels: [self-hosted, Linux, X64] steps: - name: clean up old VMs run: |