-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (70 loc) · 3.15 KB
/
e2e-multiple-k8s-clusters.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: "e2e-multiple-k8s-clusters"
on:
pull_request:
paths-ignore:
- "**/*.md"
- "CODEOWNERS"
push:
paths-ignore:
- "**/*.md"
- "CODEOWNERS"
branches:
- "main"
# Cancel any ongoing workflows on the same branch to avoid unnecessary fees.
# cf. https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-and-the-default-behavior
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: "ubuntu-22.04"
#runs-on: mantle_large_runner_16core
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- run: sudo apt-get update
- run: sudo apt-get purge -y apport apport-symptoms fwupd nano netplan.io popularity-contest unattended-upgrades update-manager-core snapd
- run: sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true
- run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /usr/local/share/powershell /usr/share/swift /usr/local/.ghcup /usr/lib/jvm || true
- run: sudo apt-get purge -y $(dpkg-query -W | grep nginx | awk '{print $1}')
- run: sudo apt-get purge -y aria2 ansible azure-cli shellcheck rpm xorriso zsync firefox gfortran-9 google-chrome-stable google-cloud-sdk
- run: sudo apt-get purge -y imagemagick libmagickcore-dev libmagickwand-dev libmagic-dev ant ant-optional mercurial apt-transport-https
- run: sudo apt-get purge -y mono-complete unixodbc-dev yarn chrpath libxft-dev libfreetype6-dev libfontconfig1 libfontconfig1-dev
- run: sudo apt-get purge -y snmp pollinate libpq-dev postgresql-client powershell ruby-full sphinxsearch subversion azure-cli
- run: sudo apt-get purge -y $(dpkg-query -W | grep dotnet | awk '{print $1}')
- run: sudo apt-get autoremove -y >/dev/null 2>&1
- run: sudo apt-get autoclean -y >/dev/null 2>&1
- name: "KVM setup"
run: |-
VIRTUALIZATION_SUPPORT=$(grep -E -q 'vmx|svm' /proc/cpuinfo && echo yes || echo no)
echo ${VIRTUALIZATION_SUPPORT}
if [ "${VIRTUALIZATION_SUPPORT}" != "yes" ]; then
echo "CPU does not support the virtualization feature."
exit 1
fi
sudo apt-get install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils
kvm-ok
sudo adduser `id -un` libvirt
sudo adduser `id -un` kvm
virsh list --all
sudo ls -la /var/run/libvirt/libvirt-sock
sudo chmod 777 /var/run/libvirt/libvirt-sock
sudo ls -la /var/run/libvirt/libvirt-sock
ls -l /dev/kvm
sudo rmmod kvm_amd
sudo rmmod kvm
sudo modprobe -a kvm
sudo modprobe -a kvm_amd
- name: cache go dependencies
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: go-${{ hashFiles('go.sum', 'Makefile', 'versions.mk') }}
restore-keys: |
go-
- run: make -C test/e2e setup
- run: make -C test/e2e test-multiple-k8s-clusters