Skip to content
Snippets Groups Projects
Commit ff096e7b authored by Patrick Godwin's avatar Patrick Godwin
Browse files

.gitlab-ci.yml: add docker conda stage, adjust needs for jobs with no...

.gitlab-ci.yml: add docker conda stage, adjust needs for jobs with no dependencies, reduce git depth
parent f6a5a605
No related branches found
No related tags found
1 merge request!37Add conda containers into CI
......@@ -14,6 +14,9 @@ variables:
COMP: gcc
PATCHFLAGS: -c $COMP -k --nocheck -f
# don't need git history
GIT_DEPTH: 1
before_script:
# Enable gcc-devtoolset-7
#- source /opt/rh/devtoolset-7/enable
......@@ -68,9 +71,16 @@ stages:
EOF
- docker build -t $IMAGE_TAG .
- docker push $IMAGE_TAG
# NOTE: waiting on https://gitlab.com/gitlab-org/gitlab/-/issues/30680, otherwise
# job dependencies don't work correctly for downstream stages
#only:
# changes:
# - gstlal-inspiral/share/conda/dev-environment.yml
needs: []
only:
- schedules
- pushes
dependencies/conda:
<<: *dependencies
......@@ -108,6 +118,7 @@ dependencies/conda:
level0:rpm:gstlal:
<<: *levelN-rpm-package
stage: level0
needs: []
level1:rpm:gstlal-ugly:
<<: *levelN-rpm-package
......@@ -315,6 +326,62 @@ docker:el7:
except:
- /gstlal-([a-z]+-|)[0-9]+\.[0-9]+\.[0-9]+-v[0-9]+/
docker:conda:
stage: docker
variables:
GIT_STRATEGY: fetch
NUM_CORES: 4
before_script: []
script:
- IMAGE_TAG=$CI_REGISTRY_IMAGE/conda:$CI_COMMIT_REF_NAME
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- |
cat <<EOF > Dockerfile
FROM $CI_REGISTRY_IMAGE/dependencies/conda:$CI_COMMIT_REF_NAME
COPY gstlal /gstlal
COPY gstlal-ugly /gstlal-ugly
COPY gstlal-inspiral /gstlal-inspiral
COPY gstlal-burst /gstlal-burst
RUN cd /gstlal && \
./00init.sh && \
PREFIX=/opt/conda CONDA_BUILD="1" ./configure --prefix=/opt/conda --without-doxygen && \
make -j$NUM_CORES && \
make install -j$NUM_CORES && \
cd .. && \
rm -rf gstlal && \
RUN cd /gstlal-ugly && \
./00init.sh && \
PREFIX=/opt/conda CONDA_BUILD="1" ./configure --prefix=/opt/conda --without-doxygen --without-gds && \
make -j$NUM_CORES && \
make install -j$NUM_CORES && \
cd .. && \
rm -rf gstlal-ugly && \
RUN cd /gstlal-inspiral && \
./00init.sh && \
PREFIX=/opt/conda CONDA_BUILD="1" ./configure --prefix=/opt/conda --without-doxygen && \
make -j$NUM_CORES && \
make install -j$NUM_CORES && \
cd .. && \
rm -rf gstlal-inspiral && \
RUN cd /gstlal-burst && \
./00init.sh && \
PREFIX=/opt/conda CONDA_BUILD="1" ./configure --prefix=/opt/conda && \
make -j$NUM_CORES && \
make install -j$NUM_CORES && \
cd .. && \
rm -rf gstlal-burst && \
ENV PKG_CONFIG_PATH /opt/conda/lib/pkgconfig
ENV GST_PLUGIN_PATH /opt/conda/lib/gstreamer-1.0
ENTRYPOINT bash
EOF
- docker build -t $IMAGE_TAG .
- docker push $IMAGE_TAG
needs:
- dependencies/conda
only:
- schedules
- pushes
docker:release:gstlal-inspiral:el7:
stage: docker
before_script: []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment