From 55b5651d8aba5fff04ebb6ebb29c5274a9590b8c Mon Sep 17 00:00:00 2001 From: jtzhpf Date: Thu, 28 Dec 2023 19:38:29 +0800 Subject: [PATCH] fix qemu --- .../workflows/actions/setup-qemu/action.yml | 34 ++++--------------- 1 file changed, 6 insertions(+), 28 deletions(-) diff --git a/.github/workflows/actions/setup-qemu/action.yml b/.github/workflows/actions/setup-qemu/action.yml index 1732f413bf..9d8a49ce15 100644 --- a/.github/workflows/actions/setup-qemu/action.yml +++ b/.github/workflows/actions/setup-qemu/action.yml @@ -15,12 +15,7 @@ runs: with: path: qemu_build key: qemu-${{ inputs.qemu-version }} - - name: Cache QEMU for loongarch - id: cache-qemu-la - uses: actions/cache/restore@v3 - with: - path: qemu_build_la - key: qemu-6.2.50 + - name: Download and build QEMU if: steps.cache-qemu.outputs.cache-hit != 'true' env: @@ -28,25 +23,14 @@ runs: PREFIX: ${{ github.workspace }}/qemu_build shell: bash run: | + git clone https://github.com/foxsen/qemu-loongarch-runenv qemu-6.2.50 sudo apt-get update && sudo apt-get install -y ninja-build wget https://download.qemu.org/$QEMU_PATH.tar.xz && tar -xJf $QEMU_PATH.tar.xz cd $QEMU_PATH \ && ./configure --prefix=$PREFIX --target-list=x86_64-softmmu,riscv64-softmmu,aarch64-softmmu \ - && make -j > /dev/null 2>&1 \ - && make install - - name: Download and build QEMU for loongarch64 - if: steps.cache-qemu.outputs.cache-hit != 'true' - env: - QEMU_PATH: qemu-6.2.50 - PREFIX: ${{ github.workspace }}/qemu_build_la - shell: bash - run: | - git clone https://github.com/foxsen/qemu.git $QEMU_PATH - cd $QEMU_PATH - git checkout loongarch - ./configure --prefix=$PREFIX --target-list=loongarch64-softmmu \ - && make -j > /dev/null 2>&1 \ - && make install + && make -j > /dev/null 2>&1 + cp qemu-6.2.50/qemu/x86_64/qemu-system-loongarch64 $PREFIX/bin + make install - uses: actions/cache/save@v3 if: steps.cache-qemu.outputs.cache-hit != 'true' @@ -54,17 +38,11 @@ runs: path: qemu_build key: qemu-${{ inputs.qemu-version }} - - uses: actions/cache/save@v3 - if: steps.cache-qemu.outputs.cache-hit != 'true' - with: - path: qemu_build - key: qemu-6.2.50 - - name: Install QEMU shell: bash run: | echo "$PWD/qemu_build/bin" >> $GITHUB_PATH - echo "$PWD/qemu_build_la/bin" >> $GITHUB_PATH + - name: Verify installation shell: bash run: |