-
Notifications
You must be signed in to change notification settings - Fork 1
188 lines (161 loc) · 7.2 KB
/
codeql-analysis.yaml
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
name: "CodeQL"
on:
schedule:
# Run job every Monday and Thursday at 16:30 UTC
- cron: '30 16 * * 1,4'
jobs:
ubuntu:
name: CodeQL analysis (Ubuntu)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
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
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: install dependencies
run: |
sudo apt -qq update
sudo apt install -y autoconf automake bison dvipng epstool fig2dev \
flex g++ gcc gfortran gnuplot-x11 gperf gzip icoutils \
libarpack2-dev libblas-dev libcurl4-gnutls-dev libfftw3-dev \
libfltk1.3-dev libfontconfig1-dev libfreetype6-dev \
libgl1-mesa-dev libgl2ps-dev libglpk-dev libgraphicsmagick++1-dev \
libhdf5-dev liblapack-dev libosmesa6-dev libpcre2-dev \
libqhull-dev libqscintilla2-qt5-dev libqrupdate-dev \
libreadline-dev librsvg2-bin libsndfile1-dev libsuitesparse-dev \
libsundials-dev libtool libxft-dev make openjdk-8-jdk \
perl portaudio19-dev pstoedit qtbase5-dev qttools5-dev \
qttools5-dev-tools rapidjson-dev rsync tar zlib1g-dev
- name: bootstrap
run: ./bootstrap
- name: configure
run: |
mkdir .build
cd .build && ../configure \
CPPFLAGS="-I/usr/include/hdf5/serial -I/usr/include/suitesparse" \
LDFLAGS="-L/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/hdf5/serial" \
--disable-docs
- name: initialize CodeQL
# Initialize the CodeQL tools for scanning.
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# 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.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
- name: build
run: make -C ./.build all -j2 V=1
- name: perform CodeQL analysis
uses: github/codeql-action/analyze@v2
windows:
name: CodeQL analysis (Windows)
runs-on: windows-2019
defaults:
run:
# Use MSYS2 as default shell
shell: msys2 {0}
strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
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
msystem: ['MINGW64']
include:
- msystem: 'MINGW64'
target-prefix: 'mingw-w64-x86_64'
target-triplet: 'x86_64-w64-mingw32'
env:
CHERE_INVOKING: 1
TARGET_TRIPLET: ${{ matrix.target-triplet }}
# perl uses cmd shell by default
PERL5SHELL: bash -l -c
steps:
- uses: msys2/setup-msys2@v2
with:
update: true
# Use pre-installed version to save disc space on partition with source.
# We need that space for building.
release: false
# The packages are listed in (alphabetically sorted) blocks:
# The first block is for mandatory dependencies.
# The second block is for optional dependencies needed when building from a release tarball.
# The third block is for additional dependencies needed when building from a repository checkout.
install: >-
base-devel
${{ matrix.target-prefix }}-autotools
${{ matrix.target-prefix }}-cc
${{ matrix.target-prefix }}-gcc-fortran
${{ matrix.target-prefix }}-gperf
${{ matrix.target-prefix }}-lapack
${{ matrix.target-prefix }}-openblas
${{ matrix.target-prefix }}-pcre2
${{ matrix.target-prefix }}-arpack
${{ matrix.target-prefix }}-curl
${{ matrix.target-prefix }}-fftw
${{ matrix.target-prefix }}-fltk
${{ matrix.target-prefix }}-gl2ps
${{ matrix.target-prefix }}-glpk
${{ matrix.target-prefix }}-ghostscript
${{ matrix.target-prefix }}-gnuplot
${{ matrix.target-prefix }}-graphicsmagick
${{ matrix.target-prefix }}-hdf5
${{ matrix.target-prefix }}-libsndfile
${{ matrix.target-prefix }}-portaudio
${{ matrix.target-prefix }}-qhull
${{ matrix.target-prefix }}-qrupdate
${{ matrix.target-prefix }}-qscintilla
${{ matrix.target-prefix }}-qt5-base
${{ matrix.target-prefix }}-qt5-imageformats
${{ matrix.target-prefix }}-qt5-svg
${{ matrix.target-prefix }}-qt5-tools
${{ matrix.target-prefix }}-rapidjson
${{ matrix.target-prefix }}-suitesparse
${{ matrix.target-prefix }}-sundials
git
${{ matrix.target-prefix }}-ccache
${{ matrix.target-prefix }}-icoutils
${{ matrix.target-prefix }}-librsvg
texinfo
msystem: ${{ matrix.msystem }}
- name: checkout repository
uses: actions/checkout@v4
- name: bootstrap
run: ./bootstrap
- name: configure
# configure sometimes hangs while compiling 32bit Fortran.
# It should take much less than 30 minutes. Cancel the step if it takes longer.
timeout-minutes: 30
# FIXME: Fix building with Java support. Override JAVA_HOME for now.
# FIXME: How do we get a working TeX environment in MSYS2? Disable building the documentation for now.
# Linking with ncurses fails. Use termcap library instead.
run: |
mkdir .build
cd .build && ../configure \
JAVA_HOME="" \
--disable-docs \
ac_cv_search_tputs=-ltermcap
- name: initialize CodeQL
# Initialize the CodeQL tools for scanning.
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# 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.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
- name: build
# Spawning processes seems to have a big overhead on this platform.
# Use a somewhat larger number of parallel processes to compensate for that.
run: make -C ./.build all -j8 V=1
- name: perform CodeQL analysis
uses: github/codeql-action/analyze@v2