forked from bitcoin-core/secp256k1
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: run GCC 13 static analyzer on the code and fail on warnings
- Loading branch information
muxator
committed
Jun 12, 2023
1 parent
a6d843b
commit b6b6343
Showing
1 changed file
with
49 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,49 @@ | ||
name: Run GCC 13 static analyzer on the code, failing on any warning | ||
|
||
on: | ||
push: | ||
branches: | ||
- frost | ||
pull_request: | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
# source for using Fedora via a container in the runner: | ||
# https://github.com/avocado-framework/avocado/actions/runs/2730087531/workflow#L15-L32 | ||
# and | ||
# https://github.com/actions/runner-images/issues/2307#issuecomment-1576493700 | ||
run: | ||
runs-on: ubuntu-22.04 | ||
container: | ||
image: fedora:38 | ||
steps: | ||
- name: install build dependencies | ||
run: | | ||
dnf install -y \ | ||
autoconf \ | ||
automake \ | ||
gcc \ | ||
libtool \ | ||
pkg-config | ||
- uses: actions/checkout@v3 | ||
with: | ||
#ref: 'master' | ||
fetch-depth: 1 | ||
- name: configure with static analyzer enabled | ||
# cannot use ${{github.workspace}} variable inside a container, we must | ||
# use ${GITHUB_WORKSPACE}, see: | ||
# https://github.com/actions/runner/issues/2058 | ||
# and | ||
# https://github.com/actions/runner/pull/2517 | ||
run: | | ||
./autogen.sh | ||
./configure \ | ||
SECP_CFLAGS="-fanalyzer -fanalyzer-transitivity -Werror" \ | ||
--disable-tests \ | ||
--disable-exhaustive-tests \ | ||
--disable-benchmark \ | ||
--enable-experimental \ | ||
--enable-module-frost | ||
- name: build, failing in case of warnings | ||
run: make |