From 0bd7a660868a8fb0be94aa63da9918152e7156d4 Mon Sep 17 00:00:00 2001 From: nkanaev Date: Fri, 21 Mar 2025 11:45:06 +0000 Subject: [PATCH] reorganise build workflow --- .github/workflows/build.yml | 75 +++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 41 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 81d1d8f..427d6c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,18 +29,6 @@ jobs: id: darwin_amd64_gui cmd: make darwin_amd64_gui out: out/darwin_amd64_gui/yarr.app - - name: Build arm64 - uses: ./.github/actions/prepare - with: - id: darwin_arm64 - cmd: make darwin_arm64 - out: out/darwin_arm64/yarr - - name: Build amd64 - uses: ./.github/actions/prepare - with: - id: darwin_amd64 - cmd: make darwin_amd64 - out: out/darwin_amd64/yarr build_windows: name: Build for Windows @@ -52,40 +40,21 @@ jobs: uses: actions/setup-go@v4 with: go-version: '^1.18' - - name: Setup Zig - uses: mlugg/setup-zig@v1 - with: - version: 0.14.0 - - name: Build arm64 gui - if: false - uses: ./.github/actions/prepare - with: - id: windows_arm64_gui - cmd: make windows_arm64_gui - out: out/windows_arm64_gui/yarr.exe - name: Build amd64 gui uses: ./.github/actions/prepare with: id: windows_amd64_gui cmd: make windows_amd64_gui out: out/windows_amd64_gui/yarr.exe - - name: Remove cache - run: go clean -x -cache - - name: Build arm64 + - name: Build arm64 gui uses: ./.github/actions/prepare with: - id: windows_arm64 - cmd: make windows_arm64 - out: out/windows_arm64/yarr - - name: Build amd64 - uses: ./.github/actions/prepare - with: - id: windows_amd64 - cmd: make windows_amd64 - out: out/windows_amd64/yarr + id: windows_arm64_gui + cmd: make windows_arm64_gui + out: out/windows_arm64_gui/yarr.exe - build_linux: - name: Build for Linux + build_multi_cli: + name: Build for Windows/MacOS/Linux CLI runs-on: ubuntu-22.04 steps: - name: Checkout @@ -98,30 +67,54 @@ jobs: uses: mlugg/setup-zig@v1 with: version: 0.14.0 - - name: Build amd64 + - name: Build linux/amd64 uses: ./.github/actions/prepare with: id: linux_amd64 cmd: make linux_amd64 out: out/linux_amd64/yarr - - name: Build arm64 + - name: Build linux/arm64 uses: ./.github/actions/prepare with: id: linux_arm64 cmd: make linux_arm64 out: out/linux_arm64/yarr - - name: Build armv7 + - name: Build linux/armv7 uses: ./.github/actions/prepare with: id: linux_armv7 cmd: make linux_armv7 out: out/linux_armv7/yarr + - name: Build darwin/arm64 + uses: ./.github/actions/prepare + with: + id: darwin_arm64 + cmd: make darwin_arm64 + out: out/darwin_arm64/yarr + - name: Build darwin/amd64 + uses: ./.github/actions/prepare + with: + id: darwin_amd64 + cmd: make darwin_amd64 + out: out/darwin_amd64/yarr + - name: Build windows/amd64 + uses: ./.github/actions/prepare + with: + id: windows_amd64 + cmd: make windows_amd64 + out: out/windows_amd64/yarr + - name: Build windows/arm64 + uses: ./.github/actions/prepare + with: + id: windows_arm64 + cmd: make windows_arm64 + out: out/windows_arm64/yarr create_release: name: Create Release runs-on: ubuntu-latest if: ${{ startsWith(github.ref, 'refs/tags/') }} - needs: [build_macos, build_windows, build_linux] + needs: [build_macos, build_windows, build_multi_cli] steps: - name: Download Artifacts uses: actions/download-artifact@v4.1.7