-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
92 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -155,6 +155,8 @@ jobs: | |
echo "MYSQL_EXAMPLE_DATABASE_URL=mysql://runner@localhost/diesel_example" >> $GITHUB_ENV | ||
echo "MYSQL_UNIT_TEST_DATABASE_URL=mysql://runner@localhost/diesel_unit_test" >> $GITHUB_ENV | ||
echo "MYSQLCLIENT_LIB_DIR=/usr/local/opt/[email protected]/lib" >> $GITHUB_ENV | ||
echo "PKG_CONFIG_PATH=/usr/local/opt/[email protected]/lib/pkgconfig" >> $GITHUB_ENV | ||
- name: Install mysql (MacOS M1) | ||
if: matrix.os == 'macos-14' && matrix.backend == 'mysql' | ||
|
@@ -169,6 +171,7 @@ jobs: | |
echo "MYSQL_EXAMPLE_DATABASE_URL=mysql://runner@localhost/diesel_example" >> $GITHUB_ENV | ||
echo "MYSQL_UNIT_TEST_DATABASE_URL=mysql://runner@localhost/diesel_unit_test" >> $GITHUB_ENV | ||
echo "MYSQLCLIENT_LIB_DIR=/opt/homebrew/opt/[email protected]/lib" >> $GITHUB_ENV | ||
echo "MYSQLCLIENT_VERSION=10.5" >> $GITHUB_ENV | ||
- name: Install sqlite (Windows) | ||
if: runner.os == 'Windows' && matrix.backend == 'sqlite' | ||
|
@@ -213,6 +216,7 @@ jobs: | |
echo "MYSQL_EXAMPLE_DATABASE_URL=mysql://root@localhost/diesel_example" >> $GITHUB_ENV | ||
echo "MYSQL_UNIT_TEST_DATABASE_URL=mysql://root@localhost/diesel_unit_test" >> $GITHUB_ENV | ||
echo "MYSQLCLIENT_LIB_DIR=C:\tools\mysql\current\lib" >> $GITHUB_ENV | ||
echo "MYSQLCLIENT_VERSION=8.0.31" >> $GITHUB_ENV | ||
echo "C:\tools\mysql\current\lib" >> $GITHUB_PATH | ||
echo "C:\tools\mysql\current\bin" >> $GITHUB_PATH | ||
dir "C:\tools\mysql\current\lib" | ||
|
@@ -421,43 +425,45 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: nightly | ||
components: "rust-src" | ||
- name: Cache cargo registry | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
key: sqlite_bundled-cargo-${{ hashFiles('**/Cargo.toml') }} | ||
|
||
- name: Test diesel-cli | ||
run: cargo +nightly test --manifest-path diesel_cli/Cargo.toml --no-default-features --features "sqlite-bundled" | ||
run: cargo +stable test --manifest-path diesel_cli/Cargo.toml --no-default-features --features "sqlite-bundled" | ||
|
||
- name: Run diesel_tests with ASAN enabled | ||
env: | ||
RUSTC_BOOTSTRAP: 1 | ||
RUSTFLAGS: -Zsanitizer=address | ||
ASAN_OPTIONS: detect_stack_use_after_return=1 | ||
run: cargo +nightly -Z build-std test --manifest-path diesel_tests/Cargo.toml --no-default-features --features "sqlite libsqlite3-sys libsqlite3-sys/bundled libsqlite3-sys/with-asan" --target x86_64-unknown-linux-gnu | ||
run: cargo +stable -Z build-std test --manifest-path diesel_tests/Cargo.toml --no-default-features --features "sqlite libsqlite3-sys libsqlite3-sys/bundled libsqlite3-sys/with-asan" --target x86_64-unknown-linux-gnu | ||
|
||
- name: Run diesel tests with ASAN enabled | ||
env: | ||
RUSTC_BOOTSTRAP: 1 | ||
RUSTDOCFLAGS: -Zsanitizer=address | ||
RUSTFLAGS: -Zsanitizer=address | ||
ASAN_OPTIONS: detect_stack_use_after_return=1 | ||
run: cargo +nightly -Z build-std test --manifest-path diesel/Cargo.toml --no-default-features --features "sqlite extras libsqlite3-sys libsqlite3-sys/bundled libsqlite3-sys/with-asan" --target x86_64-unknown-linux-gnu | ||
run: cargo +stable -Z build-std test --manifest-path diesel/Cargo.toml --no-default-features --features "sqlite extras libsqlite3-sys libsqlite3-sys/bundled libsqlite3-sys/with-asan" --target x86_64-unknown-linux-gnu | ||
|
||
postgres_bundled: | ||
name: Check postgres bundled + Postgres with asan | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@master | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: nightly | ||
components: "rust-src" | ||
- name: Cache cargo registry | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
key: postgres_bundled-cargo-${{ hashFiles('**/Cargo.toml') }} | ||
|
||
- name: Install postgres (Linux) | ||
run: | | ||
sudo apt-get update | ||
|
@@ -470,20 +476,72 @@ jobs: | |
echo $PG_DATABASE_URL | ||
- name: Test diesel-cli | ||
run: cargo +nightly test --manifest-path diesel_cli/Cargo.toml --no-default-features --features "postgres-bundled" | ||
run: cargo +stable test --manifest-path diesel_cli/Cargo.toml --no-default-features --features "postgres-bundled" | ||
|
||
- name: Run diesel_tests with ASAN enabled | ||
env: | ||
RUSTC_BOOTSTRAP: 1 | ||
RUSTFLAGS: -Zsanitizer=address | ||
ASAN_OPTIONS: detect_stack_use_after_return=1 | ||
run: cargo +nightly -Z build-std test --manifest-path diesel_tests/Cargo.toml --no-default-features --features "postgres pq-sys pq-sys/bundled pq-src/with-asan" --target x86_64-unknown-linux-gnu | ||
run: cargo +stable -Z build-std test --manifest-path diesel_tests/Cargo.toml --no-default-features --features "postgres pq-sys pq-sys/bundled pq-src/with-asan" --target x86_64-unknown-linux-gnu | ||
|
||
- name: Run diesel tests with ASAN enabled | ||
env: | ||
RUSTC_BOOTSTRAP: 1 | ||
RUSTDOCFLAGS: -Zsanitizer=address | ||
RUSTFLAGS: -Zsanitizer=address | ||
ASAN_OPTIONS: detect_stack_use_after_return=1 | ||
run: cargo +nightly -Z build-std test --manifest-path diesel/Cargo.toml --no-default-features --features "postgres pq-sys pq-sys/bundled pq-src/with-asan" --target x86_64-unknown-linux-gnu | ||
run: cargo +stable -Z build-std test --manifest-path diesel/Cargo.toml --no-default-features --features "postgres pq-sys pq-sys/bundled pq-src/with-asan" --target x86_64-unknown-linux-gnu | ||
|
||
mysql_bundled: | ||
name: Check mysql bundled + Mysql with asan | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: "rust-src" | ||
- name: Cache cargo registry | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
key: mysql_bundled-cargo-${{ hashFiles('**/Cargo.toml') }} | ||
- name: Install Mysql (Linux) | ||
run: | | ||
sudo systemctl start mysql.service | ||
sudo apt-get update | ||
sudo apt-get -y install libmysqlclient-dev | ||
mysql -e "create database diesel_test; create database diesel_unit_test; grant all on \`diesel_%\`.* to 'root'@'localhost';" -uroot -proot | ||
echo "MYSQL_DATABASE_URL=mysql://root:[email protected]/diesel_test" >> $GITHUB_ENV | ||
echo "MYSQL_EXAMPLE_DATABASE_URL=mysql://root:[email protected]/diesel_example" >> $GITHUB_ENV | ||
echo "MYSQL_UNIT_TEST_DATABASE_URL=mysql://root:[email protected]/diesel_unit_test" >> $GITHUB_ENV | ||
- name: Test diesel-cli | ||
env: | ||
RUST_TEST_THREADS: 1 | ||
run: cargo +stable test --manifest-path diesel_cli/Cargo.toml --no-default-features --features "mysql-bundled" | ||
|
||
- name: Run diesel_tests with ASAN enabled | ||
env: | ||
RUSTC_BOOTSTRAP: 1 | ||
RUSTFLAGS: -Zsanitizer=address | ||
ASAN_OPTIONS: detect_stack_use_after_return=1 | ||
LSAN_OPTIONS: suppressions=suppr.txt | ||
RUST_TEST_THREADS: 1 | ||
run: | | ||
echo "leak:mysql_server_init" > suppr.txt | ||
cargo +stable -Z build-std test --manifest-path diesel_tests/Cargo.toml --no-default-features --features "mysql mysqlclient-sys mysqlclient-sys/bundled mysqlclient-src/with-asan" --target x86_64-unknown-linux-gnu | ||
- name: Run diesel tests with ASAN enabled | ||
env: | ||
RUSTC_BOOTSTRAP: 1 | ||
RUSTDOCFLAGS: -Zsanitizer=address | ||
RUSTFLAGS: -Zsanitizer=address | ||
ASAN_OPTIONS: detect_stack_use_after_return=1 | ||
LSAN_OPTIONS: suppressions=suppr.txt | ||
RUST_TEST_THREADS: 1 | ||
run: | | ||
echo "leak:mysql_server_init" > suppr.txt | ||
cargo +stable -Z build-std test --manifest-path diesel/Cargo.toml --no-default-features --features "mysqlclient mysqlclient-sys mysqlclient-sys/bundled mysqlclient-src/with-asan" --target x86_64-unknown-linux-gnu | ||
minimal_rust_version: | ||
name: Check Minimal supported rust version (1.78.0) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters