diff --git a/.github/workflows/example.yaml b/.github/workflows/example.yaml index 94a1e12..fca12f7 100644 --- a/.github/workflows/example.yaml +++ b/.github/workflows/example.yaml @@ -5,32 +5,49 @@ on: push: jobs: - build-qemu: - runs-on: ubuntu-latest - steps: - - run: sudo apt update - - name: Install dependencies - run: sudo apt -y install autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev \ - build-essential bison flex texinfo gperf libtool patchutils bc \ - libexpat-dev pkg-config libglib2.0-dev libpixman-1-dev libsdl2-dev libslirp-dev \ - tmux python3 python3-pip ninja-build - - name: Get QEMU Source Code - run: wget https://github.com/qemu/qemu/archive/refs/tags/v9.0.0.tar.gz - - name: extract qemu source code - run: tar zxvf v9.0.0.tar.gz - - name: build qemu 9.0 - run: mkdir v9.0.0/build && cd v9.0.0/build && ../configure --target-list=riscv64-softmmu,aarch64-softmmu,x86_64-softmmu,loongarch64-softmmu - - name: make qemu 9.0 - run: cd v9.0.0/build && make -j8 + # build-qemu: + # runs-on: ubuntu-latest + # steps: + # - run: sudo apt update + # - name: Install dependencies + # run: sudo apt -y install autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev \ + # build-essential bison flex texinfo gperf libtool patchutils bc \ + # libexpat-dev pkg-config libglib2.0-dev libpixman-1-dev libsdl2-dev libslirp-dev \ + # tmux python3 python3-pip ninja-build + # - name: Get QEMU Source Code + # run: wget https://github.com/qemu/qemu/archive/refs/tags/v9.0.0.tar.gz + # - name: extract qemu source code + # run: tar zxvf v9.0.0.tar.gz + # - name: build qemu 9.0 + # run: mkdir v9.0.0/build && cd v9.0.0/build && ../configure --target-list=riscv64-softmmu,aarch64-softmmu,x86_64-softmmu,loongarch64-softmmu + # - name: make qemu 9.0 + # run: cd v9.0.0/build && make -j8 + test: runs-on: ubuntu-latest - needs: build-qemu + container: + image: archlinux:base + volumes: + - .:/code strategy: fail-fast: false matrix: arch: [x86_64, riscv64, aarch64, loongarch64] + include: + - arch: aarch64 + packages: qemu-system-aarch64 + - arch: riscv64 + packages: qemu-system-riscv64 + - arch: x86_64 + packages: qemu-system-x86 + - arch: loongarch64 + packages: qemu-system-x86 steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@nightly - name: Test ${{ matrix.arch }} run: cd example && make ARCH=${{ matrix.arch }} build + - name: Install Qemu + run: yes | pacman -Syy ${{ matrix.packages }} + - name: Test run + run: make ARCH=${{ matrix.arch }} run