-
Notifications
You must be signed in to change notification settings - Fork 97
105 lines (93 loc) · 3.54 KB
/
codeql.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: ["master", "develop", "release-*"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["develop"]
schedule:
- cron: "0 8 * * 0"
permissions: read-all
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
egress-policy: audit
- name: checkout_kokkos_kernels
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
path: kokkos-kernels
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
with:
languages: c-cpp
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
- name: checkout_kokkos
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
repository: 'kokkos/kokkos'
path: 'kokkos'
ref: '4.3.01'
- name: configure_kokkos
run: |
mkdir -p kokkos/{build,install}
cd kokkos/build
cmake -S ${{github.workspace}}/kokkos \
-B ${{github.workspace}}/kokkos/build \
-D Kokkos_ENABLE_SERIAL=ON \
-D CMAKE_CXX_FLAGS="-Werror" \
-D CMAKE_CXX_STANDARD=17 \
-D Kokkos_ENABLE_COMPILER_WARNINGS=ON \
-D Kokkos_ENABLE_TESTS=OFF \
-D Kokkos_ENABLE_DEPRECATED_CODE_4=OFF \
-D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=${{github.workspace}}/kokkos/install
- name: build_and_install_kokkos
working-directory: kokkos/build
run: make -j2 install
- name: configure_kokkos_kernels
run: |
mkdir -p kokkos-kernels/{build,install}
cd kokkos-kernels/build
cmake \
-S ${{github.workspace}}/kokkos-kernels \
-DKokkos_ROOT=${{github.workspace}}/kokkos/install \
-DCMAKE_BUILD_TYPE=RELEASE \
-DCMAKE_CXX_FLAGS="-Wall -Wshadow -pedantic -Werror -Wsign-compare -Wtype-limits -Wignored-qualifiers -Wempty-body -Wuninitialized" \
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/kokkos-kernels/install \
-DKokkosKernels_ENABLE_TESTS=ON \
-DKokkosKernels_ENABLE_EXAMPLES:BOOL=ON \
-DKokkosKernels_INST_DOUBLE=ON \
-DKokkosKernels_INST_LAYOUTLEFT:BOOL=ON \
-DKokkosKernels_INST_LAYOUTRIGHT:BOOL=OFF \
-DKokkosKernels_INST_OFFSET_INT=ON \
-DKokkosKernels_INST_OFFSET_SIZE_T=OFF
- name: build_kokkos_kernels
working-directory: kokkos-kernels/build
run: make -j2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
with:
category: "/language:c-cpp"