forked from namhyung/uftrace
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
misc: Add docker build argument for distribution tests
This commit adds build arguments in Dockerfiles, which enables tests for distributions. With this commit, we can test uftrace in specific distros like `docker build --build-arg test=yes .`. Signed-off-by: Kang Minchul <[email protected]>
- Loading branch information
1 parent
04c5a1c
commit c3906f1
Showing
8 changed files
with
70 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
FROM alpine:3.13 | ||
ARG test | ||
RUN apk update | ||
RUN apk add build-base linux-headers git bash libunwind-dev | ||
RUN mkdir -p /usr/src | ||
RUN git clone https://github.com/namhyung/uftrace /usr/src/uftrace | ||
RUN cd /usr/src/uftrace && ./misc/install-deps.sh && ./configure && make && make install | ||
RUN if [ "${test}" == "yes" ] ; then \ | ||
cd /usr/src/uftrace && ./misc/install-deps.sh && ./configure && make && make unittest; \ | ||
else \ | ||
cd /usr/src/uftrace && ./misc/install-deps.sh && ./configure && make && make install; \ | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
FROM alpine:3.14 | ||
ARG test | ||
RUN apk update | ||
RUN apk add build-base linux-headers git bash libunwind-dev | ||
RUN mkdir -p /usr/src | ||
RUN git clone https://github.com/namhyung/uftrace /usr/src/uftrace | ||
RUN cd /usr/src/uftrace && ./misc/install-deps.sh && ./configure && make && make install | ||
RUN if [ "${test}" == "yes" ] ; then \ | ||
cd /usr/src/uftrace && ./misc/install-deps.sh && ./configure && make && make unittest; \ | ||
else \ | ||
cd /usr/src/uftrace && ./misc/install-deps.sh && ./configure && make && make install; \ | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
FROM archlinux/base:latest | ||
FROM archlinux:latest | ||
ARG test | ||
RUN pacman -Sy | ||
RUN yes | pacman -S git gcc make | ||
RUN mkdir -p /usr/src | ||
RUN git clone https://github.com/namhyung/uftrace /usr/src/uftrace | ||
RUN cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make && make install | ||
RUN if [ "$test" = "yes" ] ; then \ | ||
cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make ASAN=1 && make ASAN=1 unittest; \ | ||
else \ | ||
cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make && make install; \ | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,20 @@ | ||
FROM centos:7 | ||
ARG test | ||
RUN yum install -y git gcc make epel-release | ||
RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY* | ||
|
||
# update gcc version | ||
RUN yum install -y centos-release-scl | ||
RUN yum install -y devtoolset-9-gcc* devtoolset-9-libasan-devel devtoolset-9-libubsan-devel | ||
RUN echo "source /opt/rh/devtoolset-9/enable" >> /etc/bashrc | ||
SHELL ["/bin/bash", "--login", "-c"] | ||
|
||
RUN mkdir -p /usr/src | ||
RUN git clone https://github.com/namhyung/uftrace /usr/src/uftrace | ||
RUN cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make && make install | ||
RUN if [ "$test" = "yes" ] ; then \ | ||
cd /usr/src/uftrace \ | ||
&& ./misc/install-deps.sh -y \ | ||
&& ./configure && make ASAN=1 && make ASAN=1 unittest; \ | ||
else \ | ||
cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make && make install; \ | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
FROM fedora:33 | ||
ARG test | ||
RUN yum install -y git gcc make | ||
RUN mkdir -p /usr/src | ||
RUN git clone https://github.com/namhyung/uftrace /usr/src/uftrace | ||
RUN cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make && make install | ||
RUN if [ "$test" = "yes" ] ; then \ | ||
cd /usr/src/uftrace \ | ||
&& ./misc/install-deps.sh -y \ | ||
&& ./configure && make ASAN=1 && make ASAN=1 unittest; \ | ||
else \ | ||
cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make && make install; \ | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
FROM fedora:34 | ||
ARG test | ||
RUN yum install -y git gcc make | ||
RUN mkdir -p /usr/src | ||
RUN git clone https://github.com/namhyung/uftrace /usr/src/uftrace | ||
RUN cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make && make install | ||
RUN if [ "$test" = "yes" ] ; then \ | ||
cd /usr/src/uftrace \ | ||
&& ./misc/install-deps.sh -y \ | ||
&& ./configure && make ASAN=1 && make ASAN=1 unittest; \ | ||
else \ | ||
cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make && make install; \ | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
FROM ubuntu:16.04 | ||
ARG test | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends git gcc make ca-certificates | ||
&& apt-get install -y --no-install-recommends git gcc make ca-certificates | ||
RUN mkdir -p /usr/src | ||
RUN git clone https://github.com/namhyung/uftrace /usr/src/uftrace | ||
RUN cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make && make install | ||
RUN if [ "$test" = "yes" ] ; then \ | ||
cd /usr/src/uftrace \ | ||
&& ./misc/install-deps.sh -y \ | ||
&& ./configure && make ASAN=1 && make ASAN=1 unittest; \ | ||
else \ | ||
cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make && make install; \ | ||
fi | ||
RUN apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
&& rm -rf /var/lib/apt/lists/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
FROM ubuntu:18.04 | ||
ARG test | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends git gcc make ca-certificates | ||
&& apt-get install -y --no-install-recommends git gcc make ca-certificates | ||
RUN mkdir -p /usr/src | ||
RUN git clone https://github.com/namhyung/uftrace /usr/src/uftrace | ||
RUN cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make && make install | ||
RUN if [ "$test" = "yes" ] ; then \ | ||
cd /usr/src/uftrace \ | ||
&& ./misc/install-deps.sh -y \ | ||
&& ./configure && make ASAN=1 && make ASAN=1 unittest; \ | ||
else \ | ||
cd /usr/src/uftrace && ./misc/install-deps.sh -y && ./configure && make && make install; \ | ||
fi | ||
RUN apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
&& rm -rf /var/lib/apt/lists/* |