Skip to content

Commit a73ac8d

Browse files
committed
Merge branch 'main' into ado-net-driver
2 parents 6c2d8d0 + c2e43d1 commit a73ac8d

Some content is hidden

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

42 files changed

+1171
-119
lines changed

.github/workflows/integration-tests-on-emulator.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ jobs:
5454
env:
5555
SPANNER_EMULATOR_HOST: localhost:9010
5656
run: |
57-
bundle exec rake compile
57+
bundle exec rake compile:x86_64-linux
5858
bundle exec rspec spec/integration/
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
name: Build and Publish Native Ruby Gem
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build-shared-library-binaries:
8+
strategy:
9+
matrix:
10+
os: [ubuntu-latest, macos-13, windows-latest]
11+
include:
12+
# Config for Linux
13+
- os: ubuntu-latest
14+
platform_tasks: "compile:aarch64-linux compile:x86_64-linux"
15+
artifact_name: "linux-binaries"
16+
artifact_path: "spannerlib/wrappers/spannerlib-ruby/lib/spannerlib/*-linux/"
17+
18+
# Config for macOS (Apple Silicon + Intel)
19+
# Note: macos-13 is an Intel runner (x86_64) but can cross-compile to Apple Silicon (aarch64)
20+
- os: macos-13
21+
platform_tasks: "compile:aarch64-darwin compile:x86_64-darwin"
22+
artifact_name: "darwin-binaries"
23+
artifact_path: "spannerlib/wrappers/spannerlib-ruby/lib/spannerlib/*-darwin/"
24+
25+
# Config for Windows
26+
- os: windows-latest
27+
platform_tasks: "compile:x64-mingw32"
28+
artifact_name: "windows-binaries"
29+
artifact_path: "spannerlib/wrappers/spannerlib-ruby/lib/spannerlib/x64-mingw32/"
30+
31+
runs-on: ${{ matrix.os }}
32+
33+
steps:
34+
- name: Checkout code
35+
uses: actions/checkout@v4
36+
37+
- name: Set up Go
38+
uses: actions/setup-go@v5
39+
with:
40+
go-version: 1.25.x
41+
42+
- name: Set up Ruby
43+
uses: ruby/setup-ruby@v1
44+
with:
45+
ruby-version: '3.3'
46+
bundler-cache: true
47+
working-directory: 'spannerlib/wrappers/spannerlib-ruby'
48+
49+
- name: Install cross-compilers (Linux)
50+
if: matrix.os == 'ubuntu-latest'
51+
run: |
52+
sudo apt-get update
53+
# GCC cross toolchain and binutils for aarch64
54+
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
55+
# Mingw-w64 cross toolchain for Windows target (x86_64)
56+
sudo apt-get install -y gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64
57+
echo "=== cross compiler versions ==="
58+
aarch64-linux-gnu-gcc --version || true
59+
aarch64-linux-gnu-g++ --version || true
60+
x86_64-w64-mingw32-gcc --version || true
61+
which aarch64-linux-gnu-gcc || true
62+
which x86_64-w64-mingw32-gcc || true
63+
64+
# The cross-compiler step for macOS is removed,
65+
# as the built-in Clang on macOS runners can handle both Intel and ARM.
66+
67+
- name: Compile Binaries
68+
working-directory: spannerlib/wrappers/spannerlib-ruby
69+
run: |
70+
# This runs the specific Rake tasks for this OS
71+
# e.g., "rake compile:aarch64-linux compile:x86_64-linux"
72+
bundle exec rake ${{ matrix.platform_tasks }}
73+
74+
- name: Upload Binaries as Artifact
75+
uses: actions/upload-artifact@v4
76+
with:
77+
name: ${{ matrix.artifact_name }}
78+
path: ${{ matrix.artifact_path }}
79+
80+
publish:
81+
name: Package and Publish Gem
82+
# This job runs only after all 'build' jobs have succeeded
83+
needs: build-shared-library-binaries
84+
runs-on: ubuntu-latest
85+
86+
# This gives the job permission to publish to RubyGems
87+
permissions:
88+
id-token: write
89+
contents: read
90+
91+
steps:
92+
- name: Checkout code
93+
uses: actions/checkout@v4
94+
95+
- name: Set up Ruby
96+
uses: ruby/setup-ruby@v1
97+
with:
98+
ruby-version: '3.3'
99+
bundler-cache: true
100+
working-directory: 'spannerlib/wrappers/spannerlib-ruby'
101+
102+
- name: Download all binaries
103+
uses: actions/download-artifact@v4
104+
with:
105+
# No name means it downloads ALL artifacts from this workflow
106+
# The binaries will be placed in their original paths
107+
path: spannerlib/wrappers/spannerlib-ruby/lib/spannerlib/
108+
109+
- name: List downloaded files (for debugging)
110+
run: ls -R spannerlib/wrappers/spannerlib-ruby/lib/spannerlib/
111+
112+
- name: Build Gem
113+
working-directory: spannerlib/wrappers/spannerlib-ruby
114+
run: gem build spannerlib-ruby.gemspec
115+
116+
- name: Publish to RubyGems
117+
working-directory: spannerlib/wrappers/spannerlib-ruby
118+
run: |
119+
# Make all built .gem files available to be pushed
120+
mkdir -p $HOME/.gem
121+
touch $HOME/.gem/credentials
122+
chmod 0600 $HOME/.gem/credentials
123+
124+
# This uses the new "Trusted Publishing" feature.
125+
# https://guides.rubygems.org/publishing/#publishing-with-github-actions
126+
printf -- "---\n:rubygems_api_key: Bearer ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
127+
128+
# Push the gem
129+
gem push *.gem
130+
env:
131+
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
132+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# .github/workflows/lint.yml
2+
3+
name: RuboCop Linter
4+
5+
on:
6+
push:
7+
branches:
8+
- main
9+
pull_request:
10+
11+
jobs:
12+
ruby-wrapper-lint:
13+
runs-on: ubuntu-latest
14+
15+
defaults:
16+
run:
17+
working-directory: spannerlib/wrappers/spannerlib-ruby
18+
19+
steps:
20+
- name: Check out code
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Ruby
24+
uses: ruby/setup-ruby@v1
25+
with:
26+
ruby-version: '3.3'
27+
bundler-cache: true
28+
working-directory: spannerlib/wrappers/spannerlib-ruby
29+
30+
- name: Run RuboCop
31+
run: bundle exec rubocop

