From 04f80569659565d286073ade39537420e558076c Mon Sep 17 00:00:00 2001 From: Anton Maklakov Date: Thu, 9 Nov 2023 11:02:48 +0700 Subject: [PATCH] wip: ci Win --- .github/workflows/build.yml | 65 +++++++++++++++++++++++++++++++++---- 1 file changed, 58 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b7aaf51c1345..9e845fd2f44f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,7 +38,7 @@ jobs: echo "REPOSITORY_URL=$REPOSITORY_URL" >> "$GITHUB_OUTPUT" echo $REPOSITORY_URL - Build: + Build-Linux: needs: [ Vars ] strategy: fail-fast: false @@ -51,7 +51,6 @@ jobs: runs_on: ubuntu-20.04 run_prerequisites: "sudo ./.github/workflows/scripts/prerequisites-linux-amd64.sh" run_configure: "./.github/workflows/scripts/configure-linux-amd64.sh" - shell: bash -e {0} - platform: aarch64-linux-gnu runs_on: ubuntu-20.04 @@ -59,12 +58,9 @@ jobs: container: ubuntu:20.04 run_prerequisites: "./.github/workflows/scripts/prerequisites-cross-linux-arm64.sh" run_configure: "./.github/workflows/scripts/configure-cross-linux-arm64.sh" - shell: bash -e {0} + runs-on: ${{ matrix.runs_on }} container: ${{ matrix.container }} - defaults: - run: - shell: ${{ matrix.shell }} steps: - uses: actions/checkout@v4 @@ -105,9 +101,64 @@ jobs: path: | dist + Build-Windows: + needs: [ Vars ] + strategy: + fail-fast: false + matrix: + platform: [win-x86_64] + target: [xtensa-softmmu, riscv32-softmmu] + include: + - platform: win-x86_64 + runs_on: windows-2022 + extra_configure_args: "" + shell: msys2 {0} + runs-on: ${{ matrix.runs_on }} + defaults: + run: + shell: ${{ matrix.shell }} + steps: + - uses: actions/checkout@v4 + + - name: Install prerequisites (${{ matrix.target }} @ ${{ matrix.platform }}) + uses: msys2/setup-msys2@v2 + with: + cache: true + msystem: mingw64 + install: >- + mingw-w64-x86_64-python + mingw-w64-x86_64-ninja + mingw-w64-x86_64-gcc + mingw-w64-x86_64-glib2 + mingw-w64-x86_64-pkg-config + mingw-w64-x86_64-pixman + mingw-w64-x86_64-libgcrypt + mingw-w64-x86_64-libslirp + diffutils git + - name: Configure (${{ matrix.target }} @ ${{ matrix.platform }}) + run: | + which -a python + which -a python3 + python3 --version + ./configure \ + --prefix=$PWD/install/qemu \ + --target-list=xtensa-softmmu \ + --with-pkgversion="dev-55" \ + --enable-gcrypt \ + --enable-slirp \ + --disable-user \ + --disable-capstone \ + --disable-vnc \ + --disable-sdl \ + --disable-docs \ + || (cat meson-logs/meson-log.txt && false) + - name: Build (${{ matrix.target }} @ ${{ matrix.platform }}) + run: | + ninja -C build install + Upload: if: startsWith(github.ref, 'refs/tags/') - needs: [ Vars, Build ] + needs: [ Vars, Build-Linux ] runs-on: ubuntu-latest steps : - name: Create a source archive