Skip to content

Commit

Permalink
Update codeql.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-forbes-cp committed May 13, 2024
1 parent ef73b5e commit d3c072d
Showing 1 changed file with 30 additions and 11 deletions.
41 changes: 30 additions & 11 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ on:
pull_request:
branches: [ "main" ]
schedule:
- cron: '16 14 * * 0'
- cron: '40 8 * * 6'

env:
BUILD_TYPE: Release

jobs:
analyze:
Expand Down Expand Up @@ -45,7 +48,7 @@ jobs:
matrix:
include:
- language: c-cpp
build-mode: autobuild
build-mode: manual
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
Expand All @@ -54,9 +57,15 @@ jobs:
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages

container:
image: ghcr.io/codeplaysoftware/sycl-samples:latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: "recursive"

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand All @@ -77,15 +86,25 @@ jobs:
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1

# Configure Cmake & Build - inc. graphics

- name: Configure CMake
if: matrix.build-mode == 'manual'
run: >
cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_CXX_COMPILER=clang++
-DENABLE_GRAPHICS=ON
-DENABLE_SPIR=ON
-DENABLE_CUDA=ON -DCUDA_COMPUTE_CAPABILITY=80
-DENABLE_HIP=ON -DHIP_GFX_ARCH=gfx90a
-DCMAKE_CXX_FLAGS='-Wall -Wextra -Wpedantic -Werror'
-G Ninja
- name: Build
if: matrix.build-mode == 'manual'
run: cmake --build ${{github.workspace}}/build -- -k 0

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Expand Down

0 comments on commit d3c072d

Please sign in to comment.