Skip to content

Commit ebba100

Browse files
committed
refactor: break drivers out into separate crates
also cleans up significant technical debt
1 parent 7cbaeea commit ebba100

File tree

369 files changed

+5029
-10047
lines changed

Some content is hidden

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

369 files changed

+5029
-10047
lines changed

.github/workflows/sqlx.yml

+26-64
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ jobs:
3232
runs-on: ubuntu-20.04
3333
strategy:
3434
matrix:
35-
runtime: [async-std, tokio, actix]
36-
tls: [native, rustls, none]
35+
runtime: [async-std, tokio]
36+
tls: [native-tls, rustls, none]
3737
steps:
3838
- uses: actions/checkout@v2
3939

@@ -53,22 +53,22 @@ jobs:
5353
args: >
5454
--manifest-path sqlx-core/Cargo.toml
5555
--no-default-features
56-
--features offline,all-databases,all-types,migrate,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
56+
--features json,offline,migrate,_rt-${{ matrix.runtime }},_tls-${{ matrix.tls }}
5757
5858
- uses: actions-rs/cargo@v1
5959
with:
6060
command: check
6161
args: >
6262
--no-default-features
63-
--features offline,all-databases,all-types,migrate,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }},macros
63+
--features all-databases,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }},macros
6464
6565
test:
6666
name: Unit Test
6767
runs-on: ubuntu-20.04
6868
strategy:
6969
matrix:
70-
runtime: [async-std, tokio, actix]
71-
tls: [native, rustls, none]
70+
runtime: [async-std, tokio]
71+
tls: [native-tls, rustls, none]
7272
steps:
7373
- uses: actions/checkout@v2
7474

@@ -87,7 +87,7 @@ jobs:
8787
command: test
8888
args: >
8989
--manifest-path sqlx-core/Cargo.toml
90-
--features offline,all-databases,all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
90+
--features json,_rt-${{ matrix.runtime }},_tls-${{ matrix.tls }}
9191
9292
cli:
9393
name: CLI Binaries
@@ -138,7 +138,7 @@ jobs:
138138
runs-on: ubuntu-20.04
139139
strategy:
140140
matrix:
141-
runtime: [async-std, tokio, actix]
141+
runtime: [async-std, tokio]
142142
needs: check
143143
steps:
144144
- uses: actions/checkout@v2
@@ -155,16 +155,18 @@ jobs:
155155
with:
156156
key: ${{ runner.os }}-sqlite-${{ matrix.runtime }}-${{ matrix.tls }}
157157

158+
- run: echo "using ${DATABASE_URL}"
159+
158160
- uses: actions-rs/cargo@v1
159161
with:
160162
command: test
161163
args: >
162164
--no-default-features
163-
--features any,macros,migrate,sqlite,all-types,runtime-${{ matrix.runtime }}
165+
--features any,macros,sqlite,_unstable-all-types,runtime-${{ matrix.runtime }}
164166
--
165167
--test-threads=1
166168
env:
167-
DATABASE_URL: sqlite://tests/sqlite/sqlite.db
169+
DATABASE_URL: sqlite:tests/sqlite/sqlite.db
168170
RUSTFLAGS: --cfg sqlite_ipaddr
169171
LD_LIBRARY_PATH: /tmp/sqlite3-lib
170172

