Merge pull request #43 from vibe-d/test_latest_compilers

Test the latest compiler versions.
merged-on-behalf-of: Sönke Ludwig <s-ludwig@users.noreply.github.com>
This commit is contained in:
The Dlang Bot 2017-12-18 01:13:46 +01:00 committed by GitHub
commit 107f4c084f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 47 additions and 22 deletions

View file

@ -9,12 +9,17 @@ d:
# this way the overall test time gets cut down (GDC/LDC are a lot
# slower tham DMD, so they should be started early), while still
# catching most DMD version related build failures early
- dmd-2.075.0
- dmd-2.077.1
- dmd-2.071.2
- ldc-1.6.0
- ldc-1.5.0
- ldc-1.4.0
- ldc-1.3.0
- ldc-1.2.0
- ldc-1.1.0
- dmd-beta
- dmd-2.076.1
- dmd-2.075.1
- dmd-2.074.1
- dmd-2.073.2
- dmd-2.072.2

View file

@ -27,12 +27,16 @@ Supported compilers
The following compilers are tested and supported:
- DMD 2.076.0
- DMD 2.077.1
- DMD 2.076.1
- DMD 2.075.1
- DMD 2.074.1
- DMD 2.073.2
- DMD 2.072.2
- DMD 2.071.2
- LDC 1.6.0
- LDC 1.5.0
- LDC 1.4.0
- LDC 1.3.0
- LDC 1.2.0
- LDC 1.1.0

View file

@ -2,19 +2,23 @@ platform: x64
environment:
matrix:
- DC: dmd
DVersion: 2.075.0
DVersion: 2.077.1
arch: x64
config: winapi
- DC: dmd
DVersion: 2.075.0
DVersion: 2.077.1
arch: x86
config: winapi-optlink
- DC: dmd
DVersion: 2.075.0
DVersion: 2.077.1
arch: x86_mscoff
config: winapi
- DC: dmd
DVersion: 2.075.0
DVersion: 2.076.1
arch: x86
config: select-optlink
- DC: dmd
DVersion: 2.075.1
arch: x86
config: select-optlink
- DC: dmd
@ -33,6 +37,18 @@ environment:
DVersion: 2.071.1
arch: x86
config: winapi-optlink
- DC: ldc
DVersion: 1.6.0
arch: x64
config: winapi
- DC: ldc
DVersion: 1.5.0
arch: x86
config: winapi
- DC: ldc
DVersion: 1.4.0
arch: x64
config: winapi
- DC: ldc
DVersion: 1.3.0
arch: x64

View file

@ -21,7 +21,7 @@ configuration "kqueue" {
}
configuration "winapi" {
platforms "windows-x86_64" "windows-x86_mscoff"
platforms "windows-x86_64" "windows-x86_mscoff" "windows-ldc" "windows-gdc"
versions "EventcoreWinAPIDriver"
}

View file

@ -27,20 +27,20 @@ void main()
}
try {
assert(dur > 200.msecs, (dur - 200.msecs).toString());
assert(dur < 260.msecs, (dur - 200.msecs).toString());
assert(dur > 1200.msecs, (dur - 1200.msecs).toString());
assert(dur < 1300.msecs, (dur - 1200.msecs).toString());
} catch (Exception e) assert(false, e.msg);
s_startTime += dur;
eventDriver.timers.set(tm, 100.msecs, 100.msecs);
eventDriver.timers.set(tm, 300.msecs, 300.msecs);
void secondTier(TimerID timer) nothrow @safe {
try {
auto dur = Clock.currTime(UTC()) - s_startTime;
s_cnt++;
assert(dur > 100.msecs * s_cnt, (dur - 100.msecs * s_cnt).toString());
assert(dur < 100.msecs * s_cnt + 60.msecs, (dur - 100.msecs * s_cnt).toString());
assert(dur > 300.msecs * s_cnt, (dur - 300.msecs * s_cnt).toString());
assert(dur < 300.msecs * s_cnt + 100.msecs, (dur - 300.msecs * s_cnt).toString());
assert(s_cnt <= 3);
if (s_cnt == 3) {
@ -55,7 +55,7 @@ void main()
eventDriver.timers.wait(tm, &secondTier);
});
eventDriver.timers.set(tm, 200.msecs, 0.msecs);
eventDriver.timers.set(tm, 1200.msecs, 0.msecs);
ExitReason er;
do er = eventDriver.core.processEvents(Duration.max);

View file

@ -26,30 +26,30 @@ void main()
writefln("First timer");
auto dur = Clock.currTime(UTC()) - s_startTime;
assert(dur >= 200.msecs, (dur - 200.msecs).toString());
assert(dur < 250.msecs, (dur - 200.msecs).toString());
assert(dur >= 1200.msecs, (dur - 1200.msecs).toString());
assert(dur < 1300.msecs, (dur - 1200.msecs).toString());
timer1fired = true;
} catch (Exception e) {
assert(false, e.msg);
}
});
eventDriver.timers.set(tm, 200.msecs, 0.msecs);
eventDriver.timers.set(tm, 1200.msecs, 0.msecs);
// second timer repeating 100ms, 3 times
// second timer repeating 300ms, 5 times
auto tm2 = eventDriver.timers.create();
eventDriver.timers.set(tm2, 100.msecs, 100.msecs);
eventDriver.timers.set(tm2, 300.msecs, 300.msecs);
void periodicCallback(TimerID timer) nothrow @safe {
try {
writefln("Second timer");
auto dur = Clock.currTime(UTC()) - s_startTime;
s_cnt++;
assert(dur > 100.msecs * s_cnt, (dur - 100.msecs * s_cnt).toString());
assert(dur < 100.msecs * s_cnt + 60.msecs, (dur - 100.msecs * s_cnt).toString());
assert(s_cnt <= 3);
assert(dur > 300.msecs * s_cnt, (dur - 300.msecs * s_cnt).toString());
assert(dur < 300.msecs * s_cnt + 100.msecs, (dur - 300.msecs * s_cnt).toString());
assert(s_cnt <= 5);
if (s_cnt == 3) {
if (s_cnt == 5) {
s_done = true;
eventDriver.timers.stop(timer);
assert(timer1fired, "Timer 1 didn't fire within 300ms");