feat: use code scanning
This commit is contained in:
parent
4a75a9df7c
commit
5d4fa3d774
14
.github/workflows/android.yml
vendored
14
.github/workflows/android.yml
vendored
@ -6,6 +6,10 @@ jobs:
|
|||||||
build-android:
|
build-android:
|
||||||
name: NDK-C++${{matrix.std}}-${{matrix.abi}}-${{matrix.build_type}}
|
name: NDK-C++${{matrix.std}}-${{matrix.abi}}-${{matrix.build_type}}
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -21,6 +25,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v2
|
||||||
|
with:
|
||||||
|
languages: cpp
|
||||||
|
|
||||||
- name: Setup Dependencies
|
- name: Setup Dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@ -55,3 +64,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cmake --build build_${{matrix.abi}} \
|
cmake --build build_${{matrix.abi}} \
|
||||||
--config ${{matrix.build_type}}
|
--config ${{matrix.build_type}}
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v2
|
||||||
|
with:
|
||||||
|
category: language:cpp
|
||||||
|
|||||||
14
.github/workflows/emscripten.yml
vendored
14
.github/workflows/emscripten.yml
vendored
@ -9,6 +9,10 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
name: Emscripten-C++${{matrix.std}}-${{matrix.build_type}}-${{matrix.lib}}
|
name: Emscripten-C++${{matrix.std}}-${{matrix.build_type}}-${{matrix.lib}}
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
container: emscripten/emsdk
|
container: emscripten/emsdk
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
@ -20,6 +24,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v2
|
||||||
|
with:
|
||||||
|
languages: cpp
|
||||||
|
|
||||||
- name: Setup Dependencies
|
- name: Setup Dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@ -50,3 +59,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cmake --build build_${{matrix.build_type}} \
|
cmake --build build_${{matrix.build_type}} \
|
||||||
--config ${{matrix.build_type}}
|
--config ${{matrix.build_type}}
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v2
|
||||||
|
with:
|
||||||
|
category: language:cpp
|
||||||
|
|||||||
15
.github/workflows/linux.yml
vendored
15
.github/workflows/linux.yml
vendored
@ -9,6 +9,10 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
name: GCC-C++${{matrix.std}}-${{matrix.build_type}}-${{matrix.lib}}
|
name: GCC-C++${{matrix.std}}-${{matrix.build_type}}-${{matrix.lib}}
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
@ -19,6 +23,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v2
|
||||||
|
with:
|
||||||
|
languages: cpp
|
||||||
|
|
||||||
- name: Setup Dependencies
|
- name: Setup Dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@ -127,7 +136,6 @@ jobs:
|
|||||||
sed -i "s|build_${{matrix.build_type}}/glog/${name_we}.h|${file}|g" build_${{matrix.build_type}}/coverage.xml
|
sed -i "s|build_${{matrix.build_type}}/glog/${name_we}.h|${file}|g" build_${{matrix.build_type}}/coverage.xml
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
- name: Upload Coverage to Codecov
|
- name: Upload Coverage to Codecov
|
||||||
if: matrix.build_type == 'Debug'
|
if: matrix.build_type == 'Debug'
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v3
|
||||||
@ -136,3 +144,8 @@ jobs:
|
|||||||
files: build_${{matrix.build_type}}/coverage.xml
|
files: build_${{matrix.build_type}}/coverage.xml
|
||||||
fail_ci_if_error: true
|
fail_ci_if_error: true
|
||||||
verbose: true
|
verbose: true
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v2
|
||||||
|
with:
|
||||||
|
category: language:cpp
|
||||||
|
|||||||
4
.github/workflows/macos.yml
vendored
4
.github/workflows/macos.yml
vendored
@ -6,6 +6,10 @@ jobs:
|
|||||||
build-macos:
|
build-macos:
|
||||||
name: AppleClang-C++${{matrix.std}}-${{matrix.build_type}}
|
name: AppleClang-C++${{matrix.std}}-${{matrix.build_type}}
|
||||||
runs-on: macos-12
|
runs-on: macos-12
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
|
|||||||
29
.github/workflows/windows.yml
vendored
29
.github/workflows/windows.yml
vendored
@ -6,6 +6,10 @@ jobs:
|
|||||||
build-msvc:
|
build-msvc:
|
||||||
name: ${{matrix.msvc}}-${{matrix.arch}}-C++${{matrix.std}}-${{matrix.build_type}}-${{matrix.lib}}
|
name: ${{matrix.msvc}}-${{matrix.arch}}-C++${{matrix.std}}-${{matrix.build_type}}-${{matrix.lib}}
|
||||||
runs-on: ${{matrix.os}}
|
runs-on: ${{matrix.os}}
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: powershell
|
shell: powershell
|
||||||
@ -31,6 +35,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v2
|
||||||
|
with:
|
||||||
|
languages: cpp
|
||||||
|
|
||||||
- name: Cache GTest
|
- name: Cache GTest
|
||||||
id: cache-gtest
|
id: cache-gtest
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
@ -125,9 +134,18 @@ jobs:
|
|||||||
--config ${{matrix.build_type}} `
|
--config ${{matrix.build_type}} `
|
||||||
--target install
|
--target install
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v2
|
||||||
|
with:
|
||||||
|
category: language:cpp
|
||||||
|
|
||||||
build-mingw:
|
build-mingw:
|
||||||
name: ${{matrix.sys}}-${{matrix.env}}-C++${{matrix.std}}-${{matrix.build_type}}-${{matrix.lib}}
|
name: ${{matrix.sys}}-${{matrix.env}}-C++${{matrix.std}}-${{matrix.build_type}}-${{matrix.lib}}
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
env:
|
env:
|
||||||
BUILDDIR: 'build_${{matrix.sys}}-${{matrix.env}}-C++${{matrix.std}}-${{matrix.build_type}}-${{matrix.lib}}'
|
BUILDDIR: 'build_${{matrix.sys}}-${{matrix.env}}-C++${{matrix.std}}-${{matrix.build_type}}-${{matrix.lib}}'
|
||||||
defaults:
|
defaults:
|
||||||
@ -148,6 +166,12 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v2
|
||||||
|
with:
|
||||||
|
languages: cpp
|
||||||
|
|
||||||
- uses: msys2/setup-msys2@v2
|
- uses: msys2/setup-msys2@v2
|
||||||
with:
|
with:
|
||||||
msystem: ${{matrix.sys}}
|
msystem: ${{matrix.sys}}
|
||||||
@ -223,3 +247,8 @@ jobs:
|
|||||||
files: build_${{matrix.build_type}}/coverage.xml
|
files: build_${{matrix.build_type}}/coverage.xml
|
||||||
fail_ci_if_error: true
|
fail_ci_if_error: true
|
||||||
verbose: true
|
verbose: true
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v2
|
||||||
|
with:
|
||||||
|
category: language:cpp
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user