From 07c4c2d14517cb76aa3ba1e291083f60ae3b0d97 Mon Sep 17 00:00:00 2001 From: florianvazelle Date: Wed, 3 Jan 2024 20:47:28 +0100 Subject: [PATCH] ci: parallelize builds --- .github/workflows/release-packaging.yml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-packaging.yml b/.github/workflows/release-packaging.yml index 1240a12..5356ea9 100644 --- a/.github/workflows/release-packaging.yml +++ b/.github/workflows/release-packaging.yml @@ -36,10 +36,20 @@ jobs: [ "${{ env.game_version }}" == "${{ env.BRANCH_NAME }}" ] || exit 2 build: - runs-on: ubuntu-22.04 + runs-on: ${{ matrix.os }} timeout-minutes: 30 needs: [check] + strategy: + matrix: + include: + - os: ubuntu-22.04 + command: export-linux + - os: windows-2022 + command: export-windows + - os: macos-12 + command: export-mac + steps: - uses: actions/checkout@v4 with: @@ -56,12 +66,17 @@ jobs: path: | ~/.mkflower/bin ~/.local/share/godot/export_templates/${{ env.godot_version }}.stable - key: ${{ env.godot_version }} + key: ${{ env.godot_version }}-${{ matrix.os }} - uses: ./.github/actions/setup-x11-drivers + # Retry multiple times, always in CI, godot freeze when reimporting assets - name: Export - run: just export + uses: nick-fields/retry@v2 + with: + timeout_minutes: 10 + max_attempts: 3 + command: just ${{ matrix.command }} - name: Upload artifact uses: actions/upload-artifact@v4 @@ -90,7 +105,7 @@ jobs: path: | ~/.mkflower/bin ~/.local/share/godot/export_templates/${{ env.godot_version }}.stable - key: ${{ env.godot_version }} + key: ${{ env.godot_version }}-${{ matrix.os }} - uses: ./.github/actions/setup-x11-drivers