@@ -70,15 +70,15 @@ jobs:
7070 client-secret : ${{ secrets.SPICE_MANAGEMENT_CLIENT_SECRET_PROD }}
7171
7272 - name : Log in to GHCR
73- if : ${{ env.SYSTEM_UNDER_TEST == 'spice_cloud' || startsWith(env.SYSTEM_UNDER_TEST, 'postgres-') }}
73+ if : ${{ env.SYSTEM_UNDER_TEST == 'spice_cloud' || startsWith(env.SYSTEM_UNDER_TEST, 'postgres-') || startsWith(env.SYSTEM_UNDER_TEST, 'mongodb-') || startsWith(env.SYSTEM_UNDER_TEST, 'dynamodb-') }}
7474 uses : docker/login-action@v3
7575 with :
7676 registry : ghcr.io
7777 username : ${{ github.actor }}
7878 password : ${{ secrets.GITHUB_TOKEN }}
7979
8080 - name : pull spidapter image
81- if : ${{ env.SYSTEM_UNDER_TEST == 'spice_cloud' || startsWith(env.SYSTEM_UNDER_TEST, 'postgres-') }}
81+ if : ${{ env.SYSTEM_UNDER_TEST == 'spice_cloud' || startsWith(env.SYSTEM_UNDER_TEST, 'postgres-') || startsWith(env.SYSTEM_UNDER_TEST, 'mongodb-') || startsWith(env.SYSTEM_UNDER_TEST, 'dynamodb-') }}
8282 run : docker pull ghcr.io/spiceai/spidapter:latest
8383
8484 - uses : ./.github/actions/build-spicebench
@@ -108,6 +108,78 @@ jobs:
108108 path : ~/.spice/bin/databricks-system-adapter
109109 key : databricks-system-adapter-${{ runner.os }}-${{ hashFiles('system-adapters/databricks/Cargo.toml', 'system-adapters/databricks/Cargo.lock', 'system-adapters/databricks/src/**/*.rs', 'crates/system-adapter-protocol/Cargo.toml', 'crates/system-adapter-protocol/src/**/*.rs') }}
110110
111+ - name : Checkout adbc-mongodb Rust driver
112+ if : ${{ startsWith(env.SYSTEM_UNDER_TEST, 'mongodb') }}
113+ uses : actions/checkout@v6
114+ with :
115+ repository : spiceai/adbc-mongodb
116+ ref : main
117+ path : adbc-mongodb
118+
119+ - name : Restore adbc-mongodb cache
120+ if : ${{ startsWith(env.SYSTEM_UNDER_TEST, 'mongodb') }}
121+ id : cache-adbc-mongodb
122+ uses : actions/cache/restore@v4
123+ with :
124+ path : adbc-mongodb/rust/target/release/libadbc_mongodb.so
125+ key : adbc-mongodb-${{ runner.os }}-${{ hashFiles('adbc-mongodb/rust/Cargo.lock') }}
126+ restore-keys : |
127+ adbc-mongodb-${{ runner.os }}-
128+
129+ - name : Build adbc-mongodb Rust driver
130+ if : ${{ startsWith(env.SYSTEM_UNDER_TEST, 'mongodb') && steps.cache-adbc-mongodb.outputs.cache-hit != 'true' }}
131+ id : build-adbc-mongodb
132+ run : cargo build --release --manifest-path adbc-mongodb/rust/Cargo.toml
133+
134+ - name : Save adbc-mongodb cache
135+ if : ${{ startsWith(env.SYSTEM_UNDER_TEST, 'mongodb') && steps.build-adbc-mongodb.outcome == 'success' }}
136+ uses : actions/cache/save@v4
137+ with :
138+ path : adbc-mongodb/rust/target/release/libadbc_mongodb.so
139+ key : adbc-mongodb-${{ runner.os }}-${{ hashFiles('adbc-mongodb/rust/Cargo.lock') }}
140+
141+ - name : Install adbc-mongodb Rust driver
142+ if : ${{ startsWith(env.SYSTEM_UNDER_TEST, 'mongodb') }}
143+ run : |
144+ sudo install -m 755 adbc-mongodb/rust/target/release/libadbc_mongodb.so /usr/local/lib/libmongodb.so
145+ sudo ldconfig
146+
147+ - name : Checkout adbc-dynamodb Rust driver
148+ if : ${{ startsWith(env.SYSTEM_UNDER_TEST, 'dynamodb') }}
149+ uses : actions/checkout@v6
150+ with :
151+ repository : spiceai/adbc-dynamodb
152+ ref : main
153+ path : adbc-dynamodb
154+
155+ - name : Restore adbc-dynamodb cache
156+ if : ${{ startsWith(env.SYSTEM_UNDER_TEST, 'dynamodb') }}
157+ id : cache-adbc-dynamodb
158+ uses : actions/cache/restore@v4
159+ with :
160+ path : adbc-dynamodb/rust/target/release/libadbc_dynamodb.so
161+ key : adbc-dynamodb-${{ runner.os }}-${{ hashFiles('adbc-dynamodb/rust/Cargo.lock') }}
162+ restore-keys : |
163+ adbc-dynamodb-${{ runner.os }}-
164+
165+ - name : Build adbc-dynamodb Rust driver
166+ if : ${{ startsWith(env.SYSTEM_UNDER_TEST, 'dynamodb') && steps.cache-adbc-dynamodb.outputs.cache-hit != 'true' }}
167+ id : build-adbc-dynamodb
168+ run : cargo build --release --manifest-path adbc-dynamodb/rust/Cargo.toml
169+
170+ - name : Save adbc-dynamodb cache
171+ if : ${{ startsWith(env.SYSTEM_UNDER_TEST, 'dynamodb') && steps.build-adbc-dynamodb.outcome == 'success' }}
172+ uses : actions/cache/save@v4
173+ with :
174+ path : adbc-dynamodb/rust/target/release/libadbc_dynamodb.so
175+ key : adbc-dynamodb-${{ runner.os }}-${{ hashFiles('adbc-dynamodb/rust/Cargo.lock') }}
176+
177+ - name : Install adbc-dynamodb Rust driver
178+ if : ${{ startsWith(env.SYSTEM_UNDER_TEST, 'dynamodb') }}
179+ run : |
180+ sudo install -m 755 adbc-dynamodb/rust/target/release/libadbc_dynamodb.so /usr/local/lib/libdynamodb.so
181+ sudo ldconfig
182+
111183 - name : Validate adapter configuration
112184 env :
113185 SPICEAI_API_KEY : ${{ env.SPICEAI_API_KEY }}
@@ -184,27 +256,17 @@ jobs:
184256 ;;
185257
186258 mongodb)
187- if ! command -v docker >/dev/null 2>&1 ; then
188- echo "docker is required for postgres mode "
259+ if [ ! -f /usr/local/lib/libmongodb.so ] ; then
260+ echo "MongoDB ADBC driver not found at /usr/local/lib/libmongodb.so; build step may have failed "
189261 exit 1
190262 fi
191-
192- docker image inspect ghcr.io/spiceai/spidapter:latest >/dev/null 2>&1 || {
193- echo "spidapter docker image not found locally; pull step may have failed"
194- exit 1
195- }
196263 ;;
197264
198265 dynamodb)
199- if ! command -v docker >/dev/null 2>&1 ; then
200- echo "docker is required for postgres mode "
266+ if [ ! -f /usr/local/lib/libdynamodb.so ] ; then
267+ echo "DynamoDB ADBC driver not found at /usr/local/lib/libdynamodb.so; build step may have failed "
201268 exit 1
202269 fi
203-
204- docker image inspect ghcr.io/spiceai/spidapter:latest >/dev/null 2>&1 || {
205- echo "spidapter docker image not found locally; pull step may have failed"
206- exit 1
207- }
208270 ;;
209271
210272 *)
0 commit comments