Files
furumi-tui/.github/workflows/opendeck.yml
T

106 lines
3.5 KiB
YAML

name: OpenDeck plugin
on:
workflow_call:
workflow_dispatch:
pull_request:
paths:
- 'integrations/opendeck/**'
- 'integrations/control-protocol/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/opendeck.yml'
- '.github/workflows/release.yml'
permissions:
contents: read
jobs:
build:
name: Plugin / ${{ matrix.target }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: ubuntu-24.04-arm
target: aarch64-unknown-linux-gnu
- os: macos-latest
target: aarch64-apple-darwin
- os: macos-15-intel
target: x86_64-apple-darwin
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
targets: ${{ matrix.target }}
- name: Check formatting
run: cargo fmt -p furumi-opendeck -- --check
- name: Test native renderer and simulated hosts
run: cargo test -p furumi-opendeck --all-targets --locked
- name: Test shared settings across action inspectors
run: node integrations/opendeck/tests/property-inspector.cjs
- name: Clippy
run: cargo clippy -p furumi-opendeck --all-targets --locked
- name: Build native plugin
run: cargo build -p furumi-opendeck --release --locked --target ${{ matrix.target }}
- name: Package
shell: pwsh
run: ./integrations/opendeck/package.ps1 -Target '${{ matrix.target }}'
- name: Upload native bundle
uses: actions/upload-artifact@v4
with:
name: opendeck-native-${{ matrix.target }}
path: integrations/opendeck/dist/*.zip
if-no-files-found: error
- name: Render previews with the shipped renderer
shell: pwsh
run: |
$extension = if ($IsWindows) { '.exe' } else { '' }
& "./target/${{ matrix.target }}/release/furumi-opendeck$extension" --preview integrations/opendeck/preview
if ($LASTEXITCODE) { exit $LASTEXITCODE }
- uses: actions/upload-artifact@v4
with:
name: opendeck-preview-${{ matrix.target }}
path: integrations/opendeck/preview/*.png
if-no-files-found: error
package:
name: Package OpenDeck / ${{ matrix.platform }}
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
include:
- platform: windows
targets: '*-windows-msvc'
- platform: macos
targets: '*-apple-darwin'
- platform: linux
targets: '*-linux-gnu'
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
pattern: opendeck-native-${{ matrix.targets }}
path: native
merge-multiple: true
- name: Assemble installable plugin
env:
PLATFORM: ${{ matrix.platform }}
run: |
set -euo pipefail
suffix=""
if [[ "$GITHUB_REF_TYPE" == tag ]]; then suffix="-${GITHUB_REF_NAME#v}"; fi
python3 integrations/opendeck/package_release.py "$PLATFORM" native "dist/furumi-opendeck-$PLATFORM$suffix.zip"
- uses: actions/upload-artifact@v4
with:
name: furumi-opendeck-${{ matrix.platform }}
path: dist/*.zip
if-no-files-found: error