Skip to content

Commit 5562e86

Browse files
authored
Merge branch 'main' into feat/runs-and-triggers-ui
2 parents 81df101 + 6a74085 commit 5562e86

404 files changed

Lines changed: 31002 additions & 17939 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/build-distributions.yml‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,29 @@ jobs:
141141
run: |
142142
npm ci
143143
npm run build
144+
# In a Linux dist build the largest single-unit crates compile at the same time and can use
145+
# more memory than the hosted runner has; the runner is then lost without a build error.
146+
# Swap on the host, which the manylinux container shares, absorbs that peak, the builds below
147+
# compile at most three crates at a time, and the sampled memory use is reported afterwards.
148+
- name: Add swap for the Linux dist build
149+
if: inputs.prebuilt-run-id == '' && runner.os == 'Linux' && inputs.cargo-profile == 'dist'
150+
run: |
151+
free -m
152+
avail="$(df -BG --output=avail /mnt 2>/dev/null | tail -n 1 | tr -dc '0-9')"
153+
swap_dir=/mnt
154+
if [[ -z "${avail}" || "${avail}" -lt 24 ]]; then
155+
swap_dir=""
156+
fi
157+
swapfile="${swap_dir}/sqlbuild-dist.swap"
158+
sudo fallocate -l 16G "${swapfile}"
159+
sudo chmod 600 "${swapfile}"
160+
sudo mkswap "${swapfile}" > /dev/null
161+
sudo swapon "${swapfile}"
162+
free -m
163+
( while :; do
164+
free -m | awk '/^Mem:/ { ram = $3 } /^Swap:/ { swap = $3 } END { print ram, swap }'
165+
sleep 5
166+
done ) > "${RUNNER_TEMP}/dist-memory.log" 2>&1 &
144167
# maturin-action downloads maturin from GitHub releases, which can fail on its own. Each
145168
# build retries once; macOS and Windows then fall back to the same maturin from PyPI. Linux
146169
# builds need the action's manylinux container, so they have no fallback.
@@ -154,6 +177,7 @@ jobs:
154177
args: >-
155178
--profile ${{ inputs.cargo-profile }} --out dist --features extension-module
156179
${{ matrix.platform.name == 'linux-x86_64' && '--timings' || '' }}
180+
${{ runner.os == 'Linux' && inputs.cargo-profile == 'dist' && '--jobs 3' || '' }}
157181
target: ${{ matrix.platform.target }}
158182
manylinux: auto
159183
- id: extension-retry
@@ -167,6 +191,7 @@ jobs:
167191
args: >-
168192
--profile ${{ inputs.cargo-profile }} --out dist --features extension-module
169193
${{ matrix.platform.name == 'linux-x86_64' && '--timings' || '' }}
194+
${{ runner.os == 'Linux' && inputs.cargo-profile == 'dist' && '--jobs 3' || '' }}
170195
target: ${{ matrix.platform.target }}
171196
manylinux: auto
172197
- name: Build the extension with maturin from PyPI
@@ -197,6 +222,7 @@ jobs:
197222
args: >-
198223
--profile ${{ inputs.cargo-profile }} --out dist --manifest-path crates/sqlbuild-cli/Cargo.toml --features ui
199224
${{ matrix.platform.name == 'linux-x86_64' && '--timings' || '' }}
225+
${{ runner.os == 'Linux' && inputs.cargo-profile == 'dist' && '--jobs 3' || '' }}
200226
target: ${{ matrix.platform.target }}
201227
manylinux: auto
202228
- id: cli-retry
@@ -214,6 +240,7 @@ jobs:
214240
args: >-
215241
--profile ${{ inputs.cargo-profile }} --out dist --manifest-path crates/sqlbuild-cli/Cargo.toml --features ui
216242
${{ matrix.platform.name == 'linux-x86_64' && '--timings' || '' }}
243+
${{ runner.os == 'Linux' && inputs.cargo-profile == 'dist' && '--jobs 3' || '' }}
217244
target: ${{ matrix.platform.target }}
218245
manylinux: auto
219246
- name: Build sqb with maturin from PyPI
@@ -230,6 +257,16 @@ jobs:
230257
--profile ${{ inputs.cargo-profile }} --out dist --manifest-path crates/sqlbuild-cli/Cargo.toml --features ui
231258
TARGET: ${{ matrix.platform.target }}
232259
run: scripts/maturin_from_pypi.sh build ${MATURIN_ARGS}
260+
- name: Report memory use of the Linux dist build
261+
if: >-
262+
always() && inputs.prebuilt-run-id == '' && runner.os == 'Linux'
263+
&& inputs.cargo-profile == 'dist'
264+
run: |
265+
free -m
266+
grep -E '^pswp(in|out) ' /proc/vmstat
267+
awk '{ if ($1 > ram) ram = $1; if ($2 > swap) swap = $2; if ($1 + $2 > both) both = $1 + $2 }
268+
END { printf "Peak used memory: RAM %d MiB, swap %d MiB, together %d MiB\n", ram, swap, both }' \
269+
"${RUNNER_TEMP}/dist-memory.log" | tee -a "${GITHUB_STEP_SUMMARY}"
233270
- name: Upload the cargo build timing reports
234271
if: inputs.prebuilt-run-id == '' && matrix.platform.name == 'linux-x86_64'
235272
uses: actions/upload-artifact@v4

