Skip to content

CI Build LedFx

CI Build LedFx #295

Workflow file for this run

name: CI Build LedFx
on:
pull_request:
branches:
- main
paths-ignore:
- 'frontend/**'
- 'docs/**'
- 'ledfx_frontend/**'
schedule:
- cron: '0 8 * * *'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-ledfx-linux:
name: Build LedFx (Ubuntu)
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
fail-fast: false
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt-get update && sudo apt-get install -y \
gcc libatlas3-base portaudio19-dev
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install LedFx
run: |
uv sync --all-extras --dev
- name: Setup CI sound system
uses: LABSN/sound-ci-helpers@v1
- name: Create Audio Input
run: |
pactl load-module module-null-sink sink_name=LedFx_Test_Source sink_properties=device.description=LedFx_Test_Source
- name: Run Tests
run: |
uv run pytest -v
- name: Attach LedFx test log
uses: actions/upload-artifact@v4
if: always()
with:
name: ledfx-log-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}.log
path: ${{ github.workspace }}/debug_config/ledfx.log
build-ledfx-windows:
name: Build LedFx (Windows)
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
fail-fast: false
defaults:
run:
shell: bash -x {0}
steps:
- name: Enable long paths for git on Windows
run: git config --system core.longpaths true
- name: Setup CI sound system
uses: LABSN/sound-ci-helpers@v1
- name: Check out code from GitHub
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install LedFx
run: |
uv sync --all-extras --dev
- name: Run Tests
run: |
uv run pytest -v
- name: Attach LedFx test log
uses: actions/upload-artifact@v4
if: always()
with:
name: ledfx-log-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}.log
path: ${{ github.workspace }}/debug_config/ledfx.log
build-ledfx-osx:
name: Build LedFx (OS X)
runs-on: macos-13
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
fail-fast: false
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4
- name: Install build dependencies
run: |
brew install portaudio mbedtls@2
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Install LedFx
run: |
export PATH="/opt/homebrew/opt/mbedtls@2/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/mbedtls@2/lib"
export CPPFLAGS="-I/opt/homebrew/opt/mbedtls@2/include"
export CFLAGS="-Wno-incompatible-function-pointer-types"
uv sync --python ${{ matrix.python-version }} --extra hue --dev
- name: Check LedFx launches
run: |
uv run ledfx --ci-smoke-test -vv -c debug_config --offline
- name: Attach LedFx test log
uses: actions/upload-artifact@v4
if: always()
with:
name: ledfx-log-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}.log
path: ${{ github.workspace }}/debug_config/ledfx.log
build-ledfx-osx-m1:
name: Build LedFx (OS X) (Apple Silicon)
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
fail-fast: false
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4
- name: Install build dependencies
run: |
brew install portaudio mbedtls@2
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Install LedFx
run: |
export PATH="/opt/homebrew/opt/mbedtls@2/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/mbedtls@2/lib"
export CPPFLAGS="-I/opt/homebrew/opt/mbedtls@2/include"
export CFLAGS="-Wno-incompatible-function-pointer-types"
uv sync --python ${{ matrix.python-version }} --extra hue --dev
- name: Check LedFx launches
run: |
uv run ledfx --ci-smoke-test -vv -c debug_config --offline
- name: Attach LedFx test log
uses: actions/upload-artifact@v4
if: always()
with:
name: ledfx-log-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}.log
path: ${{ github.workspace }}/debug_config/ledfx.log