Skip to content

Commit

Permalink
Merge pull request #339 from OutpostUniverse/updateDockerImage
Browse files Browse the repository at this point in the history
Update Docker image
  • Loading branch information
DanRStevens authored Nov 21, 2020
2 parents 8c31796 + 5a2e28c commit 52aa45c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 28 deletions.
36 changes: 10 additions & 26 deletions .circleci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,44 +1,28 @@
# For building on CircleCI with Google Test

# Build from the root project folder with:
# docker build .circleci/ --tag outpostuniverse/circleci-gcc-clang-googletest
# docker build .circleci/ --tag outpostuniverse/op2utility:1.1
# Push image to DockerHub with:
# docker login
# docker push outpostuniverse/circleci-gcc-clang-googletest
# docker push outpostuniverse/op2utility

# Run locally using the CircleCI command line interface:
# circleci build
# Validate .circleci/config.yml file with:
# circleci config validate

FROM ubuntu:18.04
FROM ubuntu:20.04

# Install CircleCI tools needed for primary containers
RUN apt-get update && apt-get install -y --no-install-recommends \
# Install Development tools, Google Test library, and tools for primary CircleCI container
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential \
clang \
cmake \
libgtest-dev \
libgmock-dev \
git \
ssh \
tar \
gzip \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*

# Install gcc and clang compilers
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
clang \
&& rm -rf /var/lib/apt/lists/*

# Install Google Test (source package and build dependencies)
RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \
libgtest-dev \
&& rm -rf /var/lib/apt/lists/*

# Compile and install Google Test
ARG gtestBuildDir=/tmp/gtest/
RUN mkdir -p ${gtestBuildDir} && \
cd ${gtestBuildDir} && \
cmake -DCMAKE_CXX_FLAGS="-std=c++14" /usr/src/gtest/ && \
make -C ${gtestBuildDir} && \
cp ${gtestBuildDir}lib*.a /usr/lib && \
rm -rf ${gtestBuildDir}
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ version: 2
jobs:
gcc:
docker:
- image: outpostuniverse/circleci-gcc-clang-googletest
- image: outpostuniverse/op2utility:1.1
steps:
- checkout
- run: make -k CXX=g++
- run: make check CXX=g++
clang:
docker:
- image: outpostuniverse/circleci-gcc-clang-googletest
- image: outpostuniverse/op2utility:1.1
steps:
- checkout
- run: make -k CXX=clang++
Expand Down

0 comments on commit 52aa45c

Please sign in to comment.