Skip to content

Commit

Permalink
fix qemu
Browse files Browse the repository at this point in the history
  • Loading branch information
jtzhpf committed Dec 28, 2023
1 parent a7758a7 commit 55b5651
Showing 1 changed file with 6 additions and 28 deletions.
34 changes: 6 additions & 28 deletions .github/workflows/actions/setup-qemu/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,56 +15,34 @@ 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:
QEMU_PATH: qemu-${{ inputs.qemu-version }}
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'
with:
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: |
Expand Down

0 comments on commit 55b5651

Please sign in to comment.