|
| 1 | +name: Hexagon QEMU CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ master, hex-next ] |
| 6 | + pull_request: |
| 7 | + branches: [ master, hex-next ] |
| 8 | + workflow_dispatch: |
| 9 | + |
| 10 | +jobs: |
| 11 | + build-and-test: |
| 12 | + name: ${{ matrix.os }} |
| 13 | + runs-on: ${{ matrix.os }} |
| 14 | + continue-on-error: ${{ matrix.os == 'windows-latest' }} |
| 15 | + strategy: |
| 16 | + fail-fast: false |
| 17 | + matrix: |
| 18 | + include: |
| 19 | + - os: ubuntu-22.04 |
| 20 | + target_list: hexagon-linux-user,hexagon-softmmu |
| 21 | + target_list_master: hexagon-linux-user |
| 22 | + - os: windows-latest |
| 23 | + target_list: hexagon-softmmu |
| 24 | + target_list_master: hexagon-softmmu |
| 25 | + |
| 26 | + steps: |
| 27 | + - name: Checkout QEMU |
| 28 | + uses: actions/checkout@v4 |
| 29 | + |
| 30 | + # Ubuntu setup |
| 31 | + - name: Install Ubuntu dependencies |
| 32 | + if: runner.os == 'Linux' |
| 33 | + run: | |
| 34 | + sudo apt-get update |
| 35 | + sudo apt-get install -y \ |
| 36 | + build-essential \ |
| 37 | + ninja-build \ |
| 38 | + pkg-config \ |
| 39 | + libglib2.0-dev \ |
| 40 | + libfdt-dev \ |
| 41 | + libpixman-1-dev \ |
| 42 | + libslirp-dev \ |
| 43 | + python3-venv \ |
| 44 | + python3-pip |
| 45 | +
|
| 46 | + # Windows setup |
| 47 | + - name: Setup MSYS2 for Windows |
| 48 | + if: runner.os == 'Windows' |
| 49 | + uses: msys2/setup-msys2@v2 |
| 50 | + with: |
| 51 | + msystem: MINGW64 |
| 52 | + update: true |
| 53 | + install: >- |
| 54 | + bison |
| 55 | + diffutils |
| 56 | + flex |
| 57 | + git |
| 58 | + grep |
| 59 | + make |
| 60 | + sed |
| 61 | + mingw-w64-x86_64-gcc |
| 62 | + mingw-w64-x86_64-glib2 |
| 63 | + mingw-w64-x86_64-pixman |
| 64 | + mingw-w64-x86_64-pkgconf |
| 65 | + mingw-w64-x86_64-libslirp |
| 66 | + mingw-w64-x86_64-dtc |
| 67 | + mingw-w64-x86_64-ninja |
| 68 | + mingw-w64-x86_64-python |
| 69 | + mingw-w64-x86_64-curl |
| 70 | + mingw-w64-x86_64-zstd |
| 71 | +
|
| 72 | + # Configure and build |
| 73 | + - name: Configure QEMU (Ubuntu) |
| 74 | + if: runner.os == 'Linux' |
| 75 | + run: | |
| 76 | + mkdir build |
| 77 | + cd build |
| 78 | + TARGET_LIST=${{ github.ref == 'refs/heads/master' && matrix.target_list_master || matrix.target_list }} |
| 79 | + ../configure \ |
| 80 | + --target-list=$TARGET_LIST \ |
| 81 | + --enable-slirp \ |
| 82 | + --enable-fdt \ |
| 83 | + --enable-plugins \ |
| 84 | + --disable-docs |
| 85 | +
|
| 86 | + - name: Configure QEMU (Windows) |
| 87 | + if: runner.os == 'Windows' |
| 88 | + shell: msys2 {0} |
| 89 | + run: | |
| 90 | + mkdir build |
| 91 | + cd build |
| 92 | + TARGET_LIST=${{ github.ref == 'refs/heads/master' && matrix.target_list_master || matrix.target_list }} |
| 93 | + ../configure --target-list=$TARGET_LIST --enable-slirp --enable-fdt --disable-docs |
| 94 | +
|
| 95 | + - name: Build QEMU (Ubuntu) |
| 96 | + if: runner.os == 'Linux' |
| 97 | + run: | |
| 98 | + cd build |
| 99 | + ninja |
| 100 | +
|
| 101 | + - name: Build QEMU (Windows) |
| 102 | + if: runner.os == 'Windows' |
| 103 | + shell: msys2 {0} |
| 104 | + run: | |
| 105 | + cd build |
| 106 | + ninja -v |
| 107 | +
|
| 108 | + # Test hexagon-linux-user (Ubuntu only) |
| 109 | + - name: Test hexagon-linux-user |
| 110 | + if: runner.os == 'Linux' |
| 111 | + run: | |
| 112 | + cd build |
| 113 | + make V=1 check-tcg |
| 114 | +
|
| 115 | + # Test hexagon-softmmu (Ubuntu) |
| 116 | + - name: Test hexagon-softmmu (Ubuntu) |
| 117 | + if: runner.os == 'Linux' |
| 118 | + run: | |
| 119 | + cd build |
| 120 | + make V=1 check-functional |
| 121 | +
|
| 122 | + # Test hexagon-softmmu (Windows) |
| 123 | + - name: Test hexagon-softmmu (Windows) |
| 124 | + if: runner.os == 'Windows' |
| 125 | + shell: msys2 {0} |
| 126 | + run: | |
| 127 | + cd build |
| 128 | + make V=1 check-functional |
| 129 | +
|
| 130 | + # Upload test logs |
| 131 | + - name: Upload test logs |
| 132 | + if: always() |
| 133 | + uses: actions/upload-artifact@v4 |
| 134 | + with: |
| 135 | + name: test-logs-${{ matrix.os }} |
| 136 | + path: | |
| 137 | + build/tests/results/ |
| 138 | + build/meson-logs/ |
| 139 | + build/**/*.log |
| 140 | + retention-days: 7 |
0 commit comments