From ea2372c19a3bb80a64caa658c9bfc843557e8842 Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Fri, 23 Mar 2018 14:04:58 +0100 Subject: [PATCH] Build with GitLab CI. --- .gitlab-ci.yml | 17 +++++++++++++++++ README.md | 3 ++- build/dependencies.sh | 10 +++++++++- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..7e4e555b --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,17 @@ +image: ubuntu + +variables: + EMULATOR: klh10 + +stages: + - build + +job1: + stage: build + script: + - sh -ex build/dependencies.sh install_linux + - git submodule update --init + - make + artifacts: + paths: + - out/ diff --git a/README.md b/README.md index 327a0154..df8e7909 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Incompatible Timesharing System -[![Build Status](https://travis-ci.org/PDP-10/its.svg?branch=master)](https://travis-ci.org/PDP-10/its) +[![Travis CI Build Status](https://travis-ci.org/PDP-10/its.svg?branch=master)](https://travis-ci.org/PDP-10/its) +[![GitLab CI Build Status](https://gitlab.com/PDP-10/its/badges/master/pipeline.svg)](https://gitlab.com/PDP-10/its/commits/master) ### About ITS diff --git a/build/dependencies.sh b/build/dependencies.sh index 6cdd0bc0..b56348a6 100644 --- a/build/dependencies.sh +++ b/build/dependencies.sh @@ -1,8 +1,16 @@ +if test -n "$GITLAB_CI"; then + sudo() { + "$@" + } +fi + install_linux() { sudo apt-get update -myq 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 simh + sudo apt-get install -y simh fi }