| version: 1.0.{build} |
| |
| # MySQL fails to link on 2015 |
| image: Visual Studio 2013 |
| |
| branches: |
| only: |
| - master |
| - appveyor_nonsense |
| |
| services: |
| - postgresql95 |
| - mysql |
| |
| cache: |
| - C:\Users\appveyor\.cargo |
| |
| install: |
| - curl -fsS --retry 3 --retry-connrefused -o rustup-init.exe https://win.rustup.rs/ |
| - rustup-init -yv --default-toolchain stable --default-host %target% |
| - set PATH=%PATH%;%USERPROFILE%\.cargo\bin |
| - rustc -vV |
| - cargo -vV |
| - curl -fsS --retry 3 --retry-connrefused -o sqlite3.zip https://sqlite.org/2017/sqlite-dll-win64-x64-3160200.zip |
| - 7z e sqlite3.zip -y |
| - set SQLITE3_LIB_DIR=%APPVEYOR_BUILD_FOLDER% |
| - set PATH=%PATH%;%APPVEYOR_BUILD_FOLDER% |
| - '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\lib.exe" /def:sqlite3.def /OUT:sqlite3.lib /machine:x64' |
| |
| build: false |
| |
| before_test: |
| - SET PATH=%PATH%;C:\MinGW\bin |
| # `cargo test` is broken with rustup. https://github.com/rust-lang/cargo/issues/3394 |
| - ps: $Env:PATH += ";" + (get-item (rustup which cargo)).Directory.FullName |
| # setup pg databases |
| - SET PATH=C:\Program Files\PostgreSQL\9.5\bin;%PATH% |
| - createdb diesel_test |
| # setup mysql databases |
| - SET PATH=C:\Program Files\MySQL\MySQL Server 5.7\bin;C:\Program Files\MySQL\MySQL Server 5.7\lib;%PATH% |
| - mysql -e "create database diesel_test; create database diesel_unit_test;" -uroot |
| |
| test_script: |
| - cd diesel |
| - cargo test --no-default-features --features "%backend% extras" |
| - cd ../diesel_derives |
| - cargo test --no-default-features --features "diesel/%backend%" |
| - cd ../diesel_migrations/migrations_internals |
| - cargo test |
| - cd ../../diesel_migrations/migrations_macros |
| - cargo test |
| - cd ../../diesel_migrations/ |
| - cargo test --no-default-features --features "%backend%" |
| - cd ../diesel_cli |
| - cargo test --no-default-features --features "%backend%" |
| - cd ../diesel_tests |
| - cargo test --no-default-features --features "%backend%" |
| |
| environment: |
| global: |
| PGUSER: postgres |
| PGPASSWORD: Password12! |
| MYSQL_PWD: Password12! |
| # Neither mysql_config or pkg-config work for this on Windows |
| MYSQLCLIENT_LIB_DIR: C:\Program Files\MySQL\MySQL Server 5.7\lib |
| matrix: |
| - target: x86_64-pc-windows-msvc |
| backend: postgres |
| PG_DATABASE_URL: postgres://postgres:Password12!@localhost/diesel_test |
| PG_EXAMPLE_DATABASE_URL: postgres://postgres:Password12!@localhost/diesel_example |
| - target: x86_64-pc-windows-msvc |
| backend: sqlite |
| SQLITE_DATABASE_URL: test.db |
| - target: x86_64-pc-windows-msvc |
| backend: mysql |
| MYSQL_DATABASE_URL: mysql://root:Password12!@localhost:3306/diesel_test |
| MYSQL_EXAMPLE_DATABASE_URL: mysql://root:Password12!@localhost:3306/diesel_example |
| MYSQL_UNIT_TEST_DATABASE_URL: mysql://root:Password12!@localhost:3306/diesel_unit_test |
| RUST_TEST_THREADS: 1 |
| - target: x86_64-pc-windows-gnu |
| backend: postgres |
| PG_DATABASE_URL: postgres://postgres:Password12!@localhost/diesel_test |
| RUST_TEST_THREADS: 1 |
| - target: x86_64-pc-windows-gnu |
| backend: sqlite |
| SQLITE_DATABASE_URL: test.db |
| - target: x86_64-pc-windows-gnu |
| backend: mysql |
| MYSQL_DATABASE_URL: mysql://root:Password12!@localhost:3306/diesel_test |
| MYSQL_EXAMPLE_DATABASE_URL: mysql://root:Password12!@localhost:3306/diesel_example |
| MYSQL_UNIT_TEST_DATABASE_URL: mysql://root:Password12!@localhost:3306/diesel_unit_test |
| RUST_TEST_THREADS: 1 |