Update 136-6000.md #236
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CodeQL" | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
schedule: | |
- cron: '30 00 * * *' | |
jobs: | |
analyze: | |
name: Analyze (${{ matrix.language }}) | |
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} | |
permissions: | |
security-events: write | |
packages: read | |
actions: read | |
contents: read | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- language: c-cpp | |
build-mode: manual # Changed from autobuild to manual | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# Initializes the CodeQL tools for scanning. | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: ${{ matrix.language }} | |
build-mode: ${{ matrix.build-mode }} | |
# Install GCC and other dependencies if necessary | |
- if: matrix.build-mode == 'manual' | |
name: Install build dependencies | |
run: | | |
set -e | |
sudo apt-get update | |
sudo apt-get install -y gcc | |
#Error debugging | |
- name: Show Build Logs | |
if: failure() | |
run: cat build.log || echo "No build log available." | |
# Manual build step for C/C++ projects | |
- if: matrix.build-mode == 'manual' | |
name: Build and Run C/C++ code | |
shell: bash | |
run: | | |
gcc AutoLLgeneration.c -o t | |
./t # Make sure this step is appropriate for your needs | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 | |
with: | |
category: "/language:${{matrix.language}}" |