Skip to content

Commit

Permalink
include more branches
Browse files Browse the repository at this point in the history
  • Loading branch information
arozx committed Jan 3, 2025
1 parent 344dc1b commit a33b554
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,46 @@ name: Build and Analyze
on:
push:
branches:
- '*'
- '**'
pull_request:
branches:
- '*'
- '**'

jobs:
build:
name: Build and analyze with SonarQube
runs-on: ubuntu-latest

steps:
# Checkout the repository
# Step 1: Checkout the repository
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Ensure full history for analysis

# Install dependencies
# Step 2: Install dependencies
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y cmake build-essential pkg-config libglfw3-dev libgl1-mesa-dev libx11-dev libgl-dev libglm-dev
sudo apt install -y cmake build-essential pkg-config \
libglfw3-dev libgl1-mesa-dev libx11-dev libgl-dev libglm-dev
# Generate and build the project using CMake
- name: Build project
# Step 3: Generate and build the project using CMake
- name: Configure and build project
run: |
mkdir -p build
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
# Run SonarQube analysis
# Step 4: Run SonarQube analysis
- name: Run SonarQube scan
uses: sonarsource/sonarqube-scan-action@v3
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

# (Optional) Enforce quality gate
# Optional: Enforce quality gate
# Uncomment the following lines to fail the workflow if the Quality Gate is not met
# - name: Check SonarQube quality gate
# uses: sonarsource/sonarqube-quality-gate-action@master
# timeout-minutes: 5
Expand Down

0 comments on commit a33b554

Please sign in to comment.