Skip to content

Commit

Permalink
Refactor build for codeql.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-forbes-cp committed May 14, 2024
1 parent d3c072d commit 41fee2c
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,16 @@ jobs:
# 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
image: intel/oneapi-basekit:latest

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

# Handle git 'dubious ownership/safe.directory' container warnings (reduces related CodeQL verbosity)
- name: Add safe Git directory
if: matrix.build-mode == 'manual'
run: git config --global --add safe.directory /__w/SYCL-samples/SYCL-samples

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand All @@ -87,24 +90,21 @@ jobs:
# ℹ️ 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

# Configure Cmake & Build - inc. graphics
# Configure Cmake & Build - no graphics

- name: Configure CMake
- name: Configure CMake (no graphics)
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_COMPILER=icpx
-DENABLE_GRAPHICS=OFF
-DENABLE_SPIR=ON -DENABLE_CUDA=OFF -DENABLE_HIP=OFF
-DCMAKE_CXX_FLAGS='-Wall -Wextra -Wpedantic -Werror'
-G Ninja
- name: Build
- name: Build (no graphics)
if: matrix.build-mode == 'manual'
run: cmake --build ${{github.workspace}}/build -- -k 0
run: cmake --build ${{github.workspace}}/build -- -k -j

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

0 comments on commit 41fee2c

Please sign in to comment.