diff --git a/.circleci/config.yml b/.circleci/config.yml index 8101c3fba5e8..529febc4b294 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 diff --git a/.circleci/run.sh b/.circleci/run.sh index 54942e50bc60..ff2e18dad1b4 100755 --- a/.circleci/run.sh +++ b/.circleci/run.sh @@ -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 ;; @@ -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 @@ -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