Skip to content

Commit

Permalink
chore: split libusb builds in itch release
Browse files Browse the repository at this point in the history
  • Loading branch information
BigJk committed Sep 24, 2024
1 parent 227fcc6 commit 0c663f9
Showing 1 changed file with 75 additions and 72 deletions.
147 changes: 75 additions & 72 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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 }}
./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 }}

0 comments on commit 0c663f9

Please sign in to comment.