.github/workflows/spanner-lib-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ jobs:
8888
runs-on: ${{ matrix.os }}
8989
steps:
9090
- name: Checkout code
91-
uses: actions/checkout@v4
91+
uses: actions/checkout@v5
9292
with:
9393
submodules: 'true'
9494
- name: Install dotnet
95-
uses: actions/setup-dotnet@v4
95+
uses: actions/setup-dotnet@v5
9696
with:
9797
dotnet-version: '8.0.x'
9898
- name: Create temporary global.json
@@ -108,7 +108,7 @@ jobs:
108108
run: dotnet --version
109109
shell: bash
110110
- name: Install Go
111-
uses: actions/setup-go@v5
111+
uses: actions/setup-go@v6
112112
with:
113113
go-version: ${{ matrix.go-version }}
114114
# Install compilers for cross-compiling between operating systems.

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

.release-please-manifest.json

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

CHANGES.md

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

3+
## [1.21.0](https://github.com/googleapis/go-sql-spanner/compare/v1.20.0...v1.21.0) (2025-10-29)
4+
5+
6+
### Features
7+
8+
* Support connect_timeout property ([#577](https://github.com/googleapis/go-sql-spanner/issues/577)) ([6f87624](https://github.com/googleapis/go-sql-spanner/commit/6f87624c06e79401e3916d485b3d74ecc0c6bc05)), refs [#576](https://github.com/googleapis/go-sql-spanner/issues/576)
9+
10+
11+
### Bug Fixes
12+
13+
* Remove git submodule from project ([#586](https://github.com/googleapis/go-sql-spanner/issues/586)) ([bb26650](https://github.com/googleapis/go-sql-spanner/commit/bb26650539dda6e744f7db13eb197b55fec1a2da))
14+
* Update all dependencies ([#584](https://github.com/googleapis/go-sql-spanner/issues/584)) ([19ce82c](https://github.com/googleapis/go-sql-spanner/commit/19ce82c583fccf425d0dff5b3202b82a7d81d8f1))
15+
16+
## [1.20.0](https://github.com/googleapis/go-sql-spanner/compare/v1.19.0...v1.20.0) (2025-10-28)
17+
18+
19+
### Features
20+
21+
* Parse SET TRANSACTION statements ([#549](https://github.com/googleapis/go-sql-spanner/issues/549)) ([6a396d3](https://github.com/googleapis/go-sql-spanner/commit/6a396d35be5b7ccbc5bb0e1cae5ad503ed705e5e))
22+
* Support transaction options in BEGIN statements ([#550](https://github.com/googleapis/go-sql-spanner/issues/550)) ([49e945e](https://github.com/googleapis/go-sql-spanner/commit/49e945e9a22be07f88168e80cdc842b23daa5a67))
23+
24+
25+
### Bug Fixes
26+
27+
* Return batch update counts also when retries are disabled ([#566](https://github.com/googleapis/go-sql-spanner/issues/566)) ([6f8c1e2](https://github.com/googleapis/go-sql-spanner/commit/6f8c1e2546459ae930ed6faae4127da6c25ceeef))
28+
* Update all dependencies ([#551](https://github.com/googleapis/go-sql-spanner/issues/551)) ([7457422](https://github.com/googleapis/go-sql-spanner/commit/7457422807a9b2ed83cacc13f251c5826d64165f))
29+
* Update all dependencies ([#556](https://github.com/googleapis/go-sql-spanner/issues/556)) ([e99a48f](https://github.com/googleapis/go-sql-spanner/commit/e99a48ff51f500640caa19713ef475e5874cfe00))
30+
* Update dependency io.grpc:grpc-bom to v1.76.0 ([#561](https://github.com/googleapis/go-sql-spanner/issues/561)) ([fdd991b](https://github.com/googleapis/go-sql-spanner/commit/fdd991ba039b9a6409105d29e10d52b2ca041662))
31+
* Update dependency io.netty:netty-transport-native-epoll to v4.2.7.final ([#559](https://github.com/googleapis/go-sql-spanner/issues/559)) ([5b79883](https://github.com/googleapis/go-sql-spanner/commit/5b7988325b723ac603e5e6812e847283ed5a136c))
32+
* Update protobuf monorepo ([#562](https://github.com/googleapis/go-sql-spanner/issues/562)) ([32cd9f0](https://github.com/googleapis/go-sql-spanner/commit/32cd9f0567546be05df04455745c140424c588e4))
33+
334
## [1.19.0](https://github.com/googleapis/go-sql-spanner/compare/v1.18.1...v1.19.0) (2025-10-07)
435

536

benchmarks/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ require (
1010
cloud.google.com/go v0.123.0
1111
cloud.google.com/go/spanner v1.86.1
1212
github.com/google/uuid v1.6.0
13-
github.com/googleapis/go-sql-spanner v1.19.0
14-
google.golang.org/api v0.253.0
13+
github.com/googleapis/go-sql-spanner v1.20.0
14+
google.golang.org/api v0.254.0
1515
google.golang.org/grpc v1.76.0
1616
google.golang.org/protobuf v1.36.10
1717
)

benchmarks/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,8 +1371,8 @@ google.golang.org/api v0.108.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/
13711371
google.golang.org/api v0.110.0/go.mod h1:7FC4Vvx1Mooxh8C5HWjzZHcavuS2f6pmJpZx60ca7iI=
13721372
google.golang.org/api v0.111.0/go.mod h1:qtFHvU9mhgTJegR31csQ+rwxyUTHOKFqCKWp1J0fdw0=
13731373
google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg=
1374-
google.golang.org/api v0.253.0 h1:apU86Eq9Q2eQco3NsUYFpVTfy7DwemojL7LmbAj7g/I=
1375-
google.golang.org/api v0.253.0/go.mod h1:PX09ad0r/4du83vZVAaGg7OaeyGnaUmT/CYPNvtLCbw=
1374+
google.golang.org/api v0.254.0 h1:jl3XrGj7lRjnlUvZAbAdhINTLbsg5dbjmR90+pTQvt4=
1375+
google.golang.org/api v0.254.0/go.mod h1:5BkSURm3D9kAqjGvBNgf0EcbX6Rnrf6UArKkwBzAyqQ=
13761376
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
13771377
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
13781378
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=

0 commit comments

Comments
 (0)