File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,9 @@ jobs:
167
167
matrix :
168
168
runtime : [async-std, tokio]
169
169
needs : check
170
+ env :
171
+ # Enable tests with SQLCipher
172
+ RUSTFLAGS : --cfg sqlite_test_sqlcipher
170
173
steps :
171
174
- uses : actions/checkout@v2
172
175
Original file line number Diff line number Diff line change @@ -177,7 +177,10 @@ hex = "0.4.3"
177
177
tempfile = " 3.9.0"
178
178
criterion = { version = " 0.5.1" , features = [" async_tokio" ] }
179
179
180
- # Needed to test SQLCipher
180
+ # If this is an unconditional dev-dependency then Cargo will *always* try to build `libsqlite3-sys`,
181
+ # even when SQLite isn't the intended test target, and fail if the build environment is not set up for compiling C code.
182
+ [target .'cfg(sqlite_test_sqlcipher)' .dev-dependencies ]
183
+ # Enable testing with SQLCipher if specifically requested.
181
184
libsqlite3-sys = { version = " 0.27" , features = [" bundled-sqlcipher" ] }
182
185
183
186
#
Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ async fn it_fails_if_password_is_incorrect() -> anyhow::Result<()> {
125
125
Ok ( ( ) )
126
126
}
127
127
128
+ #[ cfg( sqlite_test_sqlcipher) ]
128
129
#[ sqlx_macros:: test]
129
130
async fn it_honors_order_of_encryption_pragmas ( ) -> anyhow:: Result < ( ) > {
130
131
let ( url, _dir) = new_db_url ( ) . await ?;
You can’t perform that action at this time.
0 commit comments