diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a00e760..0829085 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,8 +36,9 @@ jobs: - name: Check for TODO/FIXME without issue reference run: | echo "Checking for untracked TODOs..." - ! git grep -n "TODO\|FIXME" -- '*.cpp' '*.h' '*.qml' | grep -v "#[0-9]" || \ + if git grep -n "TODO\|FIXME" -- '*.cpp' '*.h' '*.qml' | grep -v "#[0-9]"; then echo "Warning: Found TODOs without issue references (not failing build)" + fi - name: Verify CMake syntax run: | diff --git a/docs/CI_CD.md b/docs/CI_CD.md index bc8e4da..b0496c4 100644 --- a/docs/CI_CD.md +++ b/docs/CI_CD.md @@ -361,8 +361,9 @@ Branch name pattern: main 2. **Workflow run badges:** ```markdown - ![Build Status](https://github.com/johndoe6345789/tla_visualiser/workflows/Build%20and%20Test/badge.svg) + ![Build Status](https://github.com/OWNER/REPO/workflows/Build%20and%20Test/badge.svg) ``` + Replace `OWNER/REPO` with your repository details. 3. **Notification settings:** - Configure in repository settings diff --git a/simulate_workflow.sh b/simulate_workflow.sh index de47734..6a13bd3 100755 --- a/simulate_workflow.sh +++ b/simulate_workflow.sh @@ -18,6 +18,9 @@ RUN_TESTS=${RUN_TESTS:-true} BUILD_TYPE=${BUILD_TYPE:-Release} PLATFORM=$(uname -s) +# File patterns for checking +FILE_PATTERNS="*.cpp *.h *.qml" + # Job results tracking LINT_RESULT="pending" BUILD_RESULT="pending" @@ -64,7 +67,7 @@ run_lint_job() { # Check for trailing whitespace echo "Checking for trailing whitespace..." - if git grep -I --line-number --perl-regexp '\s+$' -- '*.cpp' '*.h' '*.qml' 2>/dev/null; then + if git grep -I --line-number --perl-regexp '\s+$' -- $FILE_PATTERNS 2>/dev/null; then print_warning "Found trailing whitespace (not failing - should be fixed eventually)" else print_success "No trailing whitespace found" @@ -72,7 +75,7 @@ run_lint_job() { # Check for TODO/FIXME without issue reference echo "Checking for untracked TODOs..." - if git grep -n "TODO\|FIXME" -- '*.cpp' '*.h' '*.qml' 2>/dev/null | grep -v "#[0-9]"; then + if git grep -n "TODO\|FIXME" -- $FILE_PATTERNS 2>/dev/null | grep -v "#[0-9]"; then print_warning "Found TODOs without issue references (not failing)" fi @@ -129,9 +132,13 @@ run_build_job() { # Install Conan dependencies if conan is available if command -v conan &> /dev/null; then echo "Installing Conan dependencies..." - conan install . --output-folder=build --build=missing || { - print_warning "Conan install failed - continuing anyway" - } + if ! conan install . --output-folder=build --build=missing; then + print_warning "Conan install failed - build may fail due to missing dependencies" + print_warning "Consider installing Conan: pip install conan" + fi + else + print_warning "Conan not found - build may fail due to missing dependencies" + print_warning "Install with: pip install conan" fi # Configure CMake