Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add clang/lld docker image #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

TARGETS := circleci circleci-android circleci-android-arm32 \
circleci-android-arm64 circleci-mingw circleci-x86_64 \
circleci-freebsd11-x86_64
circleci-freebsd11-x86_64 \
circleci-clang-x86_64 circleci-clang-i386

#
# To publish a new tag modify the variables below, commit and then
Expand All @@ -27,6 +28,8 @@ TAG_circleci-android := 0.5
TAG_circleci-android-arm32 := 0.6
TAG_circleci-android-arm64 := 0.6
TAG_circleci-freebsd11-x86_64 := 0.4
TAG_circleci-clang-x86_64 := 0.1
TAG_circleci-clang-i386 := 0.1

all: $(TARGETS)

Expand Down Expand Up @@ -54,6 +57,12 @@ circleci-freebsd11-x86_64: circleci/freebsd11
circleci-i386: circleci/i386
docker build -t lkldocker/$@:$(TAG_$@) $^

circleci-clang-x86_64: circleci/clang/x86_64
docker build -t lkldocker/$@:$(TAG_$@) $^

circleci-clang-i386: circleci/clang/i386
docker build -t lkldocker/$@:$(TAG_$@) $^

tag-%:
@if [ -z $(TAG_$*) ]; then \
echo "unknown image $(*)"; \
Expand Down
33 changes: 33 additions & 0 deletions circleci/clang/i386/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM i386/ubuntu:18.04
LABEL authors="Hajime Tazaki <[email protected]>, Octavian Purdila <[email protected]>"

ENV LLVM_VERSION=8
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:git-core/ppa && \
apt-get update && \
apt-get install -y sudo build-essential bc git xfsprogs ccache \
btrfs-tools iputils-ping dosfstools \
python python-pip bison flex iproute2 \
libfuse-dev libarchive-dev \
linux-headers-`uname -r` \
valgrind libnuma-dev \
clang-$LLVM_VERSION lld-$LLVM_VERSION && \
ln -sf `which clang-$LLVM_VERSION` /usr/bin/clang && \
ln -sf `which ld.lld-$LLVM_VERSION` /usr/bin/ld.lld && \
pip install yamlish junit_xml && \
rm -rf /var/lib/apt/lists/*

RUN useradd -ms /bin/bash ubuntu && \
adduser ubuntu sudo && \
echo -n 'ubuntu:ubuntu' | chpasswd

# Enable passwordless sudo for users under the "sudo" group
RUN sed -i.bkp -e \
's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' \
/etc/sudoers

USER ubuntu
WORKDIR /home/ubuntu/

ENV PATH /usr/lib/ccache:${PATH}
16 changes: 16 additions & 0 deletions circleci/clang/x86_64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM lkldocker/circleci:0.5
LABEL authors="Hajime Tazaki <[email protected]>, Octavian Purdila <[email protected]>"

ENV LLVM_VERSION=8
RUN sudo apt-get update && \
sudo apt-get install -y wget && \
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - && \
sudo add-apt-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-$LLVM_VERSION main" && \
sudo apt-get update && \
sudo apt-get install -y libfuse-dev libarchive-dev \
linux-headers-4.4.0-97-generic \
valgrind libnuma-dev \
clang-$LLVM_VERSION lld-$LLVM_VERSION && \
sudo ln -sf `which clang-$LLVM_VERSION` /usr/bin/clang && \
sudo ln -sf `which ld.lld-$LLVM_VERSION` /usr/bin/ld.lld && \
sudo rm -rf /var/lib/apt/lists/*