@@ -174,8 +176,8 @@ jobs:
174176
strategy:
175177
matrix:
176178
postgres: [14, 10]
177-
runtime: [async-std, tokio, actix]
178-
tls: [native, rustls, none]
179+
runtime: [async-std, tokio]
180+
tls: [native-tls, rustls, none]
179181
needs: check
180182
steps:
181183
- uses: actions/checkout@v2
@@ -198,7 +200,7 @@ jobs:
198200
with:
199201
command: build
200202
args: >
201-
--features postgres,all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
203+
--features postgres,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
202204
203205
- run: |
204206
docker-compose -f tests/docker-compose.yml run -d -p 5432:5432 --name postgres_${{ matrix.postgres }} postgres_${{ matrix.postgres }}
@@ -209,7 +211,7 @@ jobs:
209211
command: test
210212
args: >
211213
--no-default-features
212-
--features any,postgres,macros,all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
214+
--features any,postgres,macros,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
213215
env:
214216
DATABASE_URL: postgres://postgres:password@localhost:5432/sqlx
215217
# FIXME: needed to disable `ltree` tests in Postgres 9.6
@@ -222,7 +224,7 @@ jobs:
222224
command: test
223225
args: >
224226
--no-default-features
225-
--features any,postgres,macros,migrate,all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
227+
--features any,postgres,macros,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
226228
env:
227229
DATABASE_URL: postgres://postgres:password@localhost:5432/sqlx?sslmode=verify-ca&sslrootcert=.%2Ftests%2Fcerts%2Fca.crt
228230
# FIXME: needed to disable `ltree` tests in Postgres 9.6
@@ -235,8 +237,8 @@ jobs:
235237
strategy:
236238
matrix:
237239
mysql: [8, 5_7]
238-
runtime: [async-std, tokio, actix]
239-
tls: [native, rustls, none]
240+
runtime: [async-std, tokio]
241+
tls: [native-tls, rustls, none]
240242
needs: check
241243
steps:
242244
- uses: actions/checkout@v2
@@ -255,7 +257,7 @@ jobs:
255257
with:
256258
command: build
257259
args: >
258-
--features mysql,all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
260+
--features mysql,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
259261
260262
- run: docker-compose -f tests/docker-compose.yml run -d -p 3306:3306 mysql_${{ matrix.mysql }}
261263
- run: sleep 60
@@ -265,7 +267,7 @@ jobs:
265267
command: test
266268
args: >
267269
--no-default-features
268-
--features any,mysql,macros,migrate,all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
270+
--features any,mysql,macros,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
269271
env:
270272
DATABASE_URL: mysql://root:password@localhost:3306/sqlx?ssl-mode=disabled
271273

@@ -276,7 +278,7 @@ jobs:
276278
command: test
277279
args: >
278280
--no-default-features
279-
--features any,mysql,macros,migrate,all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
281+
--features any,mysql,macros,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
280282
env:
281283
DATABASE_URL: mysql://root:password@localhost:3306/sqlx
282284

@@ -286,8 +288,8 @@ jobs:
286288
strategy:
287289
matrix:
288290
mariadb: [10_6, 10_3]
289-
runtime: [async-std, tokio, actix]
290-
tls: [native, rustls, none]
291+
runtime: [async-std, tokio]
292+
tls: [native-tls, rustls, none]
291293
needs: check
292294
steps:
293295
- uses: actions/checkout@v2
@@ -306,7 +308,7 @@ jobs:
306308
with:
307309
command: build
308310
args: >
309-
--features mysql,all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
311+
--features mysql,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
310312
311313
- run: docker-compose -f tests/docker-compose.yml run -d -p 3306:3306 mariadb_${{ matrix.mariadb }}
312314
- run: sleep 30
@@ -316,46 +318,6 @@ jobs:
316318
command: test
317319
args: >
318320
--no-default-features
319-
--features any,mysql,macros,migrate,all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
321+
--features any,mysql,macros,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
320322
env:
321323
DATABASE_URL: mysql://root:password@localhost:3306/sqlx
322-
323-
mssql:
324-
name: MSSQL
325-
runs-on: ubuntu-20.04
326-
strategy:
327-
matrix:
328-
mssql: [2019, 2017]
329-
runtime: [async-std, tokio, actix]
330-
tls: [native, rustls, none]
331-
needs: check
332-
steps:
333-
- uses: actions/checkout@v2
334-
335-
- uses: actions-rs/toolchain@v1
336-
with:
337-
profile: minimal
338-
toolchain: stable
339-
override: true
340-
341-
- uses: Swatinem/rust-cache@v1
342-
with:
343-
key: ${{ runner.os }}-mssql-${{ matrix.runtime }}-${{ matrix.tls }}-${{ hashFiles('**/Cargo.lock') }}
344-
345-
- uses: actions-rs/cargo@v1
346-
with:
347-
command: build
348-
args: >
349-
--features mssql,all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
350-
351-
- run: docker-compose -f tests/docker-compose.yml run -d -p 1433:1433 mssql_${{ matrix.mssql }}
352-
- run: sleep 80 # MSSQL takes a "bit" to startup
353-
354-
- uses: actions-rs/cargo@v1
355-
with:
356-
command: test
357-
args: >
358-
--no-default-features
359-
--features any,mssql,macros,migrate,all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
360-
env:
361-
DATABASE_URL: mssql://sa:Password123!@localhost/sqlx

0 commit comments

Comments
 (0)