Skip to content

Commit

Permalink
Merge pull request #2 from launchbadge/master
Browse files Browse the repository at this point in the history
Merge launchbadge/sqlx
  • Loading branch information
vbeffa authored Nov 19, 2021
2 parents 358b80f + 8299687 commit 3523e09
Show file tree
Hide file tree
Showing 113 changed files with 3,536 additions and 895 deletions.
72 changes: 40 additions & 32 deletions .github/workflows/sqlx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
runtime: [async-std-native-tls, tokio-native-tls, actix-native-tls, async-std-rustls, tokio-rustls, actix-rustls]
runtime: [async-std, tokio, actix]
tls: [native-tls, rustls]
steps:
- uses: actions/checkout@v2

Expand All @@ -48,29 +49,30 @@ jobs:
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-check-${{ matrix.runtime }}-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-check-${{ matrix.runtime }}-${{ matrix.tls }}-${{ hashFiles('**/Cargo.lock') }}

- uses: actions-rs/cargo@v1
with:
command: check
args: >
--manifest-path sqlx-core/Cargo.toml
--no-default-features
--features offline,all-databases,all-types,migrate,runtime-${{ matrix.runtime }}
--features offline,all-databases,all-types,migrate,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
- uses: actions-rs/cargo@v1
with:
command: check
args: >
--no-default-features
--features offline,all-databases,all-types,migrate,runtime-${{ matrix.runtime }},macros
--features offline,all-databases,all-types,migrate,runtime-${{ matrix.runtime }}-${{ matrix.tls }},macros
test:
name: Unit Test
runs-on: ubuntu-20.04
strategy:
matrix:
runtime: [async-std-native-tls, tokio-native-tls, actix-native-tls, async-std-rustls, tokio-rustls, actix-rustls]
runtime: [async-std, tokio, actix]
tls: [native-tls, rustls]
steps:
- uses: actions/checkout@v2

Expand All @@ -93,7 +95,7 @@ jobs:
command: test
args: >
--manifest-path sqlx-core/Cargo.toml
--features offline,all-databases,all-types,runtime-${{ matrix.runtime }}
--features offline,all-databases,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
cli:
name: CLI Binaries
Expand Down Expand Up @@ -148,7 +150,8 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
runtime: [async-std-native-tls, tokio-native-tls, actix-native-tls, async-std-rustls, tokio-rustls, actix-rustls]
runtime: [async-std, tokio, actix]
tls: [native-tls, rustls]
needs: check
steps:
- uses: actions/checkout@v2
Expand All @@ -165,14 +168,14 @@ jobs:
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-sqlite-${{ matrix.runtime }}-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-sqlite-${{ matrix.runtime }}-${{ matrix.tls }}-${{ hashFiles('**/Cargo.lock') }}

- uses: actions-rs/cargo@v1
with:
command: test
args: >
--no-default-features
--features any,macros,migrate,sqlite,all-types,runtime-${{ matrix.runtime }}
--features any,macros,migrate,sqlite,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
--
--test-threads=1
env:
Expand All @@ -183,8 +186,9 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
postgres: [12, 10, 9_6, 9_5]
runtime: [async-std-native-tls, tokio-native-tls, actix-native-tls, async-std-rustls, tokio-rustls, actix-rustls]
postgres: [13, 9_6]
runtime: [async-std, tokio, actix]
tls: [native-tls, rustls]
needs: check
steps:
- uses: actions/checkout@v2
Expand All @@ -201,23 +205,24 @@ jobs:
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-postgres-${{ matrix.runtime }}-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-postgres-${{ matrix.runtime }}-${{ matrix.tls }}-${{ hashFiles('**/Cargo.lock') }}

- uses: actions-rs/cargo@v1
with:
command: build
args: >
--features postgres,all-types,runtime-${{ matrix.runtime }}
--features postgres,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
- run: docker-compose -f tests/docker-compose.yml run -d -p 5432:5432 postgres_${{ matrix.postgres }}
- run: sleep 10
- run: |
docker-compose -f tests/docker-compose.yml run -d -p 5432:5432 --name postgres_${{ matrix.postgres }} postgres_${{ matrix.postgres }}
docker exec postgres_${{ matrix.postgres }} bash -c "until pg_isready; do sleep 1; done"
- uses: actions-rs/cargo@v1
with:
command: test
args: >
--no-default-features
--features any,postgres,macros,all-types,runtime-${{ matrix.runtime }}
--features any,postgres,macros,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
env:
DATABASE_URL: postgres://postgres:password@localhost:5432/sqlx

