Simplify CI actions to attempt to prevent LD_PRELOAD mangling #51
This file contains hidden or 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
| # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
| name: "CodeQL - Analyze (C++, Python, Actions)" | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| schedule: | |
| - cron: '0 3 * * 0' # weekly (UTC) — adjust as needed | |
| workflow_dispatch: | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| env: | |
| BUILD_TYPE: RelWithDebInfo | |
| CPP_COMPILER: g++ | |
| jobs: | |
| codeql: | |
| name: Analyze ${{ matrix.language }} with CodeQL | |
| runs-on: ubuntu-24.04 | |
| container: | |
| image: ghcr.io/framework-r-d/phlex-ci:latest | |
| strategy: | |
| fail-fast: false | |
| matrix: # Necessry to disable yaml-language-server warning | |
| language: ['cpp', 'python', 'actions'] | |
| timeout-minutes: 120 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: phlex-src | |
| fetch-depth: 0 | |
| - name: Setup build environment | |
| uses: ./phlex-src/.github/actions/setup-build-env | |
| with: | |
| build-path: phlex-build | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v4 | |
| with: | |
| languages: ${{ matrix.language }} | |
| config-file: phlex-src/.github/codeql/codeql-config.yml | |
| source-root: phlex-src | |
| build-mode: ${{ matrix.language == 'cpp' && 'manual' || 'none' }} | |
| - name: Environment diagnostics (C++ only) | |
| if: matrix.language == 'cpp' | |
| run: | | |
| echo "Available trace libraries:" | |
| find /__t/CodeQL/2.23.3/x64/codeql/tools/ -name '*trace.so*' -ls | |
| echo "Environment dump:" | |
| printenv | |
| - name: Configure CMake (C++ only) | |
| if: matrix.language == 'cpp' | |
| uses: ./phlex-src/.github/actions/configure-cmake | |
| with: | |
| build-type: ${{ env.BUILD_TYPE }} | |
| cpp-compiler: ${{ env.CPP_COMPILER }} | |
| build-path: phlex-build | |
| - name: Build C++ code (C++ only) | |
| if: matrix.language == 'cpp' | |
| uses: ./phlex-src/.github/actions/build-cmake | |
| with: | |
| build-path: phlex-build | |
| # Run CodeQL analysis (uploads results to code scanning) | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v4 | |
| with: | |
| checkout_path: phlex-src | |
| category: ${{ matrix.language }} |