ldc-developers/ldc:.travis.yml@7c5c722
dist: xenial
language: d
git:
depth: 50
matrix:
include:
- os: linux
arch: arm64
d: ldc-beta
env: LLVM_VERSION=11.0.1 PARALLELISM=8 CC=gcc-8 CXX=g++-8 OPTS="-DLDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH=aarch64 -DADDITIONAL_DEFAULT_LDC_SWITCHES='\"-linker=bfd\",' -DCOMPILE_ALL_D_FILES_AT_ONCE=OFF"
cache:
directories:
- llvm-11.0.1
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
- gdb
- ninja-build
# Download & extract prebuilt vanilla LLVM if not in cache
before_install:
- nproc
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then free; fi
- export LLVM_ROOT_DIR="$PWD/llvm-$LLVM_VERSION"
- |
if [ ! -e "$LLVM_ROOT_DIR/bin/llvm-config" ]; then
llvm_url="https://github.com/ldc-developers/llvm-project/releases/download/ldc-v$LLVM_VERSION/llvm-$LLVM_VERSION-linux-aarch64-withAsserts.tar.xz"
wget -nv -O llvm.tar.xz $llvm_url
mkdir -p $LLVM_ROOT_DIR
tar -xf llvm.tar.xz --strip 1 -C $LLVM_ROOT_DIR
rm llvm.tar.xz
fi
install:
# Install lit
- python -m pip install --user lit
- python -c "import lit.main; lit.main.main();" --version . | head -n 1
script:
- unset LD_LIBRARY_PATH
- cmake --version
- ninja --version
- |
cmake -G Ninja . \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ROOT_DIR=$LLVM_ROOT_DIR \
-DLDC_INSTALL_LTOPLUGIN=ON \
-DLDC_INSTALL_LLVM_RUNTIME_LIBS=ON \
-DLDC_LINK_MANUALLY=OFF \
$OPTS
# Build LDC & LDC D unittests & defaultlib unittest runners
- |
numJobs=${PARALLELISM:-3}
# Work around out-of-memory errors - retry with decreasing jobs
targets='all ldc2-unittest all-test-runners'
currentNumJobs=$numJobs
for i in {1..5}; do
ninja -j$currentNumJobs $targets && break || true
currentNumJobs=$(( ($numJobs + $i - 1) / $i ))
done
- bin/ldc2 -version || exit 1
# Run LDC D unittests
- ctest --output-on-failure -R "ldc2-unittest"
# FIXME: all gdb tests fail and are disabled
- rm tests/debuginfo/*_gdb.d
- rm tests/d2/dmd-testsuite/runnable/b18504.d
# Run LIT testsuite
# FIXME: don't ignore errors
- ctest -V -R "lit-tests" || true
# Run DMD testsuite
- DMD_TESTSUITE_MAKE_ARGS="-j${PARALLELISM:-3} GDB_FLAGS=OFF" ctest -V -R "dmd-testsuite"
# Run defaultlib unittests & druntime integration tests
# FIXME: don't exclude hanging core.thread.fiber & don't ignore errors
- ctest -j${PARALLELISM:-3} --output-on-failure -E "dmd-testsuite|lit-tests|ldc2-unittest|^core.thread.fiber($|-)" || true
after_success:
- |
if [[ "$OPTS" == *-DTEST_COVERAGE?ON* ]]; then
coveralls -e runtime -e tests -e vcbuild --gcov gcov-4.9 --gcov-options '\-lp' > /dev/null 2>&1
fi
notifications:
email:
recipients:
- "digitalmars-d-ldc@puremagic.com"
on_success: never
on_failure: change
irc:
channels:
- "irc.freenode.org#ldc"
on_success: always
on_failure: always
use_notice: false
skip_join: true
Build Config
{
"rvm": [
2,
2.1,
2.2,
"jruby-19mode",
"jruby-9"
],
"sudo": false,
"script": "bundle exec rspec spec --color --format documentation --require spec_helper",
"language": "ruby"
}