Skip to content
Open
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
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ assignees: ''
- `version` in `[project]` section in `ggsql-jupyter/pyproject.toml`.
- ggsql-vscode
- `version` in `ggsql-vscode/package.json`.
- ggsql-wasm
- `version` in `ggsql-wasm/pkg/package.json`.
- [ ] Update lock files:
- Run `cargo build`, ensure `Cargo.lock` updates.
- Run `(cd ggsql-wasm && ./build-wasm.sh && cd demo && npm install)`, ensure that `ggsql-wasm/demo/package-lock.json` updates.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/autofmt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
gh pr checkout ${{ github.event.issue.number }} --repo "$GITHUB_REPOSITORY"

- name: Install Rust (rustfmt)
uses: dtolnay/rust-toolchain@1.86.0
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt

Expand Down
109 changes: 66 additions & 43 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,32 +40,36 @@ jobs:
# which invokes `protoc` at build time. Required for the ADBC test path.
run: sudo apt-get install -y protobuf-compiler

- name: Install png writer system libraries
# The png writer renders via wgpu/Vello, which needs a Vulkan
# adapter. ubuntu-latest has no GPU, so install Mesa's lavapipe software
# device. If no adapter is found anyway, the writer test skips its render
# assertion gracefully rather than failing.
# Text layout goes through parley/fontique, which links the system
# fontconfig on Linux to enumerate fonts, so its development files
# (fontconfig.pc plus headers) must be present at build time.
run: sudo apt-get install -y mesa-vulkan-drivers libfontconfig1-dev
- name: Install renderer system libraries
# Two separate needs, conflated easily:
#
# * mesa-vulkan-drivers is for the *raster* writers and the plot
# viewer, which render through wgpu and need a Vulkan adapter.
# ubuntu-latest has no GPU, so this installs Mesa's lavapipe software
# device. Without an adapter those tests skip their render assertion
# rather than fail.
# * fontconfig is for *every* renderer-backed feature including svg,
# pdf and hep: text layout goes through parley/fontique, which
# enumerates fonts through the system fontconfig whatever draws.
#
# Only the fontconfig *runtime* library is installed, deliberately:
# ggsql enables fontique's `fontconfig-dlopen`, so the `-dev` package
# is not needed at build time, and leaving it out makes every CI run a
# regression test for that. fonts-dejavu-core gives fontconfig
# something to find.
run: sudo apt-get install -y mesa-vulkan-drivers libfontconfig1 fonts-dejavu-core

- name: Install Rust
# 1.86 is the MSRV (declared as `rust-version` in /Cargo.toml, see
# /CLAUDE.md); this sets it as the default toolchain so plain `cargo`
# uses it. fmt, clippy and the library build run on 1.86 to guarantee
# the shipped crate builds there.
uses: dtolnay/rust-toolchain@1.86.0
# Stable, not the MSRV — clippy reads `rust-version` from /Cargo.toml,
# so running it here still guards the 1.86 floor. Why the default
# cannot be 1.86 itself: /CLAUDE.md, "Rust version (MSRV)".
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

- name: Install Rust (test toolchain)
# The experimental `adbc` feature's test path pulls `adbc_datafusion` →
# `datafusion` ≥53.1.0, which requires rustc ≥1.88. Steps that compile
# tests/dev-dependencies use this newer toolchain via `cargo +stable`.
# Installing it here does not change the default — plain `cargo` stays
# on 1.86.
run: rustup toolchain install stable --profile minimal
- name: Install Rust (CRAN toolchain)
# For the MSRV check below only. Does not change the default.
run: rustup toolchain install 1.86 --profile minimal

- name: Caching
uses: Swatinem/rust-cache@v2
Expand All @@ -80,48 +84,67 @@ jobs:
- name: Run Clippy
run: cargo clippy -- -D warnings

- name: Install wasm-pack
# `cargo install` runs at the repo root, where 1.86 is the default;
# `+stable` builds the tool on the newer toolchain. The actual wasm build
# below runs in ggsql-wasm/, whose nested rust-toolchain.toml selects stable.
run: cargo +stable install wasm-pack
- name: Install wasm-bindgen CLI
# The wasm build itself runs in ggsql-wasm/, whose nested
# rust-toolchain.toml selects stable.
run: |
cargo install -f wasm-bindgen-cli --version "$(awk '/^name = "wasm-bindgen"$/{f=1;next} f&&/^version = /{gsub(/[",]/,"");print $3;exit}' Cargo.lock)"