‎.github/workflows/verify.yml‎

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,10 +845,20 @@ jobs:
845845
include:
846846
- kind: dense
847847
max_ratio: "1.10"
848+
# Temporary native-analysis allowance on the cold compile only; restore 1.10 when the
849+
# native analysis cold path is optimised. Measured 1.326/1.347 wall and 1.642/1.677 CPU
850+
# over main, plus 10%.
851+
cold_max_ratio: "1.49"
852+
cold_max_cpu_ratio: "1.85"
848853
edit_max_ratio: "1.20"
849854
edit_max_cpu_ratio: "1.75"
850855
- kind: fresh
851856
max_ratio: "1.10"
857+
# Temporary native-analysis allowance on the cold compile only; restore 1.10 when the
858+
# native analysis cold path is optimised. Measured 1.285/1.153 wall and 1.551/1.404 CPU
859+
# over main, plus 10%.
860+
cold_max_ratio: "1.42"
861+
cold_max_cpu_ratio: "1.71"
852862
- kind: dense
853863
label: contracts CPU vs base
854864
gate_phase: contracts_cpu_ms
@@ -857,7 +867,9 @@ jobs:
857867
label: model analysis CPU vs base
858868
gate_phase: model_analysis_cpu_ms
859869
compile_args: --compile-arg=--select=*
860-
max_ratio: "1.10"
870+
# Temporary native-analysis allowance; restore 1.10 when the native analysis path is
871+
# optimised. Measured 2.660/2.554 over main, plus 10%.
872+
max_ratio: "2.93"
861873
- kind: dense
862874
label: custom rules CPU vs base
863875
gate_phase: custom_rules_cpu_ms
@@ -922,12 +934,16 @@ jobs:
922934
env:
923935
KIND: ${{ matrix.kind }}
924936
MAX_RATIO: ${{ matrix.max_ratio }}
937+
COLD_MAX_RATIO: ${{ matrix.cold_max_ratio }}
938+
COLD_MAX_CPU_RATIO: ${{ matrix.cold_max_cpu_ratio }}
925939
EDIT_MAX_RATIO: ${{ matrix.edit_max_ratio }}
926940
EDIT_MAX_CPU_RATIO: ${{ matrix.edit_max_cpu_ratio }}
927941
run: |
928942
uv run python -m scripts.compare_compile_performance \
929943
--kind "${KIND}" \
930944
--modes cold warm edit \
945+
${COLD_MAX_RATIO:+--cold-max-ratio "$COLD_MAX_RATIO"} \
946+
${COLD_MAX_CPU_RATIO:+--cold-max-cpu-ratio "$COLD_MAX_CPU_RATIO"} \
931947
${EDIT_MAX_RATIO:+--edit-max-ratio "$EDIT_MAX_RATIO"} \
932948
${EDIT_MAX_CPU_RATIO:+--edit-max-cpu-ratio "$EDIT_MAX_CPU_RATIO"} \
933949
--max-ratio "${MAX_RATIO}" \

‎.release-please-manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.207.0"
2+
".": "0.208.0"
33
}

‎CHANGELOG.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## [0.208.0](https://github.com/sqlstack-io/sqlbuild/compare/v0.207.0...v0.208.0) (2026-11-10)
4+
5+
6+
### Features
7+
8+
* **analysis:** analyse models with SQLQuack's native parsers and semantics ([#1397](https://github.com/sqlstack-io/sqlbuild/issues/1397)) ([c642221](https://github.com/sqlstack-io/sqlbuild/commit/c6422211de5b66bb42b67059873bf781ee41cda2))
9+
310
## [0.207.0](https://github.com/sqlstack-io/sqlbuild/compare/v0.206.0...v0.207.0) (2026-11-10)
411

512

0 commit comments

Comments
 (0)