Skip to content

ci: remove qt5-default for Ubuntu 22.04 compatibility #6

ci: remove qt5-default for Ubuntu 22.04 compatibility

ci: remove qt5-default for Ubuntu 22.04 compatibility #6

Workflow file for this run

name: CI - Build and Test
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
workflow_dispatch:
env:
CMAKE_BUILD_TYPE: Release
jobs:
build:
name: Build A3Guard
runs-on: ubuntu-22.04
strategy:
matrix:
build-type: [Debug, Release]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential cmake \
qtbase5-dev qtbase5-dev-tools \
libssl-dev libudev-dev libx11-dev libxfixes-dev \
pkg-config
- name: Create build directory
run: mkdir -p build
- name: Configure CMake
working-directory: build
run: |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-DCMAKE_INSTALL_PREFIX=/opt/a3guard \
..
- name: Build
working-directory: build
run: |
make -j$(nproc)
echo "Build completed successfully"
- name: Check binary
run: |
if [ -f build/A3Guard ]; then
echo "✅ Binary created: $(ls -lh build/A3Guard | awk '{print $5, $9}')"
file build/A3Guard
else
echo "❌ Binary not found"
exit 1
fi
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: a3guard-build-${{ matrix.build-type }}-ubuntu-20.04
path: build/A3Guard
retention-days: 7
code-quality:
name: Code Quality Checks
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cppcheck
- name: Static analysis with cppcheck
run: |
echo "Running cppcheck..."
cppcheck --enable=all --suppress=missingIncludeSystem src/ include/ || true
echo "✅ Static analysis complete"
security:
name: Security Checks
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Check for hardcoded credentials
run: |
echo "Checking for hardcoded credentials..."
! grep -r "password\|secret\|api.key" src/ include/ || echo "Warning: Found potential hardcoded values"
documentation:
name: Documentation Check
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Check README files
run: |
echo "Checking documentation..."
[ -f README.md ] && echo "✅ README.md exists" || echo "❌ README.md missing"
[ -f README_DETAILED.md ] && echo "✅ README_DETAILED.md exists" || echo "❌ README_DETAILED.md missing"
[ -f LICENSE ] && echo "✅ LICENSE exists" || echo "❌ LICENSE missing"
summary:
name: Build Summary
runs-on: ubuntu-22.04
needs: [build, code-quality, security, documentation]
if: always()
steps:
- name: Check results
run: |
echo "=========================================="
echo "A3Guard CI Pipeline Summary"
echo "=========================================="
echo "Build: ${{ needs.build.result }}"
echo "Code Quality: ${{ needs.code-quality.result }}"
echo "Security: ${{ needs.security.result }}"
echo "Documentation: ${{ needs.documentation.result }}"
echo "=========================================="