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/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
with:
shared-key: ${{ runner.os }}-R-CMD-Check
cache-on-failure: true
cache-all-crates: true
cache-workspace-crates: true

- name: Check disk space
run: df -h
Expand Down
26 changes: 20 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
- name: Install tree-sitter-cli
run: npm install -g tree-sitter-cli

- name: Install LLVM
run: sudo apt-get install -y llvm

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

Expand All @@ -37,18 +40,29 @@ jobs:
with:
shared-key: ${{ runner.os }}-build
cache-on-failure: true
cache-all-crates: true
cache-workspace-crates: true

- name: Run Rust formatting check
run: cargo fmt --all -- --check

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

- name: Build with cargo
run: cargo build --verbose
run: cargo build

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

- name: Run Rust tests
if: success()
run: cargo test --lib --bins
run: cargo test --lib --bins --profile dev

- name: Run Rust formatting check
if: success()
run: cargo fmt --all -- --check
- 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
34 changes: 28 additions & 6 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ jobs:
sudo docker image prune --all --force
sudo docker builder prune -a

- name: Download WASM demo artifact
uses: actions/download-artifact@v4
with:
name: wasm-demo
path: doc/wasm

- name: Setup Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -40,6 +34,9 @@ jobs:
- name: Install tree-sitter-cli
run: npm install -g tree-sitter-cli

- name: Install LLVM
run: sudo apt-get install -y llvm

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

Expand All @@ -48,6 +45,11 @@ jobs:
with:
shared-key: ${{ runner.os }}-publish
cache-on-failure: true
cache-all-crates: true
cache-workspace-crates: true

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

- name: Setup quarto
uses: quarto-dev/quarto-actions/setup@v2
Expand All @@ -63,6 +65,26 @@ jobs:
- name: Install Jupyter kernel
run: ./target/release/ggsql-jupyter --install

- 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

- name: Optimise WASM binary
working-directory: ggsql-wasm
run: wasm-opt pkg/ggsql_wasm_bg.wasm -o pkg/ggsql_wasm_bg.wasm -Oz --all-features

- name: Build WASM demo
working-directory: ggsql-wasm/demo
run: npm install && npm run build

- name: Copying output to doc/wasm...
working-directory: ggsql-wasm/demo
run: cp -r dist ../../doc/wasm

- name: Render and Publish
if: github.event_name == 'push' && github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
uses: quarto-dev/quarto-actions/publish@v2
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ["3.10", "3.11", "3.12", "3.13"]
include:
- os: ubuntu-latest
delay: 140
- os: macos-latest
delay: 210
- os: windows-latest
delay: 70
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -31,6 +38,10 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Stagger start by OS
run: sleep ${{ matrix.delay }}s
shell: bash

- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
Expand Down
71 changes: 0 additions & 71 deletions .github/workflows/wasm.yaml

This file was deleted.

Loading