Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 20 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
version: 2
jobs:
build:
no_pic:
working_directory: ~/dmd
docker:
- image: circleci/node:4.8.2
parallelism: 2
branches:
ignore:
- dmd-1.x
steps:
- checkout
- run:
command: ./.circleci/run.sh install-deps
name: Install DMD
name: Install dependencies
- run:
command: sudo apt-get update && sudo apt-get install gdb
name: Install GDB
- run:
command: ./.circleci/run.sh setup-repos
name: Clone DRuntime & Phobos
- run:
command: ./.circleci/run.sh coverage
name: Run testsuite with -cov
command: ./.circleci/run.sh all
name: Run all
pic:
working_directory: ~/dmd
docker:
- image: dlang2/dmd-circleci:2.078.0
steps:
- checkout
- run:
command: ./.circleci/run.sh check-clean-git
name: Check for temporary files generated by the test suite
# this is needed to "fix" the Docker permission errors - see https://github.com/dlang/dmd/pull/7579
command: sudo ls -l /dlang/dmd-2.078.0/linux && sudo ls -l /dlang/dmd-2.078.0/src
name: Test Docker image
- run:
command: ./.circleci/run.sh codecov
name: Upload coverage files to CodeCov
command: ./.circleci/run.sh all
workflows:
version: 2
all:
jobs:
- pic
- no_pic
19 changes: 14 additions & 5 deletions .circleci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ N=4
CIRCLE_NODE_INDEX=${CIRCLE_NODE_INDEX:-0}
CIRCLE_PROJECT_REPONAME=${CIRCLE_PROJECT_REPONAME:-dmd}
BUILD="debug"
DMD=dmd

case $CIRCLE_NODE_INDEX in
0) MODEL=64 ;;
Expand Down Expand Up @@ -93,7 +94,9 @@ setup_repos() {
coverage()
{
# load environment for bootstrap compiler
source "$(CURL_USER_AGENT=\"$CURL_USER_AGENT\" bash ~/dlang/install.sh dmd-$HOST_DMD_VER --activate)"
if [ -f ~/dlang/install.sh ] ; then
source "$(CURL_USER_AGENT=\"$CURL_USER_AGENT\" bash ~/dlang/install.sh dmd-$HOST_DMD_VER --activate)"
fi

# build dmd, druntime, and phobos
make -j$N -C src -f posix.mak MODEL=$MODEL HOST_DMD=$DMD BUILD=$BUILD ENABLE_WARNINGS=1 all
Expand Down Expand Up @@ -145,8 +148,14 @@ codecov()

case $1 in
install-deps) install_deps ;;
setup-repos) setup_repos ;;
coverage) coverage ;;
check-clean-git) check_clean_git;;
codecov) codecov ;;
setup-repos) echo "removed" ;;
coverage) echo "removed" ;;
check-clean-git) echo "removed" ;;
codecov) echo "removed" ;;
all)
setup_repos;
coverage;
check-clean-git;
codecov;
;;
esac