Skip to content

Commit 831fdd1

Browse files
committed
Merge branch 'fix-travis'
2 parents b1fd5ee + 382a3fb commit 831fdd1

18 files changed

+430
-123
lines changed

.travis.yml

Lines changed: 280 additions & 46 deletions
Large diffs are not rendered by default.

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
v3.0.0 - TBD
2+
=====================
3+
4+
Update from `vibe-d:core` to `vibe-core`, and various CI improvements.
5+
6+
- **Change:** Switched from outdated `vibe-d:core` to modern `vibe-core`.
7+
- **Fixed:** [#199](https://github.com/mysql-d/mysql-native/issues/199):
8+
It is immposible to use this package anymore without libevent.
9+
- **Fixed:** [#201](https://github.com/mysql-d/mysql-native/issues/201):
10+
Always selects `vibe-d:core`, cannot select `vibe-core`.
11+
- **Tests:** Add NO_VIBE option for travis-ci (DMDFE 2.075.x and below don't work with vibe-core).
12+
- **Tests:** [#197](https://github.com/mysql-d/mysql-native/issues/197):
13+
Travis-ci build issues on various compiler versions. (@SingingBush, @Abscissa)
14+
- **Tests:** Fixed: USE_UNIT_THREADED envar doen't actually use unit-threaded.
15+
- **Tests:** Better diagnostics when using alternate `dub.selections.json`. (@SingingBush)
16+
- **Docs:** Add documentation and CI-related policies to `.travis.yml`.
17+
118
v2.3.0 - 2019-02-23
219
=====================
320

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://travis-ci.org/mysql-d/mysql-native.svg)](https://travis-ci.org/mysql-d/mysql-native)
1+
[![Build Status](https://travis-ci.org/mysql-d/mysql-native.svg?branch=master)](https://travis-ci.org/mysql-d/mysql-native)
22

33
A [Boost-licensed](http://www.boost.org/LICENSE_1_0.txt) native [D](http://dlang.org)
44
client driver for MySQL and MariaDB.

ci_setup.d

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import std.file;
22
import std.process;
3+
import std.stdio : writeln;
34

45
bool envBool(string name)
56
{
@@ -17,7 +18,7 @@ void copyIfExists(string from, string to)
1718
copy(from, to);
1819
}
1920

20-
void main()
21+
int main()
2122
{
2223
auto haveRdmd = executeShell("rdmd --help").status == 0;
2324
if(!haveRdmd)
@@ -28,15 +29,34 @@ void main()
2829
}
2930

3031
// MySQL is not installed by default on OSX build agents
31-
if(environment["TRAVIS_OS_NAME"] == "osx")
32+
auto mysqlPrefix = "";
33+
if(environment["TRAVIS_OS_NAME"] == "osx")
3234
{
33-
spawnShell("brew update").wait;
34-
spawnShell("brew install mysql && brew services start mysql").wait;
35+
if(envGet("DB") == "mysql-5.6")
36+
{
37+
spawnShell("brew update").wait;
38+
spawnShell("brew install mysql@5.6 && brew services start mysql56").wait;
39+
mysqlPrefix = "/usr/local/opt/mysql@5.6/bin/";
40+
}
41+
else if(envGet("DB") == "mysql-latest")
42+
{
43+
spawnShell("brew update").wait;
44+
spawnShell("brew install mysql && brew services start mysql").wait;
45+
}
46+
else
47+
{
48+
writeln("Envar 'DB' must be 'mysql-5.6' or 'mysql-latest', not '", envGet("DB"), "'");
49+
return 1;
50+
}
3551
}
3652

3753
// If an alternate dub.selections.json was requested, use it.
38-
copyIfExists("dub.selections."~envGet("DUB_SELECT")~".json", "dub.selections.json");
39-
copyIfExists("examples/homePage/dub.selections."~envGet("DUB_SELECT")~".json", "examples/homePage/dub.selections.json");
54+
if(environment.get("DUB_SELECT") != null) {
55+
string dubSelections = "dub.selections."~envGet("DUB_SELECT")~".json";
56+
writeln("Using alternative dub dependencies file: ", dubSelections);
57+
copy(dubSelections, "dub.selections.json");
58+
copy("examples/homePage/dub.selections."~envGet("DUB_SELECT")~".json", "examples/homePage/dub.selections.json");
59+
}
4060

4161
if(envBool("DUB_UPGRADE"))
4262
{
@@ -63,7 +83,9 @@ void main()
6383
}
6484

6585
// Setup DB
66-
spawnShell(`mysql -u root -e 'SHOW VARIABLES LIKE "%version%";'`).wait;
67-
spawnShell(`mysql -u root -e 'CREATE DATABASE mysqln_testdb;'`).wait;
86+
spawnShell(mysqlPrefix~`mysql -u root -e 'SHOW VARIABLES LIKE "%version%";'`).wait;
87+
spawnShell(mysqlPrefix~`mysql -u root -e 'CREATE DATABASE mysqln_testdb;'`).wait;
6888
write("testConnectionStr.txt", "host=127.0.0.1;port=3306;user=root;pwd=;db=mysqln_testdb");
89+
90+
return 0;
6991
}

dub.sdl

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@ license "BSL-1.0"
44
copyright "Copyright (c) 2011-2018 Steve Teale, James W. Oliphant, Simen Endsjø, Sönke Ludwig, Sergey Shamov, and Nick Sabalausky"
55
authors "Steve Teale" "James W. Oliphant" "Simen Endsjø" "Sönke Ludwig" "Sergey Shamov" "Nick Sabalausky"
66

7-
dependency "vibe-d:core" version=">=0.7.32 <0.9.0-0" optional=true
7+
dependency "vibe-core" version="~>1.7.0" optional=true
88

99
sourcePaths "source/"
1010
importPaths "source/"
1111

12-
// Needed on OSX with DMD 2.079+: https://github.com/vibe-d/vibe.d/issues/2155
13-
subConfiguration "vibe-d:core" "libevent" platform="osx"
14-
1512
configuration "application" {
1613
targetType "executable"
1714
versions "VibeCustomMain"
@@ -38,7 +35,7 @@ configuration "unittest-vibe" {
3835
targetName "mysqln-tests-vibe"
3936
excludedSourceFiles "source/app.d"
4037

41-
dependency "vibe-d:core" version=">=0.7.32 <0.9.0-0" optional=false
38+
dependency "vibe-core" version="~>1.7.0" optional=false
4239

4340
mainSourceFile "source/mysql/package.d"
4441
debugVersions "MYSQLN_TESTS"
@@ -54,7 +51,7 @@ configuration "unittest-vibe-ut" {
5451
importPaths "bin/"
5552
buildOptions "unittests"
5653

57-
dependency "vibe-d:core" version=">=0.7.32 <0.9.0-0" optional=false
54+
dependency "vibe-core" version="~>1.7.0" optional=false
5855

5956
dependency "unit-threaded" version="~>0.7.45"
6057

dub.selections.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
{
22
"fileVersion": 1,
33
"versions": {
4-
"libasync": "0.8.1",
4+
"eventcore": "0.8.48",
5+
"libasync": "0.8.4",
56
"libev": "5.0.0+4.04",
67
"libevent": "2.0.1+2.0.16",
7-
"memutils": "0.4.7",
8+
"memutils": "0.4.13",
89
"openssl": "1.1.4+1.0.1g",
10+
"stdx-allocator": "2.77.5",
11+
"taggedalgebraic": "0.11.6",
912
"unit-threaded": "0.7.45",
10-
"vibe-d": "0.7.32"
13+
"vibe-core": "1.7.0"
1114
}
1215
}

dub.selections.vibe-0.8.3.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

dub.selections.vibecore-1.0.0.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"fileVersion": 1,
3+
"versions": {
4+
"eventcore": "0.8.48",
5+
"libasync": "0.8.4",
6+
"memutils": "0.4.13",
7+
"taggedalgebraic": "0.11.6",
8+
"unit-threaded": "0.7.45",
9+
"vibe-core": "1.0.0"
10+
}
11+
}
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
{
22
"fileVersion": 1,
33
"versions": {
4-
"libasync": "0.8.1",
4+
"eventcore": "0.8.48",
5+
"libasync": "0.8.4",
56
"libev": "5.0.0+4.04",
67
"libevent": "2.0.1+2.0.16",
7-
"memutils": "0.4.7",
8-
"mysql-native": {"path":"../.."},
8+
"memutils": "0.4.13",
99
"openssl": "1.1.4+1.0.1g",
10+
"stdx-allocator": "2.77.5",
11+
"taggedalgebraic": "0.11.6",
1012
"unit-threaded": "0.7.45",
11-
"vibe-d": "0.7.32"
13+
"vibe-core": "1.7.0"
1214
}
1315
}

examples/homePage/dub.selections.vibe-0.8.3.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)