Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge old jqlang/jq master to the latest #2596

Merged
merged 22 commits into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.gitattributes export-ignore
.gitignore export-ignore
* text=auto eol=lf
70 changes: 70 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Linux Build
on:
push:
branches:
- master
pull_request:
jobs:
linux:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
name: [linux-clang, linux-gcc]
include:
- name: linux-clang
os: ubuntu-22.04
compiler: clang
cflags: ''
- name: linux-gcc
os: ubuntu-22.04
compiler: gcc
cflags: '-Wnonnull'
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
submodules: true
- name: Install packages
run: |
sudo apt-get update -qq
sudo apt-get install -y \
automake \
autoconf \
bison \
flex \
gdb \
python3 \
valgrind
- name: Build
env:
CC: ${{ matrix.compiler }}
MAKEVARS: ${{ matrix.makevars }}
run: |
autoreconf -fi
rm src/lexer.c src/lexer.h
rm src/parser.c src/parser.h
./configure --disable-valgrind --with-oniguruma=builtin YACC="$(which bison) -y" $COVERAGE
make -j4
make dist
- name: Test
env:
CC: ${{ matrix.compiler }}
MAKEVARS: ${{ matrix.makevars }}
run: |
ulimit -c unlimited
make -j4 check
- name: Upload Test Logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: test-logs
path: |
test-suite.log
tests/*.log
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: jq-${{ matrix.name }}
path: |
jq
62 changes: 62 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: MacOS Build
on:
push:
branches:
- master
pull_request:
jobs:
macos:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
name: [macos-12-clang, macos-13-clang]
include:
- name: macos-12-clang
os: macos-12
compiler: clang
- name: macos-13-clang
os: macos-13
compiler: clang
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
submodules: true
- name: Install packages
run: |
brew update
brew install autoconf automake libtool flex bison python3
sed -i.bak '/^AM_INIT_AUTOMAKE(\[-Wno-portability 1\.14\])$/s/14/11/' modules/oniguruma/configure.ac
- name: Build
env:
CC: ${{ matrix.compiler }}
MAKEVARS: ${{ matrix.makevars }}
run: |
autoreconf -fi
rm src/lexer.c src/lexer.h
rm src/parser.c src/parser.h
./configure --disable-valgrind --with-oniguruma=builtin YACC="$(brew --prefix)/opt/bison/bin/bison -y" $COVERAGE
make -j4
make dist
- name: Test
env:
CC: ${{ matrix.compiler }}
MAKEVARS: ${{ matrix.makevars }}
run: |
ulimit -c unlimited
make -j4 check
- name: Upload Test Logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: test-logs
path: |
test-suite.log
tests/*.log
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: jq-${{ matrix.name }}
path: |
jq
77 changes: 77 additions & 0 deletions .github/workflows/scanbuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
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
os: ubuntu-18.04
compiler: clang
cflags: ''
steps:
- name: Clone repository
uses: actions/checkout@v1
- name: Open Submodule(s)
run: |
git submodule update --init --recursive
- name: Install packages
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update -qq
sudo apt-get install -y automake autoconf bison flex gdb python valgrind clang-tools
- 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 -fi
rm src/lexer.c src/lexer.h
rm src/parser.c src/parser.h
./configure --with-oniguruma=builtin YACC="$(which bison) -y" $COVERAGE
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@v2
with:
name: Scan-Build Reports
path: '/tmp/scan-build*/'
45 changes: 45 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Windows Build
on:
push:
branches:
- master
pull_request:
jobs:
windows:
runs-on: windows-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
submodules: true
- uses: msys2/setup-msys2@v2
with:
update: true
install: >-
base-devel
git
clang
autoconf
automake
libtool
p7zip
- shell: msys2 {0}
run: |
autoreconf -fiv
./configure --disable-valgrind --with-oniguruma=builtin --disable-shared --enable-static --enable-all-static
make -j4
make SUBDIRS= "TESTS=tests/mantest tests/jqtest tests/onigtest tests/base64test" check
- name: Upload Test Logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: test-logs
path: |
test-suite.log
tests/*.log
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: jq-windows
path: |
jq.exe
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,8 @@ cross-compilation environment. See also
["Cross compilation"](https://github.com/jqlang/jq/wiki/Cross-compilation) on
the wiki.

Send questions to https://stackoverflow.com/questions/tagged/jq or to the #jq channel (https://web.libera.chat/#jq) on Libera.Chat (https://libera.chat/).

# Community

* Send questions to https://stackoverflow.com/questions/tagged/jq.
* Join our [Discord server](https://discord.gg/yg6yjNmgAC).
2 changes: 1 addition & 1 deletion modules/oniguruma
Submodule oniguruma updated 62 files
+1 −4 .gitignore
+3 −2 CMakeLists.txt
+73 −0 HISTORY
+1 −1 Makefile.am
+7 −14 README
+48 −0 README.md
+1 −13 README_japanese
+1 −1 compile
+58 −76 config.guess
+13 −23 config.sub
+3 −3 configure.ac
+1 −1 depcomp
+1 −1 dist.info
+11 −1 doc/API
+292 −283 doc/API.ja
+7 −7 doc/FAQ.ja
+95 −13 doc/RE
+327 −242 doc/RE.ja
+695 −695 doc/UNICODE_PROPERTIES
+7 −5 index.html
+7 −5 index_ja.html
+177 −196 install-sh
+1 −1 missing
+1 −1 sample/Makefile.am
+2 −0 src/Makefile.am
+3 −0 src/config.h.cmake.in
+2 −2 src/euc_jp.c
+2 −0 src/gperf_fold_key_conv.py
+3 −1 src/gperf_unfold_key_conv.py
+7 −0 src/make_unicode_egcb.sh
+236 −0 src/make_unicode_egcb_data.py
+3 −1 src/make_unicode_fold_data.py
+369 −354 src/make_unicode_property_data.py
+1 −0 src/onigposix.h
+32 −12 src/oniguruma.h
+2,735 −1,670 src/regcomp.c
+10 −0 src/regenc.c
+13 −4 src/regenc.h
+48 −50 src/regerror.c
+647 −286 src/regexec.c
+4 −4 src/regext.c
+187 −150 src/regint.h
+1,894 −648 src/regparse.c
+269 −166 src/regparse.h
+4 −1 src/regposix.c
+19 −5 src/regsyntax.c
+241 −243 src/st.c
+207 −5 src/unicode.c
+1,382 −0 src/unicode_egcb_data.c
+9 −3 src/unicode_fold1_key.c
+9 −3 src/unicode_fold2_key.c
+9 −3 src/unicode_fold3_key.c
+12,100 −12,094 src/unicode_property_data.c
+10 −4 src/unicode_property_data_posix.c
+10 −4 src/unicode_unfold_key.c
+3 −38 src/utf8.c
+12 −3 test-driver
+4 −0 test/.gitignore
+9 −4 test/Makefile.am
+1,074 −0 test/test_utf8.c
+118 −0 test/testc.c
+52 −0 test/testu.c
2 changes: 1 addition & 1 deletion tests/jq.test
Original file line number Diff line number Diff line change
Expand Up @@ -1565,7 +1565,7 @@ try (1%.) catch .
jq: error: Division by zero? at <top-level>, line 1:

# Basic numbers tests: integers, powers of two
[range(-52;52;1)] as $powers | [$powers[]|pow(2;.)|log2] == $powers
[range(-52;52;1)] as $powers | [$powers[]|pow(2;.)|log2|round] == $powers
null
true

Expand Down