Expand All @@ -226,7 +231,7 @@ jobs:
command: test
args: >
--no-default-features
--features any,postgres,macros,migrate,all-types,runtime-${{ matrix.runtime }}
--features any,postgres,macros,migrate,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
env:
DATABASE_URL: postgres://postgres:password@localhost:5432/sqlx?sslmode=verify-ca&sslrootcert=.%2Ftests%2Fcerts%2Fca.crt

Expand All @@ -235,8 +240,9 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
mysql: [8, 5_7, 5_6]
runtime: [async-std-native-tls, tokio-native-tls, actix-native-tls, async-std-rustls, tokio-rustls, actix-rustls]
mysql: [8, 5_6]
runtime: [async-std, tokio, actix]
tls: [native-tls, rustls]
needs: check
steps:
- uses: actions/checkout@v2
Expand All @@ -253,13 +259,13 @@ jobs:
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-mysql-${{ matrix.runtime }}-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-mysql-${{ matrix.runtime }}-${{ matrix.tls }}-${{ hashFiles('**/Cargo.lock') }}

- uses: actions-rs/cargo@v1
with:
command: build
args: >
--features mysql,all-types,runtime-${{ matrix.runtime }}
--features mysql,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
- run: docker-compose -f tests/docker-compose.yml run -d -p 3306:3306 mysql_${{ matrix.mysql }}
- run: sleep 60
Expand All @@ -269,7 +275,7 @@ jobs:
command: test
args: >
--no-default-features
--features any,mysql,macros,migrate,all-types,runtime-${{ matrix.runtime }}
--features any,mysql,macros,migrate,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
env:
DATABASE_URL: mysql://root:password@localhost:3306/sqlx

Expand All @@ -278,8 +284,9 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
mariadb: [10_5, 10_4, 10_3, 10_2, 10_1]
runtime: [async-std-native-tls, tokio-native-tls, actix-native-tls, async-std-rustls, tokio-rustls, actix-rustls]
mariadb: [10_6, 10_2]
runtime: [async-std, tokio, actix]
tls: [native-tls, rustls]
needs: check
steps:
- uses: actions/checkout@v2
Expand All @@ -297,13 +304,13 @@ jobs:
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-mysql-${{ matrix.runtime }}-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-mysql-${{ matrix.runtime }}-${{ matrix.tls }}-${{ hashFiles('**/Cargo.lock') }}

- uses: actions-rs/cargo@v1
with:
command: build
args: >
--features mysql,all-types,runtime-${{ matrix.runtime }}
--features mysql,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
- run: docker-compose -f tests/docker-compose.yml run -d -p 3306:3306 mariadb_${{ matrix.mariadb }}
- run: sleep 30
Expand All @@ -313,7 +320,7 @@ jobs:
command: test
args: >
--no-default-features
--features any,mysql,macros,migrate,all-types,runtime-${{ matrix.runtime }}
--features any,mysql,macros,migrate,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
env:
DATABASE_URL: mysql://root:password@localhost:3306/sqlx

Expand All @@ -322,8 +329,9 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
mssql: [2019]
runtime: [async-std-native-tls, tokio-native-tls, actix-native-tls, async-std-rustls, tokio-rustls, actix-rustls]
mssql: [2019, 2017]
runtime: [async-std, tokio, actix]
tls: [native-tls, rustls]
needs: check
steps:
- uses: actions/checkout@v2
Expand All @@ -340,13 +348,13 @@ jobs:
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-mssql-${{ matrix.runtime }}-${{ hashFiles('**/Cargo.lock') }}
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 }}
--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
Expand All @@ -356,6 +364,6 @@ jobs:
command: test
args: >
--no-default-features
--features any,mssql,macros,migrate,all-types,runtime-${{ matrix.runtime }}
--features any,mssql,macros,migrate,all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
env:
DATABASE_URL: mssql://sa:Password123!@localhost/sqlx
70 changes: 70 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,67 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.5.9 - 2021-10-01

A hotfix release to address the issue of the `sqlx` crate itself still depending on older versions of `sqlx-core` and
`sqlx-macros`.

No other changes from `0.5.8`.

## 0.5.8 - 2021-10-01 (Yanked; use 0.5.9)

