1
0
mirror of https://github.com/stedolan/jq.git synced 2024-05-11 05:55:39 +00:00
stedolan-jq/.github/workflows/scanbuild.yml

76 lines
2.6 KiB
YAML
Raw Normal View History

Merge old jqlang/jq master to the latest (#2596) * Try making some GitHub Actions * GHA: Add OS X, Windows, and Linux w/ scan-build builds * Add link to discord server Add link to discord server * Update Ubuntu to 22.04 for GitHub Actions * Remove if condition for Ubuntu build * Fix MacOS OS on GitHub Actions * Fix python3 package on GitHub Actions * Disalbe valgrind Getting failed tests: https://github.com/jqlang/jq/actions/runs/5113866588/jobs/9193542140#step:9:341 * Format file * Fix macos build * Fix syntax errors of windows build https://github.com/jqlang/jq/actions/runs/5114162556/workflow * Install windows package with choco * Pin oniguruma to 5a24a49d710a9e3bb8ff11d12e1eae5a9f9df40c MacOS build [fails](https://github.com/jqlang/jq/actions/runs/5114162555/jobs/9194126677#step:6:3160) due to ``` posix.c:94:3: error: implicit declaration of function 'onig_end' is invalid in C99 [-Werror,-Wimplicit-function-declaration] onig_end(); ``` The current `oniguruma` revision 6fa38f4084b448592888ed9ee43c6e90a46b5f5c (15 Mar 2017) lacks the following explicit declaration in src/onigposix.h: ``` ONIG_EXTERN int onig_end P_((void)); ``` This was added to oniguruma in revision 5a24a49d710a9e3bb8ff11d12e1eae5a9f9df40c (8 Sep 2017). Ref: https://github.com/jqlang/jq/issues/2381 * Revert windows build to use pacman * Don't zip jq.exe * Fixing windows build * Update .gitattriutes for eol on Windows * Skip workflow_dispatch for windows build * Clean up builds * Use LF line endings for all text Ref: https://github.com/actions/checkout/issues/135 * Fix test that has rounding error https://github.com/jqlang/jq/pull/2596#issuecomment-1568498993 * Enable CI for all --------- Co-authored-by: Nicolas Williams <nico@cryptonector.com>
2023-06-01 10:09:39 -07:00
name: Linux Clang scan-build Static Analyzer Build
on:
# Don't do this for PRs. It eats up minutes.
push:
branches:
- 'master'
- 'scan-build'
paths:
- '.github/workflows/scanbuild.yml'
jobs:
unix:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
name: [linux-clang]
include:
- name: linux-clang
2023-06-13 00:53:01 -04:00
os: ubuntu-latest
Merge old jqlang/jq master to the latest (#2596) * Try making some GitHub Actions * GHA: Add OS X, Windows, and Linux w/ scan-build builds * Add link to discord server Add link to discord server * Update Ubuntu to 22.04 for GitHub Actions * Remove if condition for Ubuntu build * Fix MacOS OS on GitHub Actions * Fix python3 package on GitHub Actions * Disalbe valgrind Getting failed tests: https://github.com/jqlang/jq/actions/runs/5113866588/jobs/9193542140#step:9:341 * Format file * Fix macos build * Fix syntax errors of windows build https://github.com/jqlang/jq/actions/runs/5114162556/workflow * Install windows package with choco * Pin oniguruma to 5a24a49d710a9e3bb8ff11d12e1eae5a9f9df40c MacOS build [fails](https://github.com/jqlang/jq/actions/runs/5114162555/jobs/9194126677#step:6:3160) due to ``` posix.c:94:3: error: implicit declaration of function 'onig_end' is invalid in C99 [-Werror,-Wimplicit-function-declaration] onig_end(); ``` The current `oniguruma` revision 6fa38f4084b448592888ed9ee43c6e90a46b5f5c (15 Mar 2017) lacks the following explicit declaration in src/onigposix.h: ``` ONIG_EXTERN int onig_end P_((void)); ``` This was added to oniguruma in revision 5a24a49d710a9e3bb8ff11d12e1eae5a9f9df40c (8 Sep 2017). Ref: https://github.com/jqlang/jq/issues/2381 * Revert windows build to use pacman * Don't zip jq.exe * Fixing windows build * Update .gitattriutes for eol on Windows * Skip workflow_dispatch for windows build * Clean up builds * Use LF line endings for all text Ref: https://github.com/actions/checkout/issues/135 * Fix test that has rounding error https://github.com/jqlang/jq/pull/2596#issuecomment-1568498993 * Enable CI for all --------- Co-authored-by: Nicolas Williams <nico@cryptonector.com>
2023-06-01 10:09:39 -07:00
compiler: clang
cflags: ''
steps:
- name: Clone repository
uses: actions/checkout@v4
Merge old jqlang/jq master to the latest (#2596) * Try making some GitHub Actions * GHA: Add OS X, Windows, and Linux w/ scan-build builds * Add link to discord server Add link to discord server * Update Ubuntu to 22.04 for GitHub Actions * Remove if condition for Ubuntu build * Fix MacOS OS on GitHub Actions * Fix python3 package on GitHub Actions * Disalbe valgrind Getting failed tests: https://github.com/jqlang/jq/actions/runs/5113866588/jobs/9193542140#step:9:341 * Format file * Fix macos build * Fix syntax errors of windows build https://github.com/jqlang/jq/actions/runs/5114162556/workflow * Install windows package with choco * Pin oniguruma to 5a24a49d710a9e3bb8ff11d12e1eae5a9f9df40c MacOS build [fails](https://github.com/jqlang/jq/actions/runs/5114162555/jobs/9194126677#step:6:3160) due to ``` posix.c:94:3: error: implicit declaration of function 'onig_end' is invalid in C99 [-Werror,-Wimplicit-function-declaration] onig_end(); ``` The current `oniguruma` revision 6fa38f4084b448592888ed9ee43c6e90a46b5f5c (15 Mar 2017) lacks the following explicit declaration in src/onigposix.h: ``` ONIG_EXTERN int onig_end P_((void)); ``` This was added to oniguruma in revision 5a24a49d710a9e3bb8ff11d12e1eae5a9f9df40c (8 Sep 2017). Ref: https://github.com/jqlang/jq/issues/2381 * Revert windows build to use pacman * Don't zip jq.exe * Fixing windows build * Update .gitattriutes for eol on Windows * Skip workflow_dispatch for windows build * Clean up builds * Use LF line endings for all text Ref: https://github.com/actions/checkout/issues/135 * Fix test that has rounding error https://github.com/jqlang/jq/pull/2596#issuecomment-1568498993 * Enable CI for all --------- Co-authored-by: Nicolas Williams <nico@cryptonector.com>
2023-06-01 10:09:39 -07:00
- name: Open Submodule(s)
run: |
git submodule update --init --recursive
- name: Install packages
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update -qq
2023-06-13 00:53:01 -04:00
sudo apt-get install -y automake autoconf bison flex gdb python3 valgrind clang-tools
Merge old jqlang/jq master to the latest (#2596) * Try making some GitHub Actions * GHA: Add OS X, Windows, and Linux w/ scan-build builds * Add link to discord server Add link to discord server * Update Ubuntu to 22.04 for GitHub Actions * Remove if condition for Ubuntu build * Fix MacOS OS on GitHub Actions * Fix python3 package on GitHub Actions * Disalbe valgrind Getting failed tests: https://github.com/jqlang/jq/actions/runs/5113866588/jobs/9193542140#step:9:341 * Format file * Fix macos build * Fix syntax errors of windows build https://github.com/jqlang/jq/actions/runs/5114162556/workflow * Install windows package with choco * Pin oniguruma to 5a24a49d710a9e3bb8ff11d12e1eae5a9f9df40c MacOS build [fails](https://github.com/jqlang/jq/actions/runs/5114162555/jobs/9194126677#step:6:3160) due to ``` posix.c:94:3: error: implicit declaration of function 'onig_end' is invalid in C99 [-Werror,-Wimplicit-function-declaration] onig_end(); ``` The current `oniguruma` revision 6fa38f4084b448592888ed9ee43c6e90a46b5f5c (15 Mar 2017) lacks the following explicit declaration in src/onigposix.h: ``` ONIG_EXTERN int onig_end P_((void)); ``` This was added to oniguruma in revision 5a24a49d710a9e3bb8ff11d12e1eae5a9f9df40c (8 Sep 2017). Ref: https://github.com/jqlang/jq/issues/2381 * Revert windows build to use pacman * Don't zip jq.exe * Fixing windows build * Update .gitattriutes for eol on Windows * Skip workflow_dispatch for windows build * Clean up builds * Use LF line endings for all text Ref: https://github.com/actions/checkout/issues/135 * Fix test that has rounding error https://github.com/jqlang/jq/pull/2596#issuecomment-1568498993 * Enable CI for all --------- Co-authored-by: Nicolas Williams <nico@cryptonector.com>
2023-06-01 10:09:39 -07:00
- name: Prep
run: |
#pyenv global 3.6.7
#pip3 install pipenv
#(cd docs && pipenv sync)
#if [ -n "$COVERAGE" ]; then pip install --user cpp-coveralls; fi
echo SHELL=$SHELL
echo PATH=$PATH
which bison
bison --version
- name: Build
env:
CC: ${{ matrix.compiler }}
MAKEVARS: ${{ matrix.makevars }}
run: |
autoreconf -i
./configure --with-oniguruma=builtin $COVERAGE
Merge old jqlang/jq master to the latest (#2596) * Try making some GitHub Actions * GHA: Add OS X, Windows, and Linux w/ scan-build builds * Add link to discord server Add link to discord server * Update Ubuntu to 22.04 for GitHub Actions * Remove if condition for Ubuntu build * Fix MacOS OS on GitHub Actions * Fix python3 package on GitHub Actions * Disalbe valgrind Getting failed tests: https://github.com/jqlang/jq/actions/runs/5113866588/jobs/9193542140#step:9:341 * Format file * Fix macos build * Fix syntax errors of windows build https://github.com/jqlang/jq/actions/runs/5114162556/workflow * Install windows package with choco * Pin oniguruma to 5a24a49d710a9e3bb8ff11d12e1eae5a9f9df40c MacOS build [fails](https://github.com/jqlang/jq/actions/runs/5114162555/jobs/9194126677#step:6:3160) due to ``` posix.c:94:3: error: implicit declaration of function 'onig_end' is invalid in C99 [-Werror,-Wimplicit-function-declaration] onig_end(); ``` The current `oniguruma` revision 6fa38f4084b448592888ed9ee43c6e90a46b5f5c (15 Mar 2017) lacks the following explicit declaration in src/onigposix.h: ``` ONIG_EXTERN int onig_end P_((void)); ``` This was added to oniguruma in revision 5a24a49d710a9e3bb8ff11d12e1eae5a9f9df40c (8 Sep 2017). Ref: https://github.com/jqlang/jq/issues/2381 * Revert windows build to use pacman * Don't zip jq.exe * Fixing windows build * Update .gitattriutes for eol on Windows * Skip workflow_dispatch for windows build * Clean up builds * Use LF line endings for all text Ref: https://github.com/actions/checkout/issues/135 * Fix test that has rounding error https://github.com/jqlang/jq/pull/2596#issuecomment-1568498993 * Enable CI for all --------- Co-authored-by: Nicolas Williams <nico@cryptonector.com>
2023-06-01 10:09:39 -07:00
scan-build --keep-going make -j4
- name: Test
env:
CC: ${{ matrix.compiler }}
MAKEVARS: ${{ matrix.makevars }}
run: |
ulimit -c unlimited
scan-build --keep-going make -j4 check
- name: Core dump stacks
run: |
echo "thread apply all bt" > /tmp/x
find . -name core -print | while read core; do gdb -batch -x x `file "$core"|sed -e "s/^[^']*'//" -e "s/[ '].*$//"` "$core"; done
if [ "$(find . -name core -print | wc -l)" -gt 0 ]; then false; fi
- name: Test logs
if: ${{ failure() }}
run: |
cat test-suite.log
cat tests/*.log
- name: Upload Logs
uses: actions/upload-artifact@v4
Merge old jqlang/jq master to the latest (#2596) * Try making some GitHub Actions * GHA: Add OS X, Windows, and Linux w/ scan-build builds * Add link to discord server Add link to discord server * Update Ubuntu to 22.04 for GitHub Actions * Remove if condition for Ubuntu build * Fix MacOS OS on GitHub Actions * Fix python3 package on GitHub Actions * Disalbe valgrind Getting failed tests: https://github.com/jqlang/jq/actions/runs/5113866588/jobs/9193542140#step:9:341 * Format file * Fix macos build * Fix syntax errors of windows build https://github.com/jqlang/jq/actions/runs/5114162556/workflow * Install windows package with choco * Pin oniguruma to 5a24a49d710a9e3bb8ff11d12e1eae5a9f9df40c MacOS build [fails](https://github.com/jqlang/jq/actions/runs/5114162555/jobs/9194126677#step:6:3160) due to ``` posix.c:94:3: error: implicit declaration of function 'onig_end' is invalid in C99 [-Werror,-Wimplicit-function-declaration] onig_end(); ``` The current `oniguruma` revision 6fa38f4084b448592888ed9ee43c6e90a46b5f5c (15 Mar 2017) lacks the following explicit declaration in src/onigposix.h: ``` ONIG_EXTERN int onig_end P_((void)); ``` This was added to oniguruma in revision 5a24a49d710a9e3bb8ff11d12e1eae5a9f9df40c (8 Sep 2017). Ref: https://github.com/jqlang/jq/issues/2381 * Revert windows build to use pacman * Don't zip jq.exe * Fixing windows build * Update .gitattriutes for eol on Windows * Skip workflow_dispatch for windows build * Clean up builds * Use LF line endings for all text Ref: https://github.com/actions/checkout/issues/135 * Fix test that has rounding error https://github.com/jqlang/jq/pull/2596#issuecomment-1568498993 * Enable CI for all --------- Co-authored-by: Nicolas Williams <nico@cryptonector.com>
2023-06-01 10:09:39 -07:00
with:
name: Scan-Build Reports
path: '/tmp/scan-build*/'