-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Attempting to simplify CodqQL to run in one YML file
Attempting to get both Windows and Linux CodeQL runs in a single YML file to simplify the build process. Signed-off-by: Tyler Erickson <[email protected]>
- Loading branch information
1 parent
7b92b00
commit 4a1bb42
Showing
1 changed file
with
43 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,7 @@ on: | |
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
|
||
runs-on: ${{ matrix.config.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -27,6 +26,35 @@ jobs: | |
language: ['cpp'] | ||
# Learn more... | ||
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection | ||
config: | ||
- { | ||
name: "Windows MSVC x64", | ||
os: windows-latest, | ||
cc: "cl.exe", | ||
cxx: "cl.exe", | ||
arch: "x64", | ||
meson_opts: "-Db_vscrt=static_from_buildtype" | ||
} | ||
- { | ||
name: "Windows MSVC x86", | ||
os: windows-latest, | ||
cc: "cl.exe", | ||
cxx: "cl.exe", | ||
arch: "x64_x86", | ||
meson_opts: "-Db_vscrt=static_from_buildtype" | ||
} | ||
- { | ||
name: "Ubuntu GCC", | ||
os: ubuntu-latest, | ||
cc: "gcc", | ||
cxx: "g++" | ||
} | ||
- { | ||
name: "Ubuntu Clang", | ||
os: ubuntu-latest, | ||
cc: "clang", | ||
cxx: "clang++" | ||
} | ||
|
||
steps: | ||
- name: Checkout repository | ||
|
@@ -36,6 +64,12 @@ jobs: | |
# a pull request then we can checkout the head. | ||
fetch-depth: 2 | ||
submodules: recursive | ||
|
||
- name: Settings vars for MSVC | ||
if: startsWith(matrix.config.name, 'Windows MSVC') | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
with: | ||
arch: ${{ matrix.config.arch }} | ||
|
||
# If this run was triggered by a pull request event, then checkout | ||
# the head of the pull request instead of the merge commit. | ||
|
@@ -65,11 +99,13 @@ jobs: | |
# uses a compiled language | ||
|
||
- name: Configuring and compiling with meson | ||
uses: BSFishy/[email protected] | ||
with: | ||
action: build | ||
options: --verbose | ||
meson-version: 0.60.1 | ||
env: | ||
CC: ${{ matrix.config.cc }} | ||
CXX: ${{ matrix.config.cxx }} | ||
run: | | ||
pip install meson==0.60.3 ninja | ||
meson setup build -Dprefix=/ -Dmandir=/man -Dbindir=/ ${{ matrix.config.meson_opts }} --buildtype=release | ||
meson install -C build | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 |