Skip to content

Commit

Permalink
ci: test ci through archlinux docker
Browse files Browse the repository at this point in the history
  • Loading branch information
yfblock committed May 4, 2024
1 parent e6e1553 commit 1d82117
Showing 1 changed file with 35 additions and 18 deletions.
53 changes: 35 additions & 18 deletions .github/workflows/example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1d82117

Please sign in to comment.