Create .gitlab-ci.yml file

This commit is contained in:
Mario Krattenmacher 2022-05-04 20:35:42 +00:00 committed by DSPOM
parent afce91bd71
commit daee9857ed
1 changed files with 47 additions and 0 deletions

47
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,47 @@
# This file is a template, and might need editing before it works on your project.
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml
# Official language image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/python/tags/
image: registry.gitlab.com/dspom/ngspice:latest
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/topics/caching/
#
# If you want to also cache the installed packages, you have to install
# them in a virtualenv and cache it as well.
cache:
paths:
- .cache/pip
stages:
- build
- test_cases
build_ngspice:
stage: build
script:
- ./autogen.sh
- mkdir debug
- cd debug
- ../configure --with-x --with-readline=yes LIBS=-ldl
- make
artifacts:
paths:
- debug/
expire_in: 20 minutes
test_diode:
needs: [build_ngspice]
stage: test_cases
script:
- pytest test_cases/diode/test_diode.py