- name: Install wasm-opt
run: cargo install wasm-opt

- name: Build library (MSRV 1.86)
- name: Build library
run: cargo build

- name: Build all targets
# --all-targets compiles dev-dependencies (datafusion), so it needs ≥1.88.
run: cargo +stable build --all-targets
run: cargo build --all-targets

- name: Check the library builds on CRAN's toolchain (MSRV 1.86)
# The one step that actually proves the 1.86 floor — delete it and the
# MSRV silently rots. Keep the two flags: `--ignore-rust-version`
# bypasses `parley`'s *declared* 1.88, and library-only avoids the
# `adbc` dev-dependency path, which needs 1.88 for real. Background:
# /CLAUDE.md, "Rust version (MSRV)".
run: cargo +1.86 check --ignore-rust-version -p ggsql

- name: Run tree-sitter tests
working-directory: tree-sitter-ggsql
run: tree-sitter test

- name: Run Rust tests
run: cargo +stable test --lib --bins
run: cargo test --lib --bins

- name: Install dbc CLI and SQLite ADBC driver
run: |
curl -LsSf https://dbc.columnar.tech/install.sh | sh
"$HOME/.local/bin/dbc" install sqlite

- name: Run ADBC unit tests
run: cargo +stable test --features "adbc sqlite" --lib
run: cargo test --features "adbc sqlite" --lib

- name: Run ADBC SQLite equivalence tests
run: cargo +stable test --features "adbc sqlite" --lib -- --ignored equivalence
run: cargo test --features "adbc sqlite" --lib -- --ignored equivalence

- name: Run GPU-free writer tests
# svg, pdf and hep are default features and need no adapter, so these
# are hard assertions on every runner. hep-read adds the document
# round trip. Fast, and its failure is unambiguous, so it runs first.
run: 'cargo test --features hep-read --lib writer::'

- name: Run raster writer tests
# Non-default features needing a GPU adapter. Skips its render
# assertions gracefully if lavapipe did not come up.
run: 'cargo test --features "png jpeg tiff webp" --lib writer::'

- name: Run png writer tests
# Non-default feature. The hephaestus crate it renders through needs
# rustc ≥1.88 (wgpu), so it builds on +stable and is excluded from the
# 1.86 library build. Default features (incl. duckdb) supply the
# in-memory reader the test uses.
run: cargo +stable test --features png --lib writer::hephaestus
- name: Check the plot viewer builds
# Not a writer and it blocks on a window, so it is compiled, not run.
run: cargo check --features window

- name: Build WASM library
working-directory: ggsql-wasm/library
run: npm install && npm run build
- name: Check the visual-test harness builds
# `required-features` keeps it out of every other build here, so
# nothing else would catch it failing to compile. Checked, not run:
# it renders the whole doc corpus and wants an adapter to do it.
run: cargo check -p ggsql-cli --features png --example visual_test

- name: Build WASM package
working-directory: ggsql-wasm
run: wasm-pack build --target web --profile wasm --no-opt
run: ./ggsql-wasm/build-wasm.sh --skip-opt
22 changes: 7 additions & 15 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,9 @@ jobs:
run: sudo apt-get install -y unixodbc-dev

- name: Install Rust
# 1.86 is the MSRV (see /CLAUDE.md); this is the default toolchain, and
# the Jupyter kernel build below runs on it.
uses: dtolnay/rust-toolchain@1.86.0

- name: Install Rust (wasm toolchain)
# The wasm build is exempt from the 1.86 MSRV (R doesn't use wasm); some
# wasm-only deps need a newer rustc. Installing stable here does not
# change the default — plain `cargo` stays on 1.86, and
# ggsql-wasm/rust-toolchain.toml selects stable for the wasm build.
run: rustup toolchain install stable --profile minimal
# Stable. The 1.86 MSRV is checked by its own step in build.yaml
# rather than by pinning here; see /CLAUDE.md, "Rust version (MSRV)".
uses: dtolnay/rust-toolchain@stable

