Try to config a git cache

This commit is contained in:
2022-12-24 17:42:39 +01:00
parent 03557b7c15
commit ad9281942e
2 changed files with 30 additions and 4 deletions
+21 -1
View File
@@ -1,6 +1,26 @@
image: docker:19.03.12
job-build-docker-latest:
stages:
- update
- build
cache:
key: blender-source
paths:
- /opt/blender-git/blender # Blender git repository source
- /opt/blender-git/lib # Blender Subversion lib package
policy: pull
update:
stage: update
cache:
key: blender-source
script:
- cd /opt/blender-git
- clone https://git.blender.org/blender.git
- svn checkout
build:
rules:
- changes:
- build.json
+9 -3
View File
@@ -3,6 +3,7 @@ FROM ubuntu:22.04 AS blender
# Setup all software version request
ARG b3d_vs_major=2.90
ARG b3d_vs_minor=0
ARG subversion=63014
LABEL Author="stilobique"
LABEL Title="Blender Docker for Unit Test"
@@ -27,14 +28,19 @@ RUN apt-get update && apt-get install -y \
libxi-dev \
python3
# Debug
RUN echo Build Blender v${b3d_vs_major}.${b3d_vs_minor}
ADD . /opt/blender-git
# Compile Blender
RUN mkdir /opt/blender-git/ && cd /opt/blender-git/ \
&& git clone -b v${b3d_vs_major}.${b3d_vs_minor} --depth 1 https://git.blender.org/blender.git \
RUN cd /opt/blender-git/ \
&& git checkout v${b3d_vs_major}.${b3d_vs_minor} \
&& git config --global user.email "contact@aurelien-vaillant.net" \
&& git config --global user.name "Aurelien Vaillant" \
&& mkdir /opt/blender-git/lib \
&& cd /opt/blender-git/lib \
&& svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/linux_centos7_x86_64 \
&& svn checkout -r${subversion} https://svn.blender.org/svnroot/bf-blender/trunk/lib/linux_centos7_x86_64 \
&& cd /opt/blender-git/blender \
&& git submodule update --init --recursive \
&& make