From adeb081521bfb34db9cf88a1171a271e0034c533 Mon Sep 17 00:00:00 2001 From: Franziska Wegner <57569315+franziska-wegner@users.noreply.github.com> Date: Tue, 5 Dec 2023 07:08:19 -0800 Subject: [PATCH] Test without compiler CMake parameter codeql.yml --- .github/workflows/codeql.yml | 37 ++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index e95170ba..3ac4cadf 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -41,6 +41,33 @@ jobs: fail-fast: false matrix: language: [ 'c-cpp' ] + build_type: [Release] + # c_compiler: [gcc, clang, cl] + # include: + # - os: windows-latest + # c_compiler: cl + # cpp_compiler: cl + # - os: ubuntu-latest + # c_compiler: gcc + # cpp_compiler: g++ + # - os: ubuntu-latest + # c_compiler: clang + # cpp_compiler: clang++ + # - os: macos-latest + # c_compiler: gcc + # cpp_compiler: g++ + # - os: macos-latest + # c_compiler: clang + # cpp_compiler: clang++ + # exclude: + # - os: windows-latest + # c_compiler: gcc + # - os: windows-latest + # c_compiler: clang + # - os: ubuntu-latest + # c_compiler: cl + # - os: macos-latest + # c_compiler: cl # CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ] # Use only 'java-kotlin' to analyze code written in Java, Kotlin or both # Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both @@ -73,8 +100,6 @@ jobs: # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: > cmake -B ${{ steps.strings.outputs.build-output-dir }} - -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} - -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBoost_NO_SYSTEM_PATHS=TRUE -DEGOA_BUILD_TYPE=${{ matrix.build_type }} @@ -132,8 +157,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 @@ -141,6 +166,10 @@ jobs: # If the Autobuild fails above, remove it and uncomment the following three lines. # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. + - name: Build + # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). + run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} + # - run: | # echo "Run, Build Application using script" # ./location_of_script_within_repo/buildscript.sh