From cf36fe039c0a797c2cc9d0ac0fc3019eb5882525 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Fri, 17 May 2019 21:04:23 +0200 Subject: [PATCH] configure initial CI script to build HermitCore on GitLab --- .gitlab-ci.yml | 41 +++++++++++++++++++++++++++++++++++++++++ Dockerfile | 19 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 Dockerfile diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..f12c52ff2 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,41 @@ +variables: + IMAGE: ubuntu:with-hermitcore + +stages: + - prepare + - build + #- test + +# Stage: prepare +############################################################################## + +docker: + stage: prepare + script: + - docker build -t ${IMAGE} . + tags: + - shell + - linux + +# Stage: build +############################################################################## + +build: + stage: build + script: + - mkdir -p build + - cd build + - cmake -DTOOLCHAIN_BIN_DIR=/opt/hermit/bin -DCMAKE_INSTALL_PREFIX=/opt/hermit .. + - make + image: ${IMAGE} + tags: + - docker + artifacts: + untracked: true + expire_in: 1 week + paths: + - ./ + +# Stage: test +############################################################################## + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..de6f05fe9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +# Download base image ubuntu 18.04 +FROM ubuntu:18.04 + +ENV DEBIAN_FRONTEND=noninteractive + +# Install required packets from ubuntu repository +RUN apt-get install -y apt-transport-https curl cmake bsdmainutils wget vim nano git binutils autoconf automake make cmake qemu-kvm qemu-system-x86 nasm gcc g++ ca-certificates build-essential libtool + +# add path to hermitcore packets +RUN echo "deb [trusted=yes] https://dl.bintray.com/hermitcore/ubuntu bionic main" | tee -a /etc/apt/sources.list + +# Update Software repository +RUN apt-get -qq update + +# Install required packets from ubuntu repository +RUN apt-get install -y --allow-unauthenticated binutils-hermit newlib-hermit pte-hermit gcc-hermit libhermit libomp-hermit + +ENV PATH="/opt/hermit/bin:${PATH}" +ENV EDITOR=vim