Skip to content

Commit

Permalink
Update codeql.yml
Browse files Browse the repository at this point in the history
Added custom build steps for CodeQL
  • Loading branch information
h4tr3d authored Aug 1, 2023
1 parent 5fd18a5 commit 43aac25
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ name: "CodeQL"

on:
push:
branches: [ "master" ]
branches: [ "**" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
Expand Down Expand Up @@ -63,8 +63,8 @@ jobs:

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
#- name: Autobuild
# uses: github/codeql-action/autobuild@v2

# ℹ️ 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
Expand All @@ -76,6 +76,26 @@ jobs:
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Dump environment variables
run: echo "OS_NAME=$OS_NAME, BUILD_TYPE=$BUILD_TYPE, SKIP_MESON=$SKIP_MESON"

- name: Install packages for Linux
if: ${{ matrix.os != 'macos-latest' && matrix.os != 'windows-latest' }}
run: ci/travis/install-linux.sh

- name: Install packages for macOS
if: ${{ matrix.os == 'macos-latest' }}
run: ci/travis/install-osx.sh

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{ matrix.build_type }}

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

0 comments on commit 43aac25

Please sign in to comment.