@@ -3,9 +3,6 @@ name: Qemu
3
3
4
4
on : workflow_call
5
5
6
- env :
7
- CI_BRANCH : " ${{ github.head_ref || github.ref_name }}"
8
-
9
6
permissions :
10
7
contents : read
11
8
19
16
uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
20
17
with :
21
18
fetch-depth : 0
19
+ path : umf
22
20
23
21
- name : Enable KVM
24
22
run : |
31
29
sudo apt-get update
32
30
sudo apt-get install -y qemu-system genisoimage qemu-utils \
33
31
libvirt-clients libvirt-daemon-system libvirt-daemon virtinst bridge-utils
34
- pip install -r scripts/qemu/requirements.txt
32
+ pip install -r umf/ scripts/qemu/requirements.txt
35
33
36
34
- name : Add user to kvm group
37
35
run : sudo usermod -a -G kvm,libvirt $USER
@@ -82,33 +80,27 @@ jobs:
82
80
83
81
- name : Build UMF in QEMU
84
82
run : |
85
- scripts/qemu/start_qemu.sh scripts/qemu/configs/default.xml
86
-
87
- if [ ${{ github.event_name }} = 'pull_request' ]; then
88
- CI_REPO="${{ github.event.pull_request.head.repo.full_name }}"
89
- else
90
- CI_REPO="$GITHUB_REPOSITORY"
91
- fi
83
+ umf/scripts/qemu/start_qemu.sh default.xml
92
84
93
- scp -P 2222 ${{github.workspace}}/scripts/qemu/run-build.sh [email protected] :/home/cxltest
94
- scp -P 2222 ${{github.workspace}}/scripts/qemu/run-tests.sh [email protected] : /home/cxltest
85
+ rsync -az -e "ssh -p 2222" ${{github.workspace}}/umf/ [email protected] :/home/cxltest/
86
+ ssh [email protected] -p 2222 -t "sudo chown -R cxltest:users /home/cxltest"
95
87
96
- ssh [email protected] -p 2222 -t "bash /home/cxltest/run-build.sh https://github.com/$CI_REPO ${{env.CI_BRANCH}} "
88
+ ssh [email protected] -p 2222 -t "bash /home/cxltest/scripts/qemu/ run-build.sh"
97
89
ssh [email protected] -p 2222 -t "sudo shutdown -h now"
98
90
99
91
- name : Run tests in QEMU
100
92
run : |
101
- for config_file in scripts/qemu/configs/*.xml; do
102
- config_name=$(basename $config_file .xml )
93
+ for config_file in umf/ scripts/qemu/configs/*.xml; do
94
+ config_name=$(basename $config_file)
103
95
104
96
while ps -aux | grep qemu-system-x86_64 | grep -q -v grep; do
105
97
echo "Waiting for QEMU to shut down..."
106
98
sleep 5
107
99
done
108
100
109
101
echo "\n ### Testing ${config_name} ###"
110
- scripts/qemu/start_qemu.sh $config_file
102
+ umf/ scripts/qemu/start_qemu.sh ${config_name}
111
103
112
- ssh [email protected] -p 2222 -t "bash /home/cxltest/run-tests.sh"
104
+ ssh [email protected] -p 2222 -t "bash /home/cxltest/scripts/qemu/ run-tests.sh"
113
105
ssh [email protected] -p 2222 -t "sudo shutdown -h now"
114
106
done
0 commit comments