[A total of 24 pull requests][0.5.8-prs] were merged this release cycle! Some highlights:

* [[#1289]] Support the `immutable` option on SQLite connections [[@djmarcin]]
* [[#1295]] Support custom initial options for SQLite [[@ghassmo]]
* Allows specifying custom `PRAGMA`s and overriding those set by SQLx.
* [[#1345]] Initial support for Postgres `COPY FROM/TO`[[@montanalow], [@abonander]]
* [[#1439]] Handle multiple waiting results correctly in MySQL [[@eagletmt]]

[#1289]: https://github.com/launchbadge/sqlx/pull/1289
[#1295]: https://github.com/launchbadge/sqlx/pull/1295
[#1345]: https://github.com/launchbadge/sqlx/pull/1345
[#1439]: https://github.com/launchbadge/sqlx/pull/1439
[0.5.8-prs]: https://github.com/launchbadge/sqlx/pulls?q=is%3Apr+is%3Amerged+merged%3A2021-08-21..2021-10-01

## 0.5.7 - 2021-08-20

* [[#1392]] use `resolve_path` when getting path for `include_str!()` [[@abonander]]
* Fixes a regression introduced by [[#1332]].
* [[#1393]] avoid recursively spawning tasks in `PgListener::drop()` [[@abonander]]
* Fixes a panic that occurs when `PgListener` is dropped in `async fn main()`.

[#1392]: https://github.com/launchbadge/sqlx/pull/1392
[#1393]: https://github.com/launchbadge/sqlx/pull/1393

## 0.5.6 - 2021-08-16

A large bugfix release, including but not limited to:

* [[#1329]] Implement `MACADDR` type for Postgres [[@nomick]]
* [[#1363]] Fix `PortalSuspended` for array of composite types in Postgres [[@AtkinsChang]]
* [[#1320]] Reimplement `sqlx::Pool` internals using `futures-intrusive` [[@abonander]]
* This addresses a number of deadlocks/stalls on acquiring connections from the pool.
* [[#1332]] Macros: tell the compiler about external files/env vars to watch [[@abonander]]
* Includes `sqlx build-script` to create a `build.rs` to watch `migrations/` for changes.
* Nightly users can try `RUSTFLAGS=--cfg sqlx_macros_unstable` to tell the compiler
to watch `migrations/` for changes instead of using a build script.
* See the new section in the docs for `sqlx::migrate!()` for details.
* [[#1351]] Fix a few sources of segfaults/errors in SQLite driver [[@abonander]]
* Includes contributions from [[@link2ext]] and [[@madadam]].
* [[#1323]] Keep track of column typing in SQLite EXPLAIN parsing [[@marshoepial]]
* This fixes errors in the macros when using `INSERT/UPDATE/DELETE ... RETURNING ...` in SQLite.

[A total of 25 pull requests][0.5.6-prs] were merged this release cycle!

[#1329]: https://github.com/launchbadge/sqlx/pull/1329
[#1363]: https://github.com/launchbadge/sqlx/pull/1363
[#1320]: https://github.com/launchbadge/sqlx/pull/1320
[#1332]: https://github.com/launchbadge/sqlx/pull/1332
[#1351]: https://github.com/launchbadge/sqlx/pull/1351
[#1323]: https://github.com/launchbadge/sqlx/pull/1323
[0.5.6-prs]: https://github.com/launchbadge/sqlx/pulls?q=is%3Apr+is%3Amerged+merged%3A2021-05-24..2021-08-17

## 0.5.5 - 2021-05-24

- [[#1242]] Fix infinite loop at compile time when using query macros [[@toshokan]]
Expand Down Expand Up @@ -925,3 +986,12 @@ Fix docs.rs build by enabling a runtime feature in the docs.rs metadata in `Carg
[@feikesteenbergen]: https://github.com/feikesteenbergen
[@etcaton]: https://github.com/ETCaton
[@toshokan]: https://github.com/toshokan
[@nomick]: https://github.com/nomick
[@marshoepial]: https://github.com/marshoepial
[@link2ext]: https://github.com/link2ext
[@madadam]: https://github.com/madadam
[@AtkinsChang]: https://github.com/AtkinsChang
[@djmarcin]: https://github.com/djmarcin
[@ghassmo]: https://github.com/ghassmo
[@eagletmt]: https://github.com/eagletmt
[@montanalow]: https://github.com/montanalow
Loading

0 comments on commit 3523e09

Please sign in to comment.