forked from coin3d/sowin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/coin3d/sowin
- Loading branch information
Showing
1 changed file
with
75 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
workflow_dispatch: # Allow manual triggers | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
schedule: | ||
- cron: '06 10 * * 4' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: windows-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
#strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# language: [ 'c-cpp', 'python' ] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Checkout submodules | ||
run: git submodule update --init --recursive | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: c-cpp | ||
config: | | ||
#disable-default-queries: true | ||
#queries: | ||
# - uses: security-and-quality | ||
query-filters: | ||
# Specifically hide the results of these queries. | ||
- exclude: | ||
id: cpp/assignment-does-not-return-this | ||
- exclude: | ||
id: cpp/fixme-comment | ||
- exclude: | ||
id: cpp/rule-of-two | ||
- exclude: | ||
id: cpp/use-of-goto | ||
#config-file: ./lgtm.yml | ||
|
||
#- name: Autobuild | ||
# uses: github/codeonfigureql-action/autobuild@v2 | ||
|
||
- name: Create build with CMake | ||
shell: cmd | ||
run: | | ||
mkdir cmake_download_dir | ||
set DOWNLOAD_FILE_COIN=coin-latest-msvc17-x64.zip | ||
for /f %%i in ('curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/coin3d/coin/releases ^| jq -r --arg COIN_REPO_TAG_NAME "CI-builds" ".[] | select(.tag_name==$COIN_REPO_TAG_NAME) | .id"') do set RELEASE_ID=%%i | ||
for /f %%i in ('curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/coin3d/coin/releases/%RELEASE_ID% ^| jq -r --arg DOWNLOAD_FILE_COIN "%DOWNLOAD_FILE_COIN%" ".assets[] | select(.name==$DOWNLOAD_FILE_COIN) | .id"') do set ASSET_ID=%%i | ||
set DOWNLOAD_ADDRESS_COIN=https://api.github.com/repos/coin3d/coin/releases/assets/%ASSET_ID% | ||
echo download file %DOWNLOAD_FILE_COIN% from address %DOWNLOAD_ADDRESS_COIN% | ||
curl -s -S -L -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Accept: application/octet-stream" -o %DOWNLOAD_FILE_COIN% %DOWNLOAD_ADDRESS_COIN% | ||
7z x %DOWNLOAD_FILE_COIN% -ocmake_download_dir | ||
cmake -S . -B cmake_build_dir -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=cmake_install_dir -DCMAKE_PREFIX_PATH=cmake_download_dir/Coin3D | ||
- name: Build project with CMake | ||
run: cmake --build cmake_build_dir --target ALL_BUILD --config Release -- /nologo /verbosity:minimal /maxcpucount:2 /property:MultiProcessorCompilation=true | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
with: | ||
category: "/language:c-cpp" |