Skip to content

Commit 37b11bd

Browse files
committed
Add CodeQL cmake workflow preset
1 parent 1bffb14 commit 37b11bd

5 files changed

Lines changed: 41 additions & 7 deletions

File tree

.github/workflows/cmake-single-platform.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
22
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
3-
name: CMake on a single platform
3+
name: Build and Test
44
permissions:
55
contents: read
66
pull-requests: write

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# the `language` matrix defined below to confirm you have the correct set of
1010
# supported CodeQL languages.
1111
#
12-
name: "CodeQL Advanced"
12+
name: "CodeQL"
1313

1414
on:
1515
push:
@@ -71,7 +71,7 @@ jobs:
7171
with:
7272
languages: ${{ matrix.language }}
7373
build-mode: ${{ matrix.build-mode }}
74-
packs: codeql/misra-cpp-coding-standards,codeql/common-cpp-coding-standards
74+
packs: codeql/misra-cpp-coding-standards
7575
# config-file: ./.github/codeql/codeql-config.yml
7676
# If you wish to specify custom queries, you can do so here or in a config file.
7777
# By default, queries listed here will override any specified in a config file.
@@ -89,7 +89,7 @@ jobs:
8989
- if: matrix.build-mode == 'manual'
9090
shell: bash
9191
run: |
92-
cmake --workflow --preset release
92+
cmake --workflow --preset codeql
9393
9494
- name: Perform CodeQL Analysis
9595
uses: github/codeql-action/analyze@v3

.github/workflows/deploy-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Simple workflow for deploying static content to GitHub Pages
2-
name: Deploy static content to Pages
2+
name: Deploy Documentation
33

44
on:
55
# Runs on pushes targeting the default branch

CMakePresets.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,18 @@
3333
"FSB_ENABLE_EXAMPLES": "OFF"
3434
}
3535
},
36+
{
37+
"name": "codeql",
38+
"displayName": "CodeQL",
39+
"inherits": "common",
40+
"cacheVariables": {
41+
"CMAKE_BUILD_TYPE": "Release",
42+
"FSB_BUILD_TESTING": "OFF",
43+
"FSB_USE_OPENBLAS": "OFF",
44+
"FSB_ENABLE_DOCS": "OFF",
45+
"FSB_ENABLE_EXAMPLES": "OFF"
46+
}
47+
},
3648
{
3749
"name": "coverage",
3850
"displayName": "Coverage",
@@ -65,6 +77,12 @@
6577
"configurePreset": "release",
6678
"targets": ["fsbcore", "fsbposix", "fsburdf"]
6779
},
80+
{
81+
"name": "fsb-codeql",
82+
"displayName": "FSB Library CodeQL Build",
83+
"configurePreset": "codeql",
84+
"targets": ["fsbcore", "fsbposix"]
85+
},
6886
{
6987
"name": "fsb-debug",
7088
"displayName": "FSB Library Debug Build",
@@ -168,6 +186,19 @@
168186
"name": "fsb-release"
169187
}
170188
]
189+
},
190+
{
191+
"name": "codeql",
192+
"steps": [
193+
{
194+
"type": "configure",
195+
"name": "codeql"
196+
},
197+
{
198+
"type": "build",
199+
"name": "fsb-codeql"
200+
}
201+
]
171202
}
172203
]
173204
}

fsb-core/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ configure_max_sizes(FSBCORE_CONFIG_NAME)
88
set(FSBCORE_HEADERS
99
include/fsb_configuration.h
1010
include/fsb_types.h
11-
include/fsb_linalg.h
1211
include/fsb_linalg3.h
1312
include/fsb_quaternion.h
1413
include/fsb_rotation.h
@@ -28,7 +27,6 @@ set(FSBCORE_HEADERS
2827
include/fsb_encoder.h
2928
include/fsb_spatial.h)
3029
set(FSBCORE_SOURCES
31-
src/fsb_linalg.c
3230
src/fsb_linalg3.cpp
3331
src/fsb_quaternion.cpp
3432
src/fsb_rotation.cpp
@@ -47,6 +45,11 @@ set(FSBCORE_SOURCES
4745
src/fsb_encoder.cpp
4846
src/fsb_spatial.cpp)
4947

48+
if (FSB_USE_OPENBLAS)
49+
list(APPEND FSBCORE_HEADERS include/fsb_linalg.h)
50+
list(APPEND FSBCORE_SOURCES src/fsb_linalg.c)
51+
endif()
52+
5053
# target name
5154
set(FSBCORE_TARGET_NAME fsbcore)
5255

0 commit comments

Comments
 (0)