Using sequencial builds, both jobs take almost 2h to build. By using the matrix strategy we can build the jobs in parallel, reducing the total build time to 1h12m (as of v5.1.0-rc2).
Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- .github/workflows/build.sh | 8 ++++---- .github/workflows/win.yml | 23 +++++++---------------- 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index c430a367be..4f2c6b56f3 100755 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -7,10 +7,10 @@ #~ set -e set -x -ARCH=$1 -DLLS="libgcc_s_sjlj-1.dll libgomp-1.dll libstdc++-6.dll" - -if test "$ARCH" != "i686"; then +if test "$1" == "32"; then + ARCH=i686 + DLLS="libgcc_s_sjlj-1.dll libgomp-1.dll libstdc++-6.dll" +else ARCH=x86_64 DLLS="libgcc_s_seh-1.dll libgomp-1.dll libstdc++-6.dll" fi diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 81cf48530f..afd827db8e 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -9,26 +9,17 @@ name: Cross build for Windows on: [push] jobs: - build32: + build: + strategy: + matrix: + arch: [32, 64] if: github.repository == 'qemu/qemu' runs-on: [ubuntu-20.04] steps: - uses: actions/checkout@v2 - - name: Build QEMU installer (32 bit) - run: .github/workflows/build.sh i686 + - name: Build QEMU installer (${{ matrix.arch }} bit) + run: .github/workflows/build.sh ${{ matrix.arch }} - uses: actions/upload-artifact@v1 with: - name: QEMU Installer Windows 32 bit - path: dist - - build64: - if: github.repository == 'qemu/qemu' - runs-on: [ubuntu-20.04] - steps: - - uses: actions/checkout@v2 - - name: Build QEMU installer (64 bit) - run: .github/workflows/build.sh x86_64 - - uses: actions/upload-artifact@v1 - with: - name: QEMU Installer Windows 64 bit + name: QEMU Installer Windows ${{ matrix.arch }} bit path: dist -- 2.21.3