Skip to content

Commit 99142cb

Browse files
committed
Break drivers out into separate crates, clean up some technical debt (#2039)
* WIP rt refactors * refactor: break drivers out into separate crates also cleans up significant technical debt
1 parent 11c69a2 commit 99142cb

File tree

400 files changed

+7084
-11038
lines changed

Some content is hidden

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

400 files changed

+7084
-11038
lines changed

.github/workflows/sqlx.yml

+27-65
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ jobs:
3333
runs-on: ubuntu-20.04
3434
strategy:
3535
matrix:
36-
runtime: [async-std, tokio, actix]
37-
tls: [native-tls, rustls]
36+
runtime: [async-std, tokio]
37+
tls: [native-tls, rustls, none]
3838
steps:
3939
- uses: actions/checkout@v2
4040

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

@@ -88,7 +88,7 @@ jobs:
8888
command: test
8989
args: >
9090
--manifest-path sqlx-core/Cargo.toml
91-
--features offline,all-databases,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
91+
--features json,_rt-${{ matrix.runtime }},_tls-${{ matrix.tls }}
9292
9393
cli:
9494
name: CLI Binaries
@@ -139,8 +139,7 @@ jobs:
139139
runs-on: ubuntu-20.04
140140
strategy:
141141
matrix:
142-
runtime: [async-std, tokio, actix]
143-
tls: [native-tls, rustls]
142+
runtime: [async-std, tokio]
144143
needs: check
145144
steps:
146145
- uses: actions/checkout@v2
@@ -157,16 +156,18 @@ jobs:
157156
with:
158157
key: ${{ runner.os }}-sqlite-${{ matrix.runtime }}-${{ matrix.tls }}
159158

159+
- run: echo "using ${DATABASE_URL}"
160+
160161
- uses: actions-rs/cargo@v1
161162
with:
162163
command: test
163164
args: >
164165
--no-default-features
165-
--features any,macros,migrate,sqlite,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
166+
--features any,macros,sqlite,_unstable-all-types,runtime-${{ matrix.runtime }}
166167
--
167168
--test-threads=1
168169
env:
169-
DATABASE_URL: sqlite://tests/sqlite/sqlite.db
170+
DATABASE_URL: sqlite:tests/sqlite/sqlite.db
170171
RUSTFLAGS: --cfg sqlite_ipaddr
171172
LD_LIBRARY_PATH: /tmp/sqlite3-lib
172173

@@ -176,8 +177,8 @@ jobs:
176177
strategy:
177178
matrix:
178179
postgres: [14, 10]
179-
runtime: [async-std, tokio, actix]
180-
tls: [native-tls, rustls]
180+
runtime: [async-std, tokio]
181+
tls: [native-tls, rustls, none]
181182
needs: check
182183
steps:
183184
- uses: actions/checkout@v2
@@ -200,7 +201,7 @@ jobs:
200201
with:
201202
command: build
202203
args: >
203-
--features postgres,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
204+
--features postgres,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
204205
205206
- run: |
206207
docker-compose -f tests/docker-compose.yml run -d -p 5432:5432 --name postgres_${{ matrix.postgres }} postgres_${{ matrix.postgres }}
@@ -211,19 +212,20 @@ jobs:
211212
command: test
212213
args: >
213214
--no-default-features
214-
--features any,postgres,macros,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
215+
--features any,postgres,macros,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
215216
env:
216217
DATABASE_URL: postgres://postgres:password@localhost:5432/sqlx
217218
# FIXME: needed to disable `ltree` tests in Postgres 9.6
218219
# but `PgLTree` should just fall back to text format
219220
RUSTFLAGS: --cfg postgres_${{ matrix.postgres }}
220221

221222
- uses: actions-rs/cargo@v1
223+
if: matrix.tls != 'none'
222224
with:
223225
command: test
224226
args: >
225227
--no-default-features
226-
--features any,postgres,macros,migrate,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
228+
--features any,postgres,macros,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
227229
env:
228230
DATABASE_URL: postgres://postgres:password@localhost:5432/sqlx?sslmode=verify-ca&sslrootcert=.%2Ftests%2Fcerts%2Fca.crt
229231
# FIXME: needed to disable `ltree` tests in Postgres 9.6
@@ -236,8 +238,8 @@ jobs:
236238
strategy:
237239
matrix:
238240
mysql: [8, 5_7]
239-
runtime: [async-std, tokio, actix]
240-
tls: [native-tls, rustls]
241+
runtime: [async-std, tokio]
242+
tls: [native-tls, rustls, none]
241243
needs: check
242244
steps:
243245
- uses: actions/checkout@v2
@@ -256,7 +258,7 @@ jobs:
256258
with:
257259
command: build
258260
args: >
259-
--features mysql,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
261+
--features mysql,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
260262
261263
- run: docker-compose -f tests/docker-compose.yml run -d -p 3306:3306 mysql_${{ matrix.mysql }}
262264
- run: sleep 60
@@ -266,7 +268,7 @@ jobs:
266268
command: test
267269
args: >
268270
--no-default-features
269-
--features any,mysql,macros,migrate,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
271+
--features any,mysql,macros,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
270272
env:
271273
DATABASE_URL: mysql://root:password@localhost:3306/sqlx?ssl-mode=disabled
272274

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

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

0 commit comments

Comments
 (0)