From 0c663f9624000ee09f243dbafa66046d7114f9d4 Mon Sep 17 00:00:00 2001 From: Daniel Schmidt Date: Tue, 24 Sep 2024 20:40:31 +0200 Subject: [PATCH] chore: split libusb builds in itch release --- .github/workflows/build.yml | 147 ++++++++++++++++++------------------ 1 file changed, 75 insertions(+), 72 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 163bc0b..39e6376 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,27 +10,27 @@ jobs: name: Build snd-frontend runs-on: ubuntu-latest steps: - - name: Checkout Repo - uses: actions/checkout@v3 - - name: Setup Node.js environment - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: npm - cache-dependency-path: frontend/package-lock.json - - name: Install Frontend Dependencies - working-directory: frontend - run: npm ci - - name: Build Frontend - working-directory: frontend - run: npm run build - - name: Archive Frontend - uses: actions/upload-artifact@v4 - with: - name: snd-frontend - path: frontend/dist - if-no-files-found: error - + - name: Checkout Repo + uses: actions/checkout@v3 + - name: Setup Node.js environment + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: npm + cache-dependency-path: frontend/package-lock.json + - name: Install Frontend Dependencies + working-directory: frontend + run: npm ci + - name: Build Frontend + working-directory: frontend + run: npm run build + - name: Archive Frontend + uses: actions/upload-artifact@v4 + with: + name: snd-frontend + path: frontend/dist + if-no-files-found: error + build-linux-app: name: Build ${{ matrix.artifact-name }} runs-on: ubuntu-latest @@ -63,19 +63,19 @@ jobs: armv: "7" artifact-name: "snd-linux-armv7-headless" steps: - - name: Checkout Repo - uses: actions/checkout@v3 - - name: Install libusb - if: matrix.libusb - run: sudo apt-get install libusb-1.0-0-dev pkg-config && pkg-config --cflags libusb-1.0 - - name: Build App - uses: ./.github/actions/build-app - with: - os: linux - arch: ${{ matrix.arch }} - tags: ${{ matrix.tags }} - artifact-name: ${{ matrix.artifact-name }} - + - name: Checkout Repo + uses: actions/checkout@v3 + - name: Install libusb + if: matrix.libusb + run: sudo apt-get install libusb-1.0-0-dev pkg-config && pkg-config --cflags libusb-1.0 + - name: Build App + uses: ./.github/actions/build-app + with: + os: linux + arch: ${{ matrix.arch }} + tags: ${{ matrix.tags }} + artifact-name: ${{ matrix.artifact-name }} + build-windows-app: name: Build ${{ matrix.artifact-name }} runs-on: windows-latest @@ -93,29 +93,29 @@ jobs: tags: "ELECTRON LIBUSB" artifact-name: "snd-windows-libusb" steps: - - name: Checkout Repo - uses: actions/checkout@v3 - - name: Prepare libusb - if: matrix.libusb - uses: msys2/setup-msys2@v2 - with: - path-type: inherit # needs access to other executables like go - install: git mingw-w64-x86_64-cc mingw-w64-x86_64-pkg-config mingw-w64-x86_64-libusb - - name: Check for libusb - if: matrix.libusb - shell: msys2 {0} - run: | - pkg-config --cflags libusb-1.0 - pkg-config --libs libusb-1.0 - ls D:/a/_temp/msys64/mingw64/bin/libusb-1.0.dll - - name: Build App - uses: ./.github/actions/build-app - with: - os: windows - arch: ${{ matrix.arch }} - tags: ${{ matrix.tags }} - artifact-name: ${{ matrix.artifact-name }} - libusb-path: ${{ matrix.libusb && 'D:/a/_temp/msys64/mingw64/bin/libusb-1.0.dll' || null }} + - name: Checkout Repo + uses: actions/checkout@v3 + - name: Prepare libusb + if: matrix.libusb + uses: msys2/setup-msys2@v2 + with: + path-type: inherit # needs access to other executables like go + install: git mingw-w64-x86_64-cc mingw-w64-x86_64-pkg-config mingw-w64-x86_64-libusb + - name: Check for libusb + if: matrix.libusb + shell: msys2 {0} + run: | + pkg-config --cflags libusb-1.0 + pkg-config --libs libusb-1.0 + ls D:/a/_temp/msys64/mingw64/bin/libusb-1.0.dll + - name: Build App + uses: ./.github/actions/build-app + with: + os: windows + arch: ${{ matrix.arch }} + tags: ${{ matrix.tags }} + artifact-name: ${{ matrix.artifact-name }} + libusb-path: ${{ matrix.libusb && 'D:/a/_temp/msys64/mingw64/bin/libusb-1.0.dll' || null }} # macOS AMD64 build-darwin-amd64-app: @@ -136,18 +136,18 @@ jobs: mac-app-bundle: "true" steps: - - name: Checkout Repo - uses: actions/checkout@v3 - - name: Install libusb - if: matrix.libusb - run: brew install libusb pkg-config && pkg-config --cflags libusb-1.0 - - name: Build App - uses: ./.github/actions/build-app - with: - os: darwin - arch: ${{ matrix.arch }} - tags: ${{ matrix.tags }} - artifact-name: ${{ matrix.artifact-name }} + - name: Checkout Repo + uses: actions/checkout@v3 + - name: Install libusb + if: matrix.libusb + run: brew install libusb pkg-config && pkg-config --cflags libusb-1.0 + - name: Build App + uses: ./.github/actions/build-app + with: + os: darwin + arch: ${{ matrix.arch }} + tags: ${{ matrix.tags }} + artifact-name: ${{ matrix.artifact-name }} # macOS ARM64 (m1, m2, m3, mX) build-darwin-arm64-app: @@ -230,6 +230,9 @@ jobs: BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }} run: | ./butler push snd-windows-libusb-${{ github.ref_name }}.zip BigJk/sales-n-dungeons:windows-amd64 --userversion ${{ github.ref_name }} - ./butler push snd-macos-m1-libusb-${{ github.ref_name }}.zip BigJk/sales-n-dungeons:macos-m1 --userversion ${{ github.ref_name }} - ./butler push snd-macos-intel-libusb-${{ github.ref_name }}.zip BigJk/sales-n-dungeons:macos-intel --userversion ${{ github.ref_name }} - ./butler push snd-linux-amd64-gui-libusb-${{ github.ref_name }}.zip BigJk/sales-n-dungeons:linux-amd64 --userversion ${{ github.ref_name }} \ No newline at end of file + ./butler push snd-macos-m1-${{ github.ref_name }}.zip BigJk/sales-n-dungeons:macos-m1 --userversion ${{ github.ref_name }} + ./butler push snd-macos-intel-${{ github.ref_name }}.zip BigJk/sales-n-dungeons:macos-intel --userversion ${{ github.ref_name }} + ./butler push snd-linux-amd64-gui-${{ github.ref_name }}.zip BigJk/sales-n-dungeons:linux-amd64 --userversion ${{ github.ref_name }} + ./butler push snd-macos-m1-libusb-${{ github.ref_name }}.zip BigJk/sales-n-dungeons:macos-m1-libusb --userversion ${{ github.ref_name }} + ./butler push snd-macos-intel-libusb-${{ github.ref_name }}.zip BigJk/sales-n-dungeons:macos-intel-libusb --userversion ${{ github.ref_name }} + ./butler push snd-linux-amd64-gui-libusb-${{ github.ref_name }}.zip BigJk/sales-n-dungeons:linux-amd64-libusb --userversion ${{ github.ref_name }}