ci/qemu: use a tarball to xfer source code to guest
authorVincent Fu <vincent.fu@samsung.com>
Fri, 27 Sep 2024 20:37:31 +0000 (20:37 +0000)
committerVincent Fu <vincent.fu@samsung.com>
Wed, 2 Oct 2024 21:15:40 +0000 (17:15 -0400)
Instead of faking a GitHub Actions runner environment, just create a
source code tarball and transfer it to the guest VM. This is simpler and
does not depend on the continued existence of the action used
previously.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
.github/workflows/qemu.yml

index f987b33c097792dbd42c5ab3be6456d4921e0b0a..db71fbe8171e8480e320179b012790b9057e319a 100644 (file)
@@ -57,6 +57,7 @@ jobs:
     env:
       DISTRO: debian-12
       SSHCMD: ssh root@localhost -p 2022
+      SCPCMD: scp -P 2022
       CI_TARGET_BUILD: linux
       CI_TARGET_OS: debian
 
@@ -64,6 +65,11 @@ jobs:
     - name: Check out repository
       uses: actions/checkout@v4
 
+    - name: Create tarball containing repository
+      run: |
+        git archive --format=tar.gz -o fio-src.tar.gz --prefix=fio/ HEAD
+        git log -1
+
     - name: Create guest VM image
       uses: ./.github/actions/create-guest-image
       with:
@@ -83,11 +89,10 @@ jobs:
         host_key: true
         options: ${{ matrix.device }}
 
-    - name: Clone fio on guest
+    - name: Transfer fio source to guest
       run: |
-          $SSHCMD "apt-get update && apt-get install -qq git"
-          $SSHCMD "git clone https://github.com/taiki-e/checkout-action --branch v1.3.0"
-          $SSHCMD "mkdir fio && cd fio && ../checkout-action/main.sh && git log -1"
+          $SCPCMD fio-src.tar.gz root@localhost:/root/
+          $SSHCMD "tar xzf fio-src.tar.gz"
 
     - name: Install dependencies on guest
       run: $SSHCMD "cd fio && ./ci/actions-install.sh"