Adding upstream version 26.25.3.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
bc7749846c
commit
d9e621c994
83 changed files with 67317 additions and 67680 deletions
78
.github/workflows/benchmark-sqlglot.yml
vendored
Normal file
78
.github/workflows/benchmark-sqlglot.yml
vendored
Normal file
|
@ -0,0 +1,78 @@
|
|||
name: Benchmark pull requests
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created, edited, deleted]
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
run-benchmark:
|
||||
name: run benchmark
|
||||
runs-on: ubuntu-latest
|
||||
if: |
|
||||
(github.event_name == 'issue_comment' &&
|
||||
contains(github.event.comment.body, '/benchmark') &&
|
||||
github.event.issue.pull_request) ||
|
||||
(github.event_name == 'pull_request' &&
|
||||
contains(github.event.pull_request.body, '/benchmark'))
|
||||
steps:
|
||||
- name: Checkout PR branch
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Needed to fetch main branch too
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.13
|
||||
- name: Create a virtual environment
|
||||
run: |
|
||||
python -m venv .venv
|
||||
source ./.venv/bin/activate
|
||||
python -m pip install --upgrade pip
|
||||
pip install pyperf
|
||||
- name: Run benchmark on PR branch
|
||||
run: |
|
||||
source ./.venv/bin/activate
|
||||
make install-dev
|
||||
make install-dev-rs-release
|
||||
python benchmarks/parse.py --quiet --output bench_parse_pr.json
|
||||
python benchmarks/optimize.py --quiet --fast --output bench_optimize_pr.json
|
||||
- name: Checkout main branch into subdir
|
||||
run: |
|
||||
git fetch origin main
|
||||
git worktree add main-branch origin/main
|
||||
- name: Reset virtual environment
|
||||
run: |
|
||||
rm -rf .venv
|
||||
python -m venv .venv
|
||||
source ./.venv/bin/activate
|
||||
python -m pip install --upgrade pip
|
||||
pip install pyperf
|
||||
- name: Run benchmark on main branch
|
||||
run: |
|
||||
source ./.venv/bin/activate
|
||||
cd main-branch
|
||||
make install-dev
|
||||
make install-dev-rs-release
|
||||
python benchmarks/parse.py --quiet --output ../bench_parse_main.json
|
||||
python benchmarks/optimize.py --quiet --fast --output ../bench_optimize_main.json
|
||||
cd ..
|
||||
- name: Compare benchmarks and save results
|
||||
run: |
|
||||
source ./.venv/bin/activate
|
||||
python -m pyperf compare_to bench_parse_pr.json bench_parse_main.json --table --table-format=md > bench_parse_comparison.txt
|
||||
python -m pyperf compare_to bench_optimize_pr.json bench_optimize_main.json --table --table-format=md > bench_optimize_comparison.txt
|
||||
- name: Combine benchmark outputs
|
||||
run: |
|
||||
echo "## Parsing Benchmark" > combined_benchmarks.md
|
||||
cat bench_parse_comparison.txt >> combined_benchmarks.md
|
||||
echo -e "\n---\n" >> combined_benchmarks.md
|
||||
echo "## Optimization Benchmark" >> combined_benchmarks.md
|
||||
cat bench_optimize_comparison.txt >> combined_benchmarks.md
|
||||
- name: Comment on PR for parse benchmark results
|
||||
uses: peter-evans/create-or-update-comment@v4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number || github.event.pull_request.number }}
|
||||
body-file: combined_benchmarks.md
|
|
@ -1,8 +1,10 @@
|
|||
name: Benchmark Rust tokenizer changes
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'sqlglotrs/**'
|
||||
name: benchmark pull requests
|
||||
|
||||
jobs:
|
||||
run-benchmark:
|
||||
name: run benchmark
|
|
@ -1,4 +1,4 @@
|
|||
name: Publish Python Release to PyPI
|
||||
name: Publish sqlglot and sqlglotrs to PyPI
|
||||
|
||||
on:
|
||||
push:
|
|
@ -1,20 +1,21 @@
|
|||
name: Test and Lint Python Package
|
||||
name: Run tests and linter checks
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
run-checks:
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: pip
|
||||
|
@ -26,7 +27,7 @@ jobs:
|
|||
source ./.venv/bin/activate
|
||||
python -m pip install --upgrade pip
|
||||
make install-dev
|
||||
- name: Run checks (linter, code style, tests)
|
||||
- name: Run tests and linter checks
|
||||
run: |
|
||||
source ./.venv/bin/activate
|
||||
make check
|
Loading…
Add table
Add a link
Reference in a new issue