- name: Caching
uses: Swatinem/rust-cache@v2
Expand All @@ -58,13 +51,12 @@ jobs:
cache-on-failure: true
save-if: ${{ github.ref == 'refs/heads/main' }}

- name: Install wasm-pack
# `cargo install` runs at the repo root (pinned to 1.86); `+stable`
# builds these tools on the newer toolchain instead.
run: cargo +stable install wasm-pack
- name: Install wasm-bindgen CLI
run: |
cargo install -f wasm-bindgen-cli --version "$(awk '/^name = "wasm-bindgen"$/{f=1;next} f&&/^version = /{gsub(/[",]/,"");print $3;exit}' Cargo.lock)"

- name: Install wasm-opt
run: cargo +stable install wasm-opt
run: cargo install wasm-opt

- name: Setup quarto
uses: quarto-dev/quarto-actions/setup@v2
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/release-jupyter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
# No feature flags: `raster-plots` is default, precisely so that a
# plain build matches the released wheel. It adds the png/jpeg/tiff
# writers, which need a GPU adapter at *run* time and fall back to
# SVG without one, so a wheel carrying them still works on a
# headless machine. No before-script-linux either: ggsql enables
# fontique's `fontconfig-dlopen`, so the build needs no
# fontconfig-devel, which this image does not ship.
args: --release --out dist --auditwheel=skip
working-directory: ggsql-jupyter
manylinux: 2_28
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/release-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: npm install -g tree-sitter-cli

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.86.0
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-pc-windows-msvc

Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
run: npm install -g tree-sitter-cli

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.86.0
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-apple-darwin

Expand Down Expand Up @@ -224,7 +224,7 @@ jobs:
run: npm install -g tree-sitter-cli

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.86.0
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin

Expand Down Expand Up @@ -338,7 +338,7 @@ jobs:
run: npm install -g tree-sitter-cli

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.86.0
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-gnu

Expand Down Expand Up @@ -392,7 +392,7 @@ jobs:
run: npm install -g tree-sitter-cli

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.86.0
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-unknown-linux-gnu

Expand Down Expand Up @@ -450,7 +450,7 @@ jobs:
run: npm install -g tree-sitter-cli

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.86.0
uses: dtolnay/rust-toolchain@stable

- name: Get crates.io publish token
uses: rust-lang/crates-io-auth-action@v1
Expand Down Expand Up @@ -511,9 +511,8 @@ jobs:
run: npm install -g tree-sitter-cli

- name: Install Rust toolchain
# This job only builds wasm, which is exempt from the 1.86 MSRV (R
# doesn't use wasm) and needs a newer rustc, so the whole job runs on
# stable. ggsql-wasm/rust-toolchain.toml also selects stable for the build.
# Stable. wasm is exempt from the MSRV (see /CLAUDE.md, "Rust version
# (MSRV)"), and ggsql-wasm/rust-toolchain.toml selects stable anyway.
uses: dtolnay/rust-toolchain@stable

- name: Update apt package index
Expand All @@ -522,8 +521,9 @@ jobs:
- name: Install LLVM
run: sudo apt-get install -y llvm

- name: Install wasm-pack
run: cargo install wasm-pack
- name: Install wasm-bindgen CLI
run: |
cargo install -f wasm-bindgen-cli --version "$(awk '/^name = "wasm-bindgen"$/{f=1;next} f&&/^version = /{gsub(/[",]/,"");print $3;exit}' Cargo.lock)"

- name: Install wasm-opt
run: cargo install wasm-opt
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test-extension.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ jobs:
cache-dependency-path: ggsql-vscode/package-lock.json

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.86.0
# Stable, matching every other job that builds a real binary — and the
# kernel released to PyPI. The 1.86 MSRV covers the library only and is
# checked in build.yaml; see /CLAUDE.md, "Rust version (MSRV)".
uses: dtolnay/rust-toolchain@stable

# Use publish.yaml's cargo cache with `save-if: false`.
- name: Restore the cargo cache built by publish.yaml
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,8 @@ perf.data*
criterion/

# WASM artifacts
/ggsql-wasm/pkg/
/ggsql-wasm/pkg/dist/
/ggsql-wasm/demo/dist/
/ggsql-wasm/library/dist/

# C/C++ build artifacts (from tree-sitter)
*.o
Expand Down
Loading
Loading