forked from GiGainfosystems/diesel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
92 lines (83 loc) · 3.35 KB
/
.appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
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