update link (#484) #1164
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Increase disk space | |
| run: | | |
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL | |
| sudo docker image prune --all --force | |
| sudo docker builder prune -a | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| - name: Install tree-sitter-cli | |
| run: npm install -g tree-sitter-cli | |
| - name: Install LLVM | |
| run: sudo apt-get install -y llvm | |
| - name: Install protobuf compiler | |
| # adbc_datafusion (dev-dep) → datafusion → substrait → prost-build, | |
| # which invokes `protoc` at build time. Required for the ADBC test path. | |
| run: sudo apt-get install -y protobuf-compiler | |
| - 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 | |
| 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: Caching | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: ${{ runner.os }}-build | |
| cache-on-failure: true | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Run Rust formatting check | |
| run: cargo fmt --all -- --check | |
| - 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: Build library (MSRV 1.86) | |
| run: cargo build | |
| - name: Build all targets | |
| # --all-targets compiles dev-dependencies (datafusion), so it needs ≥1.88. | |
| run: cargo +stable build --all-targets | |
| - name: Run tree-sitter tests | |
| working-directory: tree-sitter-ggsql | |
| run: tree-sitter test | |
| - name: Run Rust tests | |
| run: cargo +stable 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 | |
| - name: Run ADBC SQLite equivalence tests | |
| run: cargo +stable test --features "adbc sqlite" --lib -- --ignored equivalence | |
| - name: Build WASM library | |
| working-directory: ggsql-wasm/library | |
| run: npm install && npm run build | |
| - name: Build WASM package | |
| working-directory: ggsql-wasm | |
| run: wasm-pack build --target web --profile wasm --no-opt |