chore(ci): update CI workflow to build and test on all branches

This commit is contained in:
sankalp committed 2025-10-07 22:15:06 +05:45
1 parent d34afc0887
commit 8702e30e07
1 file changed
+22 -26
+22 -26
View File
@@ -1,43 +1,39 @@
name: C/C++ CI name: build-and-test
on: on:
push: push:
branches: [ "main" ] branches: [ "**" ]
pull_request: pull_request:
branches: [ "main" ] branches: [ "**" ]
jobs: jobs:
build: ubuntu-build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# Step 1: Checkout your code - name: Checkout
- name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
# Step 2: Install build dependencies
- name: Install 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 - name: Build
run: make -j$(nproc) run: make -j$(nproc)
# Step 4: Run tests if available - name: List sound packs
- name: Run tests run: ./keyvibe --list
run: |
if make -q check 2>/dev/null; then - name: Smoke test help
make check run: ./keyvibe --help || true
else
echo "No tests defined, skipping..."
fi
# 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