Skip to content

Commit

Permalink
Use our own image for CircleCI
Browse files Browse the repository at this point in the history
This will allow us to configure those images as we want to. I am
hoping that this also means that we can add the Intel compiler for
example.

Signed-off-by: Nicolas Bock <nicolasbock@gmail.com>
  • Loading branch information
nicolasbock committed Feb 13, 2020
1 parent 11061dd commit a484bd3
Show file tree
Hide file tree
Showing 7 changed files with 133 additions and 15 deletions.
96 changes: 86 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,100 @@
version: 2.0

jobs:
basejob: &base-template
build-gcc-4.7-shared-serial-external: &build-template
docker:
- image: ubuntu:xenial
- image: nicolasbock/bml-ci-build:1.0
steps:
- run: apt-get update
- run: apt-get install --assume-yes git-core
- checkout
- run:
environment:
OMP_NUM_THREADS: 4
CMAKE_BUILD_TYPE: Debug
VERBOSE_MAKEFILE: yes
PARALLEL_TEST_JOBS: 2
CC: gcc-4.7
CXX: g++-4.7
FC: gfortran-4.7
BUILD_SHARED_LIBS: yes
BML_VALGRIND: no
BML_OPENMP: no
BML_INTERNAL_BLAS: no
command: ./build.sh testing

build:
<<: *base-template
build-gcc-4.7-shared-serial-internal:
<<: *build-template
steps:
- checkout
- run:
environment:
OMP_NUM_THREADS: 4
CMAKE_BUILD_TYPE: Debug
VERBOSE_MAKEFILE: yes
PARALLEL_TEST_JOBS: 2
CC: gcc-4.7
CXX: g++-4.7
FC: gfortran-4.7
BUILD_SHARED_LIBS: yes
BML_VALGRIND: no
BML_OPENMP: no
BML_INTERNAL_BLAS: yes
command: ./build.sh testing

build-gcc-4.7-shared-OpenMP-external:
<<: *build-template
steps:
- checkout
- run:
environment:
OMP_NUM_THREADS: 4
CMAKE_BUILD_TYPE: Debug
VERBOSE_MAKEFILE: yes
PARALLEL_TEST_JOBS: 2
CC: gcc-4.7
CXX: g++-4.7
FC: gfortran-4.7
BUILD_SHARED_LIBS: yes
BML_VALGRIND: no
BML_OPENMP: yes
BML_INTERNAL_BLAS: no
command: ./build.sh testing

build-gcc-4.7-shared-OpenMP-internal:
<<: *build-template
steps:
- checkout
- run:
environment:
OMP_NUM_THREADS: 4
CMAKE_BUILD_TYPE: Debug
VERBOSE_MAKEFILE: yes
PARALLEL_TEST_JOBS: 2
CC: gcc-4.7
CXX: g++-4.7
FC: gfortran-4.7
BUILD_SHARED_LIBS: yes
BML_VALGRIND: no
BML_OPENMP: yes
BML_INTERNAL_BLAS: yes
command: ./build.sh testing

lint:
docker:
- image: nicolasbock/bml-ci-lint:1.0
steps:
- run: apt-get update
- run: apt-get install --assume-yes git-core
- checkout
- run: ls -lh
- run: bundle install
- run: bundle exec danger || true
- run: BML_OPENMP=no VERBOSE_MAKEFILE=yes EMACS=emacs26 ./build.sh check_indent

workflows:
version: 2
lint:
jobs:
- lint
build:
jobs:
- build
- build-gcc-4.7-shared-serial-external
- build-gcc-4.7-shared-serial-internal
- build-gcc-4.7-shared-OpenMP-external
- build-gcc-4.7-shared-OpenMP-internal
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
*~
build.log
build
install
tags
TAGS
/build.log
/build
/install
/tags
/TAGS
13 changes: 13 additions & 0 deletions ci-images/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM ubuntu:xenial
COPY toolchain.list /etc/apt/sources.list.d
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 60C317803A41BA51845E371A1E9377A2BA9EF27F
RUN apt-get update
RUN apt-get install --assume-yes --no-install-recommends apt-utils
RUN apt-get install --assume-yes --no-install-recommends build-essential
RUN apt-get install --assume-yes --no-install-recommends cmake cmake-data libblas-dev liblapack-dev
RUN apt-get install --assume-yes --no-install-recommends gcc-4.7 g++-4.7 gfortran-4.7
RUN apt-get install --assume-yes --no-install-recommends gcc-9 g++-9 gfortran-9
RUN apt-get install --assume-yes --no-install-recommends git-core
RUN apt-get install --assume-yes --no-install-recommends openssh-client
RUN apt-get install --assume-yes --no-install-recommends python
RUN apt-get install --assume-yes --no-install-recommends valgrind
2 changes: 2 additions & 0 deletions ci-images/build/toolchain.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main
deb-src http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main
14 changes: 14 additions & 0 deletions ci-images/lint/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM ubuntu:xenial
COPY emacs.list /etc/apt/sources.list.d
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 873503A090750CDAEB0754D93FF0E01EEAAFC9CD
RUN apt-get update
RUN apt-get install --assume-yes --no-install-recommends apt-utils
RUN apt-get install --assume-yes --no-install-recommends bundler
RUN apt-get install --assume-yes --no-install-recommends emacs26
RUN apt-get install --assume-yes --no-install-recommends git-core
RUN apt-get install --assume-yes --no-install-recommends indent
RUN apt-get install --assume-yes --no-install-recommends openssh-client
RUN apt-get install --assume-yes --no-install-recommends python-pip
RUN apt-get install --assume-yes --no-install-recommends python-setuptools
RUN apt-get install --assume-yes --no-install-recommends python-wheel
RUN pip install proselint
2 changes: 2 additions & 0 deletions ci-images/lint/emacs.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
deb http://ppa.launchpad.net/kelleyk/emacs/ubuntu xenial main
deb-src http://ppa.launchpad.net/kelleyk/emacs/ubuntu xenial main
11 changes: 11 additions & 0 deletions refresh-ci-images.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

set -x

: ${IMAGE_TAG:=bml-ci}
: ${IMAGE_VERSION:=1.0}

for workflow in build lint; do
docker build --tag nicolasbock/${IMAGE_TAG}-${workflow}:${IMAGE_VERSION} ci-images/${workflow}
docker push nicolasbock/${IMAGE_TAG}-${workflow}:${IMAGE_VERSION}
done

0 comments on commit a484bd3

Please sign in to comment.