From e99721a7e2b7b8c50b47c566be0ce9c7d5b725e8 Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Thu, 12 Apr 2018 10:03:19 +0200 Subject: [PATCH] Build with Circle CI. - Needs the same sudo stub as GitLab. - Some X11 libraries are required for building with the KA10 simulator. --- .circleci/config.yml | 17 +++++++++++++++++ build/dependencies.sh | 9 +++++---- 2 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..d3ab1372d --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,17 @@ +version: 2 +jobs: + build: + docker: + - image: debian + environment: + EMULATOR: "sims" + steps: + - checkout + - run: sh -ex build/dependencies.sh install_linux + - run: + name: build + command: "make EMULATOR=$EMULATOR" + no_output_timeout: 60m + timeout: 60m + - store_artifacts: + path: out diff --git a/build/dependencies.sh b/build/dependencies.sh index b56348a65..0973011b4 100644 --- a/build/dependencies.sh +++ b/build/dependencies.sh @@ -1,4 +1,4 @@ -if test -n "$GITLAB_CI"; then +if test -n "$GITLAB_CI" -o -n "$CIRCLECI"; then sudo() { "$@" } @@ -9,9 +9,10 @@ install_linux() { sudo apt-get install -my expect # For GitLab CI sudo apt-get install -my git make gcc libncurses-dev autoconf - if test "$EMULATOR" = simh; then - sudo apt-get install -y simh - fi + case "$EMULATOR" in + simh) sudo apt-get install -y simh;; + sims) sudo apt-get install -y libx11-dev libxt-dev;; + esac } "$1"