Skip to content

feat: Upgrade to Hyper 1.0, Tonic 0.12, and hyper-rustls 0.27 #6307

feat: Upgrade to Hyper 1.0, Tonic 0.12, and hyper-rustls 0.27

feat: Upgrade to Hyper 1.0, Tonic 0.12, and hyper-rustls 0.27 #6307

Workflow file for this run

name: Go bindings tests CI
on:
push:
branches: [ "main" ]
pull_request:
merge_group:
branches: [ "main" ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
golang-bindings:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# needed because we run out of disk space during tests
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# when set to "true" but frees about 6 GB
tool-cache: true
- uses: dtolnay/rust-toolchain@stable
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '>=1.21'
- name: get TCL
run: sudo apt-get install -y tcl8.6-dev
- name: Install Protoc
uses: arduino/setup-protoc@v2
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Build sqld server
run: cargo build --release -p libsql-server
- name: Build sql-experimental
run: cargo b -j16 --release -p sql-experimental
- name: go-libsql checkout
uses: actions/checkout@v3
with:
repository: tursodatabase/go-libsql
ref: "main"
path: "go-libsql"
- name: Copy sql-experimental library to go-libsql
run: cp target/release/libsql_experimental.a go-libsql/lib/darwin_arm64/
&& cp target/release/libsql_experimental.a go-libsql/lib/linux_amd64/
&& cp target/release/libsql_experimental.a go-libsql/lib/linux_arm64/
&& cp bindings/c/include/libsql.h go-libsql/lib/include/
- name: Start sqld server
run: |
RUST_LOG=trace ./target/release/sqld --http-listen-addr 127.0.0.1:8080 --grpc-listen-addr 127.0.0.1:5001 &
# Wait for server to be ready
for i in {1..30}; do
if curl -s http://127.0.0.1:8080/health > /dev/null 2>&1; then
echo "Server is ready!"
break
fi
echo "Waiting for server... ($i/30)"
sleep 1
done
# Give server a bit more time to fully initialize gRPC
sleep 2
- name: Run go-libsql tests
working-directory: go-libsql
run: go test -v -count=1 -run TestAutoSync ./... 2>&1 | head -100
env:
LIBSQL_PRIMARY_URL: "http://127.0.0.1:8080"
RUST_LOG: "trace"