From 8702e30e07b4ff97ea4e4cbba3dd36d20a295337 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Tue, 7 Oct 2025 22:15:06 +0545 Subject: [PATCH] chore(ci): update CI workflow to build and test on all branches --- .github/workflows/c-cpp.yml | 48 +++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 350e77d..21e3b58 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -1,43 +1,39 @@ -name: C/C++ CI +name: build-and-test on: push: - branches: [ "main" ] + branches: [ "**" ] pull_request: - branches: [ "main" ] + branches: [ "**" ] jobs: - build: + ubuntu-build: runs-on: ubuntu-latest - steps: - # Step 1: Checkout your code - - name: Checkout code + - name: Checkout uses: actions/checkout@v4 - # Step 2: Install build dependencies - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y build-essential + run: | + sudo apt-get update + sudo apt-get install -y \ + build-essential \ + pkg-config \ + libjson-c-dev \ + libpulse-dev \ + libsndfile1-dev \ + libinput-dev \ + libevdev-dev \ + libudev-dev - # Step 3: Build your project - name: Build run: make -j$(nproc) - # Step 4: Run tests if available - - name: Run tests - run: | - if make -q check 2>/dev/null; then - make check - else - echo "No tests defined, skipping..." - fi + - name: List sound packs + run: ./keyvibe --list + + - name: Smoke test help + run: ./keyvibe --help || true + - # Step 5: Optional: distribution check if Makefile has distcheck - - name: Distribution check - run: | - if make -q distcheck 2>/dev/null; then - make distcheck - else - echo "No distcheck target, skipping..." - fi