Showing with 62 additions and 0 deletions.
  1. +15 −0 .travis.yml
  2. +2 −0 README.md
  3. +1 −0 rdmd.d
  4. +44 −0 travis.sh
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: d
d:
- dmd
sudo: false
addons:
apt:
packages:
- g++-multilib
- libcurl3-gnutls:i386
env:
- MODEL=32
- MODEL=64

script:
- ./travis.sh
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
D tools
=======

[![Build Status](https://travis-ci.org/dlang/tools.svg?branch=master)](https://travis-ci.org/dlang/tools)

This repository hosts various tools redistributed with DMD or used
internally during various build tasks.

Expand Down
1 change: 1 addition & 0 deletions rdmd.d
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ else

private string compiler = defaultCompiler;

version(unittest) {} else
int main(string[] args)
{
//writeln("Invoked with: ", args);
Expand Down
44 changes: 44 additions & 0 deletions travis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash

set -uexo pipefail

DIGGER_DIR="../digger"
DIGGER="../digger/digger"

# set to 64-bit by default
if [ -z ${MODEL:-} ] ; then
MODEL=64
fi

test_rdmd() {
# run rdmd internal tests
rdmd -m$MODEL -main -unittest rdmd.d

# compile rdmd & testsuite
dmd -m$MODEL rdmd.d
dmd -m$MODEL rdmd_test.d

# run rdmd testsuite
./rdmd_test
}

build_digger() {
git clone --recursive https://github.com/CyberShadow/Digger "$DIGGER_DIR"
dub --root="$DIGGER_DIR" build
}

install_digger() {
$DIGGER build --model=$MODEL "master"
export PATH=$PWD/result/bin:$PATH
}

if ! [ -d "$DIGGER_DIR" ] ; then
build_digger
fi

install_digger

dmd --version
rdmd --help | head -n 1

test_rdmd