Skip to content

design(toolkit): flatten the white-pill thumbs + toggle knob (no spec… #77

design(toolkit): flatten the white-pill thumbs + toggle knob (no spec…

design(toolkit): flatten the white-pill thumbs + toggle knob (no spec… #77

Workflow file for this run

name: Main Build Pipeline
on:
push:
branches: [ master, main, work/* ]
pull_request:
branches: [ master, main, work/* ]
env:
BUILD_TYPE: RelWithDebInfo
CMAKE_BUILD_PARALLEL_LEVEL: $(nproc)
jobs:
# Main CI job
ci:
name: CI Build & Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Setup CMake
uses: jcbhmr/action-cmake@v2.2.0
with:
cmake-version: '3.25.3'
- name: Setup Ninja
uses: egor-tensin/setup-ninja@v1
with:
version: '1.11'
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cache/CMake
~/.cache/pip
build-deps
key: ${{ runner.os }}-deps-${{ hashFiles('**/requirements.txt', '**/CMakeLists.txt') }}
restore-keys: |
${{ runner.os }}-deps-
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
ninja-build \
libasound2-dev \
libpulse-dev \
libjack-dev \
libx11-dev \
libxrandr-dev \
libxinerama-dev \
libxcursor-dev \
libxinerama-dev \
libxext-dev \
libxrender-dev \
libxcomposite-dev \
libxinerama-dev \
libxtst-dev \
libxss1 \
libgtk-3-dev \
libgl1-mesa-dev \
libglu1-mesa-dev \
libasound2-dev \
libpulse-dev \
libjack-dev \
libcurl4-openssl-dev \
libsamplerate0-dev \
librubberband-dev \
libfftw3-dev \
libsphinxbase-dev \
libglib2.0-dev \
libgconf-2.4-dev \
libdbus-1-dev \
libssl-dev \
libffi-dev \
libgirepository1.0-dev
- name: Build dependencies
run: |
mkdir -p build-deps
cd build-deps
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
ninja
- name: Configure CMake
working-directory: ${{github.workspace}}
run: |
mkdir -p build
cd build
cmake -G Ninja \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_STANDARD=20 \
-DCMAKE_CXX_STANDARD_REQUIRED=ON \
-DCMAKE_CXX_EXTENSIONS=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTS=ON \
-DBUILD_EXAMPLES=OFF \
-DBENCHMARK_ENABLE=OFF \
..
- name: Build project
working-directory: ${{github.workspace}}/build
run: ninja -j$(nproc)
- name: Run tests
working-directory: ${{github.workspace}}/build
run: ninja test
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: build/
retention-days: 30
# Quality checks
quality:
name: Code Quality
runs-on: ubuntu-latest
needs: ci
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run Clang-Tidy
uses: egor-tensin/clang-tidy@v1
with:
version: '14'
path: apps/desktop/
extra-options: '--warnings-as-errors=*'
- name: Run Cppcheck
run: |
sudo apt-get install -y cppcheck
cppcheck --enable=all --max-depth=16 --inconclusive --suppress=missingIncludeSystem apps/desktop/
# Security scanning
security:
name: Security Scan
runs-on: ubuntu-latest
needs: ci
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run CodeQL Analysis
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# Autobuild is disabled, as we build the code separately
autobuild: false
- name: Perform CodeQL Analysis
uses: github/codeql-action/perform-analysis@v2
with:
languages: ${{ matrix.language }}
queries: ${{ matrix.queries }}
# Documentation build
docs:
name: Build Documentation
runs-on: ubuntu-latest
needs: ci
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Doxygen
run: |
sudo apt-get install -y doxygen graphviz
- name: Build documentation
working-directory: ${{github.workspace}}
run: |
doxygen Doxyfile
- name: Upload documentation
uses: actions/upload-artifact@v3
with:
name: documentation
path: docs/html/
retention-days: 7
# Staging deployment
deploy-staging:
name: Deploy Staging
runs-on: ubuntu-latest
needs: [ci, quality, security, docs]
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: build-artifacts
path: build/
- name: Deploy to staging
run: |
echo "Deploying to staging environment..."
# Add staging deployment commands here
# Notify on completion
notify:
name: Notify
runs-on: ubuntu-latest
needs: [ci, quality, security, docs, deploy-staging]
if: always()
steps:
- name: Notify on success
if: needs.ci.result == 'success'
run: echo "🎉 Build successful!"
- name: Notify on failure
if: needs.ci.result == 'failure'
run: echo "❌ Build failed!"