@@ -6,6 +6,9 @@ on: workflow_call
66permissions :
77 contents : read
88
9+ env :
10+ UMF_DIR : " /home/runner/work/unified-memory-framework/unified-memory-framework"
11+
912jobs :
1013 qemu-build :
1114 name : Qemu
@@ -44,10 +47,10 @@ jobs:
4447 cat > user-data << EOF
4548 #cloud-config
4649
47- # Add a 'testuser ' user to the system with a password
50+ # Add a 'runner ' user to the system with a password
4851 users:
4952 - default
50- - name: testuser
53+ - name: runner
5154 gecos: Test User
5255 primary_group: wheel
5356 groups: users
6164 chpasswd:
6265 list: |
6366 root:password
64- testuser :password
67+ runner :password
6568 expire: False
6669 EOF
6770
@@ -82,12 +85,18 @@ jobs:
8285 run : |
8386 umf/scripts/qemu/start_qemu.sh default.xml
8487
85- # Copy UMF repository's content into the home dir in QEMU
86- rsync -az -e "ssh -p 2222" ${{github.workspace}}/umf/ [email protected] :/home/testuser/ 87- ssh [email protected] -p 2222 -t "sudo chown -R testuser:users /home/testuser" 88+ ssh [email protected] -p 2222 -t "sudo chown -R runner:users /home/runner" 89+
90+ # Coverage (lcov) has to be run in the same directory on all runners:
91+ # /home/runner/work/unified-memory-framework/unified-memory-framework/build
92+ # so we have to create the same path here.
93+ ssh [email protected] -p 2222 -t "mkdir -p ${{env.UMF_DIR}}" 94+
95+ # Copy UMF repository's content into QEMU.
96+ rsync -az -e "ssh -p 2222" ${{github.workspace}}/umf/ [email protected] :${{env.UMF_DIR}}/ 8897
89- ssh testuser @127.0.0.1 -p 2222 -t "bash /home/testuser/ scripts/qemu/run-build.sh"
90- ssh testuser @127.0.0.1 -p 2222 -t "sudo shutdown -h now"
98+ ssh runner @127.0.0.1 -p 2222 -t "bash ${{env.UMF_DIR}}/ scripts/qemu/run-build.sh COVERAGE "
99+ ssh runner @127.0.0.1 -p 2222 -t "sudo shutdown -h now"
91100
92101 - name : Run tests in QEMU
93102 run : |
@@ -102,6 +111,13 @@ jobs:
102111 echo "\n ### Testing ${config_name} ###"
103112 umf/scripts/qemu/start_qemu.sh ${config_name}
104113
105- ssh [email protected] -p 2222 -t "bash /home/testuser/scripts/qemu/run-tests.sh" 106- ssh [email protected] -p 2222 -t "sudo shutdown -h now" 114+ ssh [email protected] -p 2222 -t "bash ${{env.UMF_DIR}}/scripts/qemu/run-tests.sh COVERAGE ${config_name}" 115+ scp -r -P 2222 [email protected] :/home/runner/coverage ./ 116+ ssh [email protected] -p 2222 -t "sudo shutdown -h now" 107117 done
118+ ls -al ./coverage
119+
120+ - uses : actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
121+ with :
122+ name : exports-coverage-qemu-all
123+ path : coverage
0 commit comments