Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

jobs:
test:
name: Headless tests
runs-on: macos-14
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip

- name: Install dependencies
run: pip install -r requirements.txt

- name: Bridge tests (mappings, key dispatch, BLE lifecycle)
run: python tests/test_bridge.py

- name: DSU server tests (cemuhook protocol over UDP)
run: python tests/test_dsu.py

build:
name: Build .app + DMG
runs-on: macos-14
needs: test
# Building is slower — only on main and manual runs
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip

- name: Build DMG
run: ./build_dmg.sh

- name: Upload DMG artifact
uses: actions/upload-artifact@v4
with:
name: Switch2Bridge-Installer
path: dist/Switch2Bridge-Installer.dmg
if-no-files-found: error
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

A Python menubar app that connects to the Switch 2 Pro Controller via BLE and translates inputs to keyboard presses for use with emulators like Ryujinx.

[![CI](https://github.com/mlstr0m/switch2bridge-macos/actions/workflows/ci.yml/badge.svg)](https://github.com/mlstr0m/switch2bridge-macos/actions/workflows/ci.yml)
[![macOS](https://img.shields.io/badge/macOS-Ventura%2B-blue?logo=apple)](https://www.apple.com/macos)
[![Python](https://img.shields.io/badge/Python-3.9%2B-green?logo=python)](https://python.org)
[![License](https://img.shields.io/badge/License-MIT-yellow)](LICENSE)
Expand Down
6 changes: 4 additions & 2 deletions build_dmg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,7 @@ echo " To test: open dist/${DMG_NAME}.dmg"
echo "═══════════════════════════════════════════════════════════"
echo ""

# Open in Finder
open dist
# Open in Finder (skip on CI / headless)
if [ -z "${CI:-}" ]; then
open dist
fi
Loading