Setup the CI images and try the first drone build
This commit is contained in:
parent
edc35978fd
commit
413c26b298
7
.ci.yml
7
.ci.yml
|
@ -6,11 +6,10 @@ platform:
|
|||
arch: arm64
|
||||
|
||||
steps:
|
||||
- name: greeting
|
||||
image: alpine
|
||||
- name:
|
||||
image: rg.fr-par.scw.cloud/serene/llvm:15-7
|
||||
commands:
|
||||
- echo hello
|
||||
- echo world
|
||||
- ./builder build
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
|
|
22
builder
22
builder
|
@ -228,11 +228,20 @@ function build-tests() { ## Generates and build the project including the test c
|
|||
popd_build
|
||||
}
|
||||
|
||||
function build-llvm-image-arm64() { ## Build the LLVM image that we use to build Serene's image (on ARM64)
|
||||
# shellcheck source=/dev/null
|
||||
source .env
|
||||
docker buildx build --platform linux/arm64 --builder multiarch --load \
|
||||
-f "$ME/resources/docker/llvm/Dockerfile" \
|
||||
-t "$REGISTRY/llvm:$1-$2" \
|
||||
--build-arg VERSION="$1" \
|
||||
.
|
||||
}
|
||||
|
||||
function build-llvm-image() { ## Build the LLVM image that we use to build Serene's image
|
||||
# shellcheck source=/dev/null
|
||||
source .env
|
||||
|
||||
docker build \
|
||||
docker buildx build \
|
||||
-f "$ME/resources/docker/llvm/Dockerfile" \
|
||||
-t "$REGISTRY/llvm:$1-$2" \
|
||||
--build-arg VERSION="$1" \
|
||||
|
@ -247,6 +256,15 @@ function push-llvm-image() { ## Pushes the LLVM image to the registery
|
|||
docker push "$REGISTRY/llvm:$1"
|
||||
}
|
||||
|
||||
function build-serene-image-arm64() { ## Build the Serene docker image for the current HEAD (on ARM64)
|
||||
# shellcheck source=/dev/null
|
||||
source .env
|
||||
|
||||
docker buildx build --platform linux/arm64 --builder multiarch --load \
|
||||
-f "$ME/resources/docker/serene/Dockerfile" \
|
||||
-t "$REGISTRY/serene:$VERSION-$(git rev-parse HEAD)" \
|
||||
.
|
||||
}
|
||||
|
||||
|
||||
function build-serene-image() { ## Build the Serene docker image for the current HEAD
|
||||
|
|
|
@ -2,7 +2,8 @@ FROM debian:sid-slim
|
|||
|
||||
ARG VERSION
|
||||
|
||||
RUN apt-get update && apt-get install -y wget \
|
||||
RUN uname -a
|
||||
RUN apt-get update && apt-get install -y apt-utils && apt-get install -y wget \
|
||||
gnupg \
|
||||
ccache \
|
||||
cmake \
|
||||
|
@ -15,6 +16,7 @@ RUN apt-get update && apt-get install -y wget \
|
|||
wget \
|
||||
software-properties-common \
|
||||
zlib1g \
|
||||
apt-utils \
|
||||
zlib1g-dev
|
||||
|
||||
RUN wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh
|
||||
|
@ -37,3 +39,12 @@ ENV CMAKE_PREFIX_PATH=/usr/lib/llvm-${VERSION}
|
|||
ENV LD_LIBRARY_PATH=/usr/lib/llvm-${VERSION}/lib/clang/${VERSION}.0.0/lib/linux/
|
||||
|
||||
RUN apt-get clean
|
||||
|
||||
WORKDIR /iwuy
|
||||
RUN git clone https://github.com/include-what-you-use/include-what-you-use.git --depth 1 && \
|
||||
mkdir build && cd build && \
|
||||
cmake -G "Unix Makefiles" -DCMAKE_PREFIX_PATH=/usr/lib/llvm-${VERSION} ../include-what-you-use && \
|
||||
make && make install
|
||||
|
||||
WORKDIR /
|
||||
RUN rm /iwuy -rf
|
||||
|
|
|
@ -21,4 +21,4 @@ RUN cmake -DCMAKE_INSTALL_PREFIX=/opt/llvm -P cmake_install.cmake
|
|||
|
||||
FROM debian:sid-slim
|
||||
|
||||
COPY --from=builder /opt/llvm /opt/llvm
|
||||
COPY --from=builder /opt/llvm /opt/llvm
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM rg.fr-par.scw.cloud/serene/llvm:15-4
|
||||
FROM rg.fr-par.scw.cloud/serene/llvm:15-7
|
||||
|
||||
ARG TASK=build
|
||||
|
||||
|
|
Loading…
Reference in New Issue