Skip to content

Commit

Permalink
Try on ubuntu
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Nola <[email protected]>
  • Loading branch information
dereknola committed Feb 12, 2024
1 parent e9ce86c commit 1b900a1
Showing 1 changed file with 28 additions and 24 deletions.
52 changes: 28 additions & 24 deletions .github/workflows/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ jobs:
strategy:
fail-fast: false
matrix:
vm: [centos-7, rocky-8, rocky-9, fedora, opensuse-leap, ubuntu-2004, ubuntu-2204]
# vm: [centos-7, rocky-8, rocky-9, fedora, opensuse-leap, ubuntu-2004, ubuntu-2204]
vm: [rocky-8, ubuntu-2204]
max-parallel: 3
defaults:
run:
Expand All @@ -41,15 +42,36 @@ jobs:
- name: "Checkout"
uses: actions/checkout@v4
with: {fetch-depth: 1}
- name: Show the host info
run: |
set -x
uname -a
cat /etc/os-release
cat /proc/cpuinfo
free -mt
- uses: actions/checkout@v4
- name: "Vagrant Cache"
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.vagrant.d/boxes
~/.vagrant.d/gems
/root/.vagrant.d/boxes
/root/.vagrant.d/gems
key: install-${{ hashFiles(format('tests/install/{0}/Vagrantfile', matrix.vm)) }}
id: vagrant-cache
continue-on-error: true
- name: Set up vagrant
run: |
# Canonical's Vagrant 2.2.19 dpkg cannot download Fedora 38 image: https://bugs.launchpad.net/vagrant/+bug/2017828
# So we have to install Vagrant >= 2.3.1 from the upstream: https://github.com/opencontainers/runc/blob/v1.1.8/.cirrus.yml#L41-L49
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo sed -i 's/^# deb-src/deb-src/' /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -y libvirt-daemon libvirt-daemon-system vagrant
sudo systemctl enable --now libvirtd
sudo apt-get build-dep -y vagrant ruby-libvirt
sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libvirt-dev ruby-bundler ruby-dev zlib1g-dev
sudo vagrant plugin install vagrant-libvirt
- name: "Vagrant Plugin(s)"
run: vagrant plugin install vagrant-k3s vagrant-reload vagrant-scp
- name: "Download k3s binary"
Expand All @@ -58,27 +80,9 @@ jobs:
name: k3s
path: tests/install/${{ matrix.vm }}
- name: "Vagrant Up"
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
# Workaround for https://github.com/nick-fields/retry/issues/89
command: cd tests/install/${{ matrix.vm }} && vagrant up --no-provision
on_retry_command: cd tests/install/${{ matrix.vm }} && vagrant destroy -f
retry_wait_seconds: 30
- name: On Failure, Debug VM status, capture logs
if: ${{ failure() || cancelled() }}
run: |
logsDir=$(vboxmanage list vms --long | grep Logs | awk '{print $3" "$4}')
cp "$logsDir"/VBox.log /tmp/${{ matrix.vm }}.log
ls /tmp/${{ matrix.vm }}.log
- name: On Failure, Upload VM logs
if: ${{ failure() || cancelled() }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.vm }}.log
path: /tmp/${{ matrix.vm }}.log
- name: "Upload k3s binary"
cd tests/install/${{ matrix.vm }} && vagrant up --no-provision
- name: "Upload k3s binaryto VM"
run: |
chmod +x k3s
vagrant scp k3s /tmp/k3s
Expand Down

0 comments on commit 1b900a1

Please sign in to comment.