Skip to content

Break drivers out into separate crates, clean up some technical debt #2039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
92 changes: 27 additions & 65 deletions .github/workflows/sqlx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
runtime: [async-std, tokio, actix]
tls: [native-tls, rustls]
runtime: [async-std, tokio]
tls: [native-tls, rustls, none]
steps:
- uses: actions/checkout@v2

Expand All @@ -53,22 +53,22 @@ jobs:
args: >
--manifest-path sqlx-core/Cargo.toml
--no-default-features
--features offline,all-databases,all-types,migrate,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
--features json,offline,migrate,_rt-${{ matrix.runtime }},_tls-${{ matrix.tls }}

- uses: actions-rs/cargo@v1
with:
command: check
args: >
--no-default-features
--features offline,all-databases,all-types,migrate,runtime-${{ matrix.runtime }}-${{ matrix.tls }},macros
--features all-databases,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }},macros

test:
name: Unit Test
runs-on: ubuntu-20.04
strategy:
matrix:
runtime: [async-std, tokio, actix]
tls: [native-tls, rustls]
runtime: [async-std, tokio]
tls: [native-tls, rustls, none]
steps:
- uses: actions/checkout@v2

Expand All @@ -87,7 +87,7 @@ jobs:
command: test
args: >
--manifest-path sqlx-core/Cargo.toml
--features offline,all-databases,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
--features json,_rt-${{ matrix.runtime }},_tls-${{ matrix.tls }}

cli:
name: CLI Binaries
Expand Down Expand Up @@ -138,8 +138,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
runtime: [async-std, tokio, actix]
tls: [native-tls, rustls]
runtime: [async-std, tokio]
needs: check
steps:
- uses: actions/checkout@v2
Expand All @@ -156,16 +155,18 @@ jobs:
with:
key: ${{ runner.os }}-sqlite-${{ matrix.runtime }}-${{ matrix.tls }}

- run: echo "using ${DATABASE_URL}"

- uses: actions-rs/cargo@v1
with:
command: test
args: >
--no-default-features
--features any,macros,migrate,sqlite,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
--features any,macros,sqlite,_unstable-all-types,runtime-${{ matrix.runtime }}
--
--test-threads=1
env:
DATABASE_URL: sqlite://tests/sqlite/sqlite.db
DATABASE_URL: sqlite:tests/sqlite/sqlite.db
RUSTFLAGS: --cfg sqlite_ipaddr
LD_LIBRARY_PATH: /tmp/sqlite3-lib

Expand All @@ -175,8 +176,8 @@ jobs:
strategy:
matrix:
postgres: [14, 10]
runtime: [async-std, tokio, actix]
tls: [native-tls, rustls]
runtime: [async-std, tokio]
tls: [native-tls, rustls, none]
needs: check
steps:
- uses: actions/checkout@v2
Expand All @@ -199,7 +200,7 @@ jobs:
with:
command: build
args: >
--features postgres,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
--features postgres,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}

- run: |
docker-compose -f tests/docker-compose.yml run -d -p 5432:5432 --name postgres_${{ matrix.postgres }} postgres_${{ matrix.postgres }}
Expand All @@ -210,19 +211,20 @@ jobs:
command: test
args: >
--no-default-features
--features any,postgres,macros,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
--features any,postgres,macros,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
env:
DATABASE_URL: postgres://postgres:password@localhost:5432/sqlx
# FIXME: needed to disable `ltree` tests in Postgres 9.6
# but `PgLTree` should just fall back to text format
RUSTFLAGS: --cfg postgres_${{ matrix.postgres }}

- uses: actions-rs/cargo@v1
if: matrix.tls != 'none'
with:
command: test
args: >
--no-default-features
--features any,postgres,macros,migrate,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
--features any,postgres,macros,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
env:
DATABASE_URL: postgres://postgres:password@localhost:5432/sqlx?sslmode=verify-ca&sslrootcert=.%2Ftests%2Fcerts%2Fca.crt
# FIXME: needed to disable `ltree` tests in Postgres 9.6
Expand All @@ -235,8 +237,8 @@ jobs:
strategy:
matrix:
mysql: [8, 5_7]
runtime: [async-std, tokio, actix]
tls: [native-tls, rustls]
runtime: [async-std, tokio]
tls: [native-tls, rustls, none]
needs: check
steps:
- uses: actions/checkout@v2
Expand All @@ -255,7 +257,7 @@ jobs:
with:
command: build
args: >
--features mysql,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
--features mysql,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}

- run: docker-compose -f tests/docker-compose.yml run -d -p 3306:3306 mysql_${{ matrix.mysql }}
- run: sleep 60
Expand All @@ -265,7 +267,7 @@ jobs:
command: test
args: >
--no-default-features
--features any,mysql,macros,migrate,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
--features any,mysql,macros,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
env:
DATABASE_URL: mysql://root:password@localhost:3306/sqlx?ssl-mode=disabled

Expand All @@ -276,7 +278,7 @@ jobs:
command: test
args: >
--no-default-features
--features any,mysql,macros,migrate,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
--features any,mysql,macros,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
env:
DATABASE_URL: mysql://root:password@localhost:3306/sqlx

Expand All @@ -286,8 +288,8 @@ jobs:
strategy:
matrix:
mariadb: [10_6, 10_3]
runtime: [async-std, tokio, actix]
tls: [native-tls, rustls]
runtime: [async-std, tokio]
tls: [native-tls, rustls, none]
needs: check
steps:
- uses: actions/checkout@v2
Expand All @@ -306,7 +308,7 @@ jobs:
with:
command: build
args: >
--features mysql,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
--features mysql,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}

- run: docker-compose -f tests/docker-compose.yml run -d -p 3306:3306 mariadb_${{ matrix.mariadb }}
- run: sleep 30
Expand All @@ -316,46 +318,6 @@ jobs:
command: test
args: >
--no-default-features
--features any,mysql,macros,migrate,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
--features any,mysql,macros,_unstable-all-types,runtime-${{ matrix.runtime }},tls-${{ matrix.tls }}
env:
DATABASE_URL: mysql://root:password@localhost:3306/sqlx

mssql:
name: MSSQL
runs-on: ubuntu-20.04
strategy:
matrix:
mssql: [2019, 2017]
runtime: [async-std, tokio, actix]
tls: [native-tls, rustls]
needs: check
steps:
- uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- uses: Swatinem/rust-cache@v1
with:
key: ${{ runner.os }}-mssql-${{ matrix.runtime }}-${{ matrix.tls }}-${{ hashFiles('**/Cargo.lock') }}

- uses: actions-rs/cargo@v1
with:
command: build
args: >
--features mssql,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}

- run: docker-compose -f tests/docker-compose.yml run -d -p 1433:1433 mssql_${{ matrix.mssql }}
- run: sleep 80 # MSSQL takes a "bit" to startup

- uses: actions-rs/cargo@v1
with:
command: test
args: >
--no-default-features
--features any,mssql,macros,migrate,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
env:
DATABASE_URL: mssql://sa:Password123!@localhost/sqlx
Loading