Merge pull request #725 from zonble/master #44
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
| name: "CodeQL Advanced" | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| paths: | |
| - '**/*.swift' | |
| - '**/*.cpp' | |
| - '**/*.mm' | |
| - '**/*.m' | |
| - '**/*.h' | |
| - '**/*.py' | |
| - '*.xcodeproj/**' | |
| - '*.xcworkspace/**' | |
| - '.github/workflows/codeql.yml' | |
| pull_request: | |
| branches: [ "master" ] | |
| paths: | |
| - '**/*.swift' | |
| - '**/*.cpp' | |
| - '**/*.mm' | |
| - '**/*.m' | |
| - '**/*.h' | |
| - '**/*.py' | |
| - '*.xcodeproj/**' | |
| - '*.xcworkspace/**' | |
| - '.github/workflows/codeql.yml' | |
| schedule: | |
| - cron: '0 0 * * 0' | |
| jobs: | |
| analyze: | |
| name: Analyze (${{ matrix.language }}) | |
| runs-on: macos-latest | |
| timeout-minutes: 360 | |
| permissions: | |
| security-events: write | |
| packages: read | |
| actions: read | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| language: [ 'swift', 'cpp', 'python' ] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.12' | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v4 | |
| with: | |
| languages: ${{ matrix.language }} | |
| build-mode: ${{ matrix.language == 'python' && 'none' || 'manual' }} | |
| - name: Build project | |
| if: matrix.language == 'swift' || matrix.language == 'cpp' | |
| run: | | |
| PYTHON=$(which python3) xcodebuild -scheme McBopomofoInstaller -configuration Debug build ARCHS=arm64 ONLY_ACTIVE_ARCH=YES | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v4 | |
| with: | |
| category: "/language:${{ matrix.language }}" |