diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1f4d3f4a30..4397db92b3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -93,8 +93,8 @@ jobs: uses: actions/cache@v4 with: path: /tmp/xemu-ccache - key: cache-wincross-${{ runner.os }}-${{ matrix.configuration }}-${{ github.sha }} - restore-keys: cache-wincross-${{ runner.os }}-${{ matrix.configuration }}- + key: cache-wincross-${{ runner.os }}-${{ matrix.arch }}-${{ matrix.configuration }}-${{ github.sha }} + restore-keys: cache-wincross-${{ runner.os }}-${{ matrix.arch }}-${{ matrix.configuration }}- - name: Pull Docker image run: docker pull $DOCKER_IMAGE_NAME - name: Compile @@ -163,28 +163,44 @@ jobs: path: dist Ubuntu: - name: Build for Ubuntu (${{ matrix.configuration }}) - runs-on: ubuntu-latest + name: Build for Ubuntu (${{matrix.arch}}, ${{ matrix.configuration }}) + runs-on: ${{ matrix.runs-on }} needs: Init strategy: matrix: include: - - configuration: Debug + - arch: x86_64 + configuration: Debug build_param: --debug - artifact_name: xemu-ubuntu-debug - artifact_filename: xemu-ubuntu-debug.tgz - - configuration: Release + artifact_name: xemu-ubuntu-x86_64-debug + artifact_filename: xemu-ubuntu-x86_64-debug.tgz + runs-on: ubuntu-24.04 + - arch: x86_64 + configuration: Release build_param: - artifact_name: xemu-ubuntu-release - artifact_filename: xemu-ubuntu-release.tgz + artifact_name: xemu-ubuntu-x86_64-release + artifact_filename: xemu-ubuntu-x86_64-release.tgz + runs-on: ubuntu-22.04 + - arch: aarch64 + configuration: Debug + build_param: --debug + artifact_name: xemu-ubuntu-aarch64-debug + artifact_filename: xemu-ubuntu-aarch64-debug.tgz + runs-on: ubuntu-24.04-arm + - arch: aarch64 + configuration: Release + build_param: + artifact_name: xemu-ubuntu-aarch64-release + artifact_filename: xemu-ubuntu-aarch64-release.tgz + runs-on: ubuntu-24.04-arm steps: - name: Initialize compiler cache id: cache uses: actions/cache@v4 with: path: /tmp/xemu-ccache - key: cache-${{ runner.os }}-${{ matrix.configuration }}-${{ github.sha }} - restore-keys: cache-${{ runner.os }}-${{ matrix.configuration }}- + key: cache-${{ runner.os }}-${{ matrix.arch }}-${{ matrix.configuration }}-${{ github.sha }} + restore-keys: cache-${{ runner.os }}-${{ matrix.arch }}-${{ matrix.configuration }}- - name: Download source package uses: actions/download-artifact@v4 with: @@ -231,8 +247,8 @@ jobs: ccache -s - name: Generate AppImage run: | - wget --no-verbose https://github.com/linuxdeploy/linuxdeploy/releases/latest/download/linuxdeploy-x86_64.AppImage - chmod +x linuxdeploy-x86_64.AppImage + wget --no-verbose https://github.com/linuxdeploy/linuxdeploy/releases/latest/download/linuxdeploy-${{ matrix.arch }}.AppImage + chmod +x linuxdeploy-${{ matrix.arch }}.AppImage ar x dist/*.deb mkdir appimage @@ -244,7 +260,7 @@ jobs: export VERSION=$VERSION-dbg fi - ./linuxdeploy-x86_64.AppImage --output appimage --appdir appimage + ./linuxdeploy-${{ matrix.arch }}.AppImage --output appimage --appdir appimage mv xemu-*.AppImage dist - name: Bundle artifacts run: | @@ -388,13 +404,13 @@ jobs: echo "XEMU_VERSION=$(cat XEMU_VERSION)" >> $GITHUB_ENV - name: Extract Ubuntu artifacts run: | - pushd dist/xemu-ubuntu-release - tar xvf xemu-ubuntu-release.tgz - popd - - pushd dist/xemu-ubuntu-debug - tar xvf xemu-ubuntu-debug.tgz - popd + for arch in x86_64 aarch64; do + for config in release debug; do + pushd dist/xemu-ubuntu-$arch-$config + tar xvf xemu-ubuntu-$arch-$config.tgz + popd + done + done # Architecture tags were recently added to the Windows release path. Provide an alias with the former name for a while. - name: Add transitionary package alias run: | @@ -419,8 +435,10 @@ jobs: dist/xemu-win-x86_64-release-pdb/xemu-win-release.zip dist/xemu-macos-universal-release/xemu-macos-universal-release.zip dist/xemu-macos-universal-debug/xemu-macos-universal-debug.zip - dist/xemu-ubuntu-release/xemu/xemu-v${{ env.XEMU_VERSION }}-x86_64.AppImage - dist/xemu-ubuntu-debug/xemu/xemu-v${{ env.XEMU_VERSION }}-dbg-x86_64.AppImage + dist/xemu-ubuntu-x86_64-debug/xemu/xemu-v${{ env.XEMU_VERSION }}-dbg-x86_64.AppImage + dist/xemu-ubuntu-x86_64-release/xemu/xemu-v${{ env.XEMU_VERSION }}-x86_64.AppImage + dist/xemu-ubuntu-aarch64-debug/xemu/xemu-v${{ env.XEMU_VERSION }}-dbg-aarch64.AppImage + dist/xemu-ubuntu-aarch64-release/xemu/xemu-v${{ env.XEMU_VERSION }}-aarch64.AppImage - name: Trigger website update uses: benc-uk/workflow-dispatch@v1.2.2 with: