Merge branch 'phase1-shared-buffer-layer-policy' #37
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
| # CodeQL Security Analysis Workflow | |
| # https://docs.github.com/en/code-security/code-scanning/introduction-to-code-scanning | |
| name: CodeQL | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| schedule: | |
| # Run weekly on Monday at 00:00 UTC | |
| - cron: '0 0 * * 1' | |
| permissions: | |
| contents: read | |
| security-events: write | |
| jobs: | |
| analyze: | |
| name: Analyze | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| language: ['cpp', 'go', 'rust'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v3 | |
| with: | |
| languages: ${{ matrix.language }} | |
| queries: security-and-quality | |
| - name: Build C++ (for C++ analysis) | |
| if: matrix.language == 'cpp' | |
| run: | | |
| cd algorithms/huffman/cpp && g++ -std=c++17 -O2 -I../../shared/cpp/include main.cpp -o huffman_cpp | |
| cd ../../arithmetic/cpp && g++ -std=c++17 -O2 -I../../shared/cpp/include main.cpp -o arithmetic_cpp | |
| cd ../../range/cpp && g++ -std=c++17 -O2 -I../../shared/cpp/include main.cpp -o rangecoder_cpp | |
| cd ../../rle/cpp && g++ -std=c++17 -O2 -I../../shared/cpp/include main.cpp -o rle_cpp | |
| - name: Setup Rust (for Rust analysis) | |
| if: matrix.language == 'rust' | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Build Rust (for Rust analysis) | |
| if: matrix.language == 'rust' | |
| run: | | |
| cargo build --manifest-path algorithms/huffman/rust/Cargo.toml --bin huffman_rust | |
| cargo build --manifest-path algorithms/arithmetic/rust/Cargo.toml --bin arithmetic_rust | |
| cargo build --manifest-path algorithms/range/rust/Cargo.toml | |
| cargo build --manifest-path algorithms/rle/rust/Cargo.toml --bin rle_rust | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v3 | |
| with: | |
| category: "/language:${{ matrix.language }}" |