|
9 | 9 |
|
10 | 10 | env: |
11 | 11 | CARGO_TERM_COLOR: always |
| 12 | + QEMU_TARGETS: |- |
| 13 | + x86_64-softmmu,x86_64-linux-user |
| 14 | + i386-softmmu,i386-linux-user |
| 15 | + arm-softmmu,arm-linux-user |
| 16 | + aarch64-softmmu,aarch64-linux-user |
| 17 | + mipsel-softmmu,mipsel-linux-user |
| 18 | + mips-softmmu,mips-linux-user |
| 19 | + ppc-softmmu,ppc-linux-user |
| 20 | + riscv32-softmmu,riscv32-linux-user |
| 21 | + riscv64-softmmu,riscv64-linux-user |
| 22 | + hexagon-linux-user |
12 | 23 |
|
13 | 24 | concurrency: |
14 | 25 | group: ${{ github.workflow }}-${{ github.ref }} |
15 | 26 | cancel-in-progress: true |
16 | 27 |
|
17 | 28 | jobs: |
18 | 29 | build: |
| 30 | + name: build (${{ matrix.name }}) |
19 | 31 | runs-on: ubuntu-24.04 |
20 | | - container: registry.gitlab.com/qemu-project/qemu/qemu/ubuntu2204:latest |
| 32 | + strategy: |
| 33 | + fail-fast: false |
| 34 | + matrix: |
| 35 | + include: |
| 36 | + # QEMU binary builds + tests |
| 37 | + - name: gcc |
| 38 | + cc: gcc |
| 39 | + cxx: g++ |
| 40 | + llvm: "" |
| 41 | + configure_extra: "" |
| 42 | + test: true |
| 43 | + - name: clang-22 |
| 44 | + cc: clang |
| 45 | + cxx: clang++ |
| 46 | + llvm: "22" |
| 47 | + configure_extra: "" |
| 48 | + test: true |
| 49 | + |
| 50 | + # LibAFL QEMU builds |
| 51 | + - name: gcc-static-lib |
| 52 | + cc: gcc |
| 53 | + cxx: g++ |
| 54 | + llvm: "" |
| 55 | + configure_extra: "--as-static-lib" |
| 56 | + test: false |
| 57 | + - name: gcc-shared-lib |
| 58 | + cc: gcc |
| 59 | + cxx: g++ |
| 60 | + llvm: "" |
| 61 | + configure_extra: "--as-shared-lib" |
| 62 | + test: false |
21 | 63 | steps: |
22 | 64 | - uses: actions/checkout@v4 |
23 | 65 | - name: check submodules |
24 | 66 | run: | |
25 | 67 | git config --global --add safe.directory "$GITHUB_WORKSPACE" |
26 | 68 | git submodule status |
| 69 | + - name: Install QEMU dependencies |
| 70 | + uses: ./.github/actions/apt |
| 71 | + - name: Install LLVM |
| 72 | + if: ${{ matrix.llvm != '' }} |
| 73 | + uses: ./.github/actions/setup-llvm |
| 74 | + with: |
| 75 | + version: ${{ matrix.llvm }} |
| 76 | + - name: Setup ccache |
| 77 | + uses: hendrikmuhs/ccache-action@v1.2 |
| 78 | + with: |
| 79 | + key: ${{ matrix.name }} |
| 80 | + max-size: 2G |
27 | 81 | - name: Build QEMU |
28 | | - run: mkdir -p build && cd build && ../configure --enable-werror --disable-docs --enable-fdt=system && make -j $(expr $(nproc) + 1) |
| 82 | + run: | |
| 83 | + targets=$(echo "$QEMU_TARGETS" | paste -sd,) |
| 84 | + mkdir -p build && cd build |
| 85 | + ../configure --cc="ccache ${{ matrix.cc }}" --cxx="ccache ${{ matrix.cxx }}" \ |
| 86 | + --target-list="$targets" ${{ matrix.configure_extra }} \ |
| 87 | + --enable-werror --disable-docs --enable-fdt=system |
| 88 | + make -j $(expr $(nproc) + 1) |
| 89 | + - name: Test QEMU |
| 90 | + if: ${{ matrix.test }} |
| 91 | + run: make -C build check |
0 commit comments