Skip to content

Commit dd3b809

Browse files
committed
Use a special D docker image for CircleCi
1 parent da78eec commit dd3b809

2 files changed

Lines changed: 36 additions & 36 deletions

File tree

.circleci/config.yml

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,40 @@
11
version: 2
22
jobs:
3-
build:
3+
no_pic:
44
working_directory: ~/dmd
55
docker:
66
- image: circleci/node:4.8.2
7-
parallelism: 1
8-
branches:
9-
ignore:
10-
- dmd-1.x
7+
parallelism: 2
118
steps:
129
- checkout
1310
- run:
1411
command: ./.circleci/run.sh install-deps
15-
name: Install DMD
12+
name: Install dependencies
1613
- run:
17-
command: sudo apt-get update && sudo apt-get install gdb
18-
name: Install GDB
19-
- run:
20-
command: ./.circleci/run.sh setup-repos
21-
name: Clone DRuntime & Phobos
22-
- run:
23-
command: ./.circleci/run.sh coverage
24-
name: Run testsuite with -cov
14+
command: ./.circleci/run.sh all
15+
name: Run all
16+
pic:
17+
working_directory: ~/dmd
18+
docker:
19+
- image: dlang2/dmd-circleci:2.078.0
20+
steps:
21+
- checkout
2522
- run:
26-
command: ./.circleci/run.sh check-clean-git
27-
name: Check for temporary files generated by the test suite
23+
# this is needed to "fix" the Docker permission errors - see https://github.com/dlang/dmd/pull/7579
24+
command: sudo ls -l /dlang/dmd-2.078.0/linux && sudo ls -l /dlang/dmd-2.078.0/src
25+
name: Test Docker image
2826
- run:
29-
command: ./.circleci/run.sh codecov
30-
name: Upload coverage files to CodeCov
27+
command: ./.circleci/run.sh all
28+
workflows:
29+
version: 2
30+
all:
31+
jobs:
32+
- pic
33+
filters:
34+
branches:
35+
ignore: dmd-1.x
36+
- no_pic
37+
#filters:
38+
#branches:
39+
#ignore:
40+
#- dmd-1.x

.circleci/run.sh

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
set -uexo pipefail
44

5-
HOST_DMD_VER=2.072.2 # same as in dmd/src/posix.mak
65
CURL_USER_AGENT="CirleCI $(curl --version | head -n 1)"
76
N=2
87
CIRCLE_NODE_INDEX=${CIRCLE_NODE_INDEX:-0}
98
CIRCLE_PROJECT_REPONAME=${CIRCLE_PROJECT_REPONAME:-dmd}
109
BUILD="debug"
10+
DMD=dmd
1111

1212
case $CIRCLE_NODE_INDEX in
1313
0) MODEL=64 ;;
@@ -48,19 +48,6 @@ download() {
4848
done
4949
}
5050

51-
install_deps() {
52-
if [ $MODEL -eq 32 ]; then
53-
sudo apt-get update --quiet=2
54-
sudo aptitude install g++-multilib --assume-yes --quiet=2
55-
fi
56-
57-
download "https://dlang.org/install.sh" "https://nightlies.dlang.org/install.sh" "install.sh"
58-
59-
source "$(CURL_USER_AGENT=\"$CURL_USER_AGENT\" bash install.sh dmd-$HOST_DMD_VER --activate)"
60-
$DC --version
61-
env
62-
}
63-
6451
setup_repos() {
6552
# set a default in case we run into rate limit restrictions
6653
local base_branch=""
@@ -92,9 +79,6 @@ setup_repos() {
9279
9380
coverage()
9481
{
95-
# load environment for bootstrap compiler
96-
source "$(CURL_USER_AGENT=\"$CURL_USER_AGENT\" bash ~/dlang/install.sh dmd-$HOST_DMD_VER --activate)"
97-
9882
# build dmd, druntime, and phobos
9983
make -j$N -C src -f posix.mak MODEL=$MODEL HOST_DMD=$DMD BUILD=$BUILD ENABLE_WARNINGS=1 all
10084
make -j$N -C ../druntime -f posix.mak MODEL=$MODEL
@@ -144,9 +128,15 @@ codecov()
144128
}
145129
146130
case $1 in
147-
install-deps) install_deps ;;
131+
install-deps) echo "removed" ;;
148132
setup-repos) setup_repos ;;
149133
coverage) coverage ;;
150134
check-clean-git) check_clean_git;;
151135
codecov) codecov ;;
136+
all)
137+
setup_repos;
138+
coverage;
139+
check-clean-git;
140+
codecov;
141+
;;
152142
esac

0 commit comments

Comments
 (0)