|
| 1 | +on: |
| 2 | + push: |
| 3 | + branches: |
| 4 | + - master |
| 5 | +jobs: |
| 6 | + build: |
| 7 | + strategy: |
| 8 | + matrix: |
| 9 | + include: |
| 10 | + - os: linux |
| 11 | + arch: x64 |
| 12 | + runner: ubuntu-24.04 |
| 13 | + - os: linux |
| 14 | + arch: arm64 |
| 15 | + runner: ubuntu-24.04-arm64 |
| 16 | + - os: macos |
| 17 | + arch: x64 |
| 18 | + runner: macos-15-intel |
| 19 | + - os: macos |
| 20 | + arch: arm64 |
| 21 | + runner: macos-15 |
| 22 | + runs-on: ${{ matrix.runner }} |
| 23 | + steps: |
| 24 | + - uses: actions/checkout@v4 |
| 25 | + with: |
| 26 | + submodules: 'recursive' |
| 27 | + |
| 28 | + # Linux dependencies |
| 29 | + - name: Install Linux dependencies |
| 30 | + if: matrix.os == 'linux' |
| 31 | + run: | |
| 32 | + sudo apt update |
| 33 | + sudo apt install -y autoconf libglib2.0-dev libpixman-1-dev libsdl2-dev build-essential |
| 34 | + curl https://pyenv.run | bash |
| 35 | + export PYENV_ROOT="$HOME/.pyenv" |
| 36 | + export PATH="$PYENV_ROOT/bin:$PATH" |
| 37 | + eval "$(pyenv init -)" |
| 38 | + pyenv install 2.7.18 |
| 39 | + echo "$HOME/.pyenv/bin" >> $GITHUB_PATH |
| 40 | + echo "$HOME/.pyenv/shims" >> $GITHUB_PATH |
| 41 | +
|
| 42 | + # macOS dependencies |
| 43 | + - name: Install macOS dependencies |
| 44 | + if: matrix.os == 'macos' |
| 45 | + run: | |
| 46 | + brew update |
| 47 | + brew install autoconf pyenv sdl2 zlib pixman glib gettext pcre2 |
| 48 | + pyenv install 2.7 |
| 49 | +
|
| 50 | + # Configure (Linux) |
| 51 | + - name: Configure build |
| 52 | + if: matrix.os == 'linux' |
| 53 | + run: | |
| 54 | + ./configure \ |
| 55 | + --with-coroutine=gthread \ |
| 56 | + --disable-werror \ |
| 57 | + --disable-mouse \ |
| 58 | + --disable-cocoa \ |
| 59 | + --enable-debug \ |
| 60 | + --enable-sdl \ |
| 61 | + --with-sdlabi=2.0 \ |
| 62 | + --target-list=arm-softmmu \ |
| 63 | + --extra-cflags=-DSTM32_UART_NO_BAUD_DELAY \ |
| 64 | + --extra-ldflags=-g \ |
| 65 | + --disable-vnc-jpeg \ |
| 66 | + --disable-vnc-png \ |
| 67 | + --disable-curses \ |
| 68 | + --disable-gnutls \ |
| 69 | + --disable-nettle \ |
| 70 | + --disable-libssh2 \ |
| 71 | + --disable-vnc-sasl \ |
| 72 | + --disable-gcrypt \ |
| 73 | + --disable-bzip2 \ |
| 74 | + --disable-lzo \ |
| 75 | + --disable-libusb \ |
| 76 | + --python=$HOME/.pyenv/versions/2.7.18/bin/python |
| 77 | +
|
| 78 | + # Configure (macOS) |
| 79 | + - name: Configure build |
| 80 | + if: matrix.os == 'macos' |
| 81 | + run: | |
| 82 | + ./configure \ |
| 83 | + --with-coroutine=gthread \ |
| 84 | + --disable-werror \ |
| 85 | + --disable-mouse \ |
| 86 | + --disable-cocoa \ |
| 87 | + --enable-debug \ |
| 88 | + --enable-sdl \ |
| 89 | + --with-sdlabi=2.0 \ |
| 90 | + --target-list=arm-softmmu \ |
| 91 | + --extra-cflags=-DSTM32_UART_NO_BAUD_DELAY \ |
| 92 | + --extra-ldflags=-g \ |
| 93 | + --disable-vnc-jpeg \ |
| 94 | + --disable-vnc-png \ |
| 95 | + --disable-curses \ |
| 96 | + --disable-gnutls \ |
| 97 | + --disable-nettle \ |
| 98 | + --disable-libssh2 \ |
| 99 | + --disable-vnc-sasl \ |
| 100 | + --disable-gcrypt \ |
| 101 | + --disable-bzip2 \ |
| 102 | + --disable-lzo \ |
| 103 | + --disable-libusb \ |
| 104 | + --python=/Users/runner/.pyenv/versions/2.7.18/bin/python |
| 105 | +
|
| 106 | + - name: Build |
| 107 | + run: make |
| 108 | + |
| 109 | + # Package macOS libraries |
| 110 | + - name: Package macOS libraries |
| 111 | + if: matrix.os == 'macos' |
| 112 | + run: | |
| 113 | + mkdir -p lib |
| 114 | + cp -r pc-bios lib/ |
| 115 | + cp $(brew --prefix pixman)/lib/libpixman-1.0.dylib lib/ |
| 116 | + cp $(brew --prefix sdl2)/lib/libSDL2-2.0.0.dylib lib/ |
| 117 | + cp $(brew --prefix glib)/lib/libgthread-2.0.0.dylib lib/ |
| 118 | + cp $(brew --prefix glib)/lib/libglib-2.0.0.dylib lib/ |
| 119 | + cp $(brew --prefix gettext)/lib/libintl.8.dylib lib/ |
| 120 | + cp $(brew --prefix pcre2)/lib/libpcre2-8.0.dylib lib/ |
| 121 | +
|
| 122 | + # Upload artifacts |
| 123 | + - uses: actions/upload-artifact@v4 |
| 124 | + with: |
| 125 | + name: qemu-system-arm-${{ matrix.os }}-${{ matrix.arch }} |
| 126 | + path: arm-softmmu/qemu-system-arm |
| 127 | + |
| 128 | + - uses: actions/upload-artifact@v4 |
| 129 | + if: matrix.os == 'linux' |
| 130 | + with: |
| 131 | + name: pc-bios-${{ matrix.os }}-${{ matrix.arch }} |
| 132 | + path: pc-bios/ |
| 133 | + |
| 134 | + - uses: actions/upload-artifact@v4 |
| 135 | + if: matrix.os == 'macos' |
| 136 | + with: |
| 137 | + name: lib-${{ matrix.os }}-${{ matrix.arch }} |
| 138 | + path: lib/ |
0 commit comments