@@ -10,39 +10,18 @@ name: "CodeQL Analysis"
1010
1111on :
1212 push :
13- branches : [ master ] # Triggers on every actual push to master
13+ branches : [master] # Triggers on every actual push to master
1414 pull_request :
15- branches : [ master ]
15+ branches : [master]
1616 paths :
1717 - " .github/workflows/codeql-analysis.yml" # Only triggers on PRs that modify the configuration
18- schedule :
19- # ┌───────────── minute (0 - 59)
20- # │ ┌───────────── hour (0 - 23)
21- # │ │ ┌───────────── day of the month (1 - 31)
22- # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
23- # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
24- # │ │ │ │ │
25- # │ │ │ │ │
26- # │ │ │ │ │
27- # * * * * *
28- - cron : ' 00 00 * * *'
29- - cron : ' 00 06 * * *'
30- - cron : ' 00 12 * * *'
31- - cron : ' 00 18 * * *'
3218
3319jobs :
3420 analyze :
3521 name : Analyze
3622 runs-on : ubuntu-latest
3723 env :
3824 CMAKE_BUILD_TYPE : Release
39- # Windows codesigning
40- WINDOWS_CERTIFICATE : ${{ secrets.WINDOWS_CERTIFICATE }}
41- WINDOWS_CERTIFICATE_PASSWORD : ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
42- # Apple code signing
43- APPLE_CODESIGN_IDENTITY : ${{ secrets.APPLE_CODESIGN_IDENTITY }}
44- APPLE_NOTARIZATION_USER_NAME : ${{ secrets.APPLE_NOTARIZATION_USER_NAME }}
45- APPLE_NOTARIZATION_PASSWORD : ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
4625 permissions :
4726 actions : read
4827 contents : read
@@ -52,116 +31,96 @@ jobs:
5231 fail-fast : false
5332 matrix :
5433 config :
55- - name : Ubuntu_20.04
56- os : ubuntu-latest
57- arch : x86_64 # as reported by `arch` or `uname -m`
58- compiler_cache : ccache
59- compiler_cache_path : ~/.ccache
60- language : ' cpp' # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
61- vcpkg_binary_cache : ~/.cache/vcpkg
62- vcpkg_triplet : x64-linux
63- wxwidgets_git_url : https://github.com/wxWidgets/wxWidgets.git
64- wxwidgets_git_ref : v3.1.5
65- WX_CONFIG : /home/runner/work/tenacity/tenacity/wxwidgets-install/bin/wx-config
34+ - name : Ubuntu_20.04
35+ os : ubuntu-latest
36+ arch : x86_64 # as reported by `arch` or `uname -m`
37+ compiler_cache : ccache
38+ compiler_cache_path : ~/.ccache
39+ language : " cpp" # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
40+ vcpkg_binary_cache : ~/.cache/vcpkg
41+ vcpkg_triplet : x64-linux
42+ wxwidgets_git_url : https://github.com/wxWidgets/wxWidgets.git
43+ wxwidgets_git_ref : v3.1.5
44+ WX_CONFIG : /home/runner/work/tenacity/tenacity/wxwidgets-install/bin/wx-config
6645
6746 steps :
68- # Setup 64-bit GCC 11
69- - name : Set up GCC
70- uses : egor-tensin/setup-gcc@v1
71- with :
72- platform : x64
73- version : 11
74-
75- - name : Checkout repository
76- uses : actions/checkout@v2
77-
78- - name : " [Linux] Install dependencies"
79- if : runner.os == 'Linux'
80- run : >-
81- sudo apt-get update &&
82- sudo apt-get install -y --no-install-recommends
83- file
84- g++
85- ninja-build
86- nasm
87- git
88- wget
89- bash
90- scdoc
91- ccache
92- debhelper-compat
93- gettext
94- libasound2-dev
95- libgtk-3-dev
96- libsuil-dev
97- gettext
98-
99- - name : " [MacOS] Install dependencies"
100- if : runner.os == 'macOS'
101- run : >-
102- brew install
103- bash
104- ccache
105- ninja
106- nasm
107-
108- - name : " [Windows] Install dependencies"
109- if : runner.os == 'Windows'
110- shell : pwsh
111- env :
112- # Install path of scoop
113- SCOOP : C:\Scoop\
114- run : |
115- echo "C:\Scoop\shims" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
116- iwr -useb get.scoop.sh | iex
117- scoop install sccache
118-
119- - name : Get Git commit of vcpkg submodule
120- run : echo VCPKG_COMMIT=$(git ls-tree HEAD vcpkg | awk '{print $3}') >> ${GITHUB_ENV}
121-
122- # FIXME: use wxWidgets from vcpkg for all OSes when bugs are fixed for Linux and macOS
123- # https://github.com/microsoft/vcpkg/pull/17111
124- - name : Build and install wxWidgets
125- if : steps.wxwidgets-cache.outputs.cache-hit != 'true' && runner.os != 'Windows'
126- run : |
127- # wxWidgets' build system does not find dependencies from vcpkg, so use its vendored Git submodules
128- git clone --recurse-submodules ${{ matrix.config.wxwidgets_git_url }}
129- cd wxWidgets
130- git checkout ${{ matrix.config.wxwidgets_git_ref }}
131- cmake -G Ninja -D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/wxwidgets-install \
132- -S . -B cmake_build
133- cmake --build cmake_build
134- cmake --install cmake_build
135-
136- - name : Configure
137- run : >-
138- cmake
139- -G Ninja
140- -D CMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }}
141- -D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/build/install
142- -D VCPKG=ON
143- -S .
144- -B build
145- env :
146- CC : ${{ matrix.config.cc }}
147- CXX : ${{ matrix.config.cxx }}
148- # hack to get CMake to find wxWidgets until vcpkg wxWidgets port is fixed
149- # https://github.com/microsoft/vcpkg/pull/17111
150- WX_CONFIG : ${{ matrix.config.WX_CONFIG }}
151-
152- # Initializes the CodeQL tools for scanning.
153- - name : Initialize CodeQL
154- uses : github/codeql-action/init@v1
155- with :
156- languages : cpp
157- # If you wish to specify custom queries, you can do so here or in a config file.
158- # By default, queries listed here will override any specified in a config file.
159- # Prefix the list here with "+" to use these queries and those in the config file.
160- # queries: ./path/to/local/query, your-org/your-repo/queries@main
161-
162- - name : Build
163- run : cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} --verbose
164-
165- - name : Perform CodeQL Analysis
166- uses : github/codeql-action/analyze@v1
167-
47+ # Setup 64-bit GCC 11
48+ - name : Set up GCC
49+ uses : egor-tensin/setup-gcc@v1
50+ with :
51+ platform : x64
52+ version : 11
53+
54+ - name : Checkout repository
55+ uses : actions/checkout@v2
56+
57+ - name : " [Linux] Install dependencies"
58+ if : runner.os == 'Linux'
59+ run : >-
60+ sudo apt-get update &&
61+ sudo apt-get install -y --no-install-recommends
62+ file
63+ g++
64+ ninja-build
65+ nasm
66+ git
67+ wget
68+ bash
69+ scdoc
70+ ccache
71+ debhelper-compat
72+ gettext
73+ libasound2-dev
74+ libgtk-3-dev
75+ libsuil-dev
76+ gettext
77+
78+ - name : Get Git commit of vcpkg submodule
79+ run : echo VCPKG_COMMIT=$(git ls-tree HEAD vcpkg | awk '{print $3}') >> ${GITHUB_ENV}
80+
81+ # FIXME: use wxWidgets from vcpkg for all OSes when bugs are fixed for Linux and macOS
82+ # https://github.com/microsoft/vcpkg/pull/17111
83+ - name : Build and install wxWidgets
84+ if : steps.wxwidgets-cache.outputs.cache-hit != 'true' && runner.os != 'Windows'
85+ run : |
86+ # wxWidgets' build system does not find dependencies from vcpkg, so use its vendored Git submodules
87+ wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.5/wxWidgets-3.1.5.tar.bz2
88+ tar xvf wxWidgets-3.1.5.tar.bz2
89+ rm wxWidgets-3.1.5.tar.bz2
90+ cd wxWidgets-3.1.5
91+ cmake -G Ninja -D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/wxwidgets-install \
92+ -S . -B cmake_build
93+ cmake --build cmake_build
94+ cmake --install cmake_build
95+
96+ - name : Configure
97+ run : >-
98+ cmake
99+ -G Ninja
100+ -D CMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }}
101+ -D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/build/install
102+ -D VCPKG=ON
103+ -S .
104+ -B build
105+ env :
106+ CC : ${{ matrix.config.cc }}
107+ CXX : ${{ matrix.config.cxx }}
108+ # hack to get CMake to find wxWidgets until vcpkg wxWidgets port is fixed
109+ # https://github.com/microsoft/vcpkg/pull/17111
110+ WX_CONFIG : ${{ matrix.config.WX_CONFIG }}
111+
112+ # Initializes the CodeQL tools for scanning.
113+ - name : Initialize CodeQL
114+ uses : github/codeql-action/init@v1
115+ with :
116+ languages : cpp
117+ # If you wish to specify custom queries, you can do so here or in a config file.
118+ # By default, queries listed here will override any specified in a config file.
119+ # Prefix the list here with "+" to use these queries and those in the config file.
120+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
121+
122+ - name : Build
123+ run : cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} --verbose
124+
125+ - name : Perform CodeQL Analysis
126+ uses : github/codeql-action/analyze@v1
0 commit comments