Skip to content

Create codeql.yml

Create codeql.yml #9

Workflow file for this run

name: "CodeQL"
on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
schedule:
- cron: '34 12 * * 3'
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ${{ matrix.language == 'swift' && 'macos-latest' || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
security-events: write
packages: read
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: c-cpp
build-mode: manual
- language: python
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
queries: security-extended,security-and-quality
- if: matrix.build-mode == 'manual'
name: Setup and Build
run: |
set -x
sudo apt-get update || { echo "APT update failed"; cat /var/log/apt/term.log; exit 1; }
sudo apt-get install -y wget || { echo "APT install wget failed"; exit 1; }
wget https://repo.radeon.com/amdgpu-install/6.1.2/ubuntu/jammy/amdgpu-install_6.1.60102-1_all.deb
sudo apt-get install -y ./amdgpu-install_6.1.60102-1_all.deb || { echo "AMD GPU install failed"; exit 1; }
sudo amdgpu-install --usecase=rocm || { echo "ROCm install failed"; exit 1; }
sudo apt-get update || { echo "APT update failed"; exit 1; }
sudo apt-get install -y rocblas || { echo "rocBLAS install failed"; exit 1; }
cd Level-1/swap
make || { echo "Make failed"; exit 1; }
./swap || { echo "Swap execution failed"; exit 1; }
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
- name: Cache Dependencies
uses: actions/cache@v2
with:
path: ~/.cache
key: ${{ runner.os }}-dependency-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-dependency-