ci: update ci to use poetry
This commit is contained in:
parent
154f041c5e
commit
06ca913562
1 changed files with 11 additions and 24 deletions
|
@ -1,62 +1,49 @@
|
|||
image: debian-stable
|
||||
image: python:3.9.16-slim-bullseye
|
||||
|
||||
stages:
|
||||
- analyse
|
||||
- test
|
||||
- deploy
|
||||
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: normal
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- .venv/
|
||||
- /.cache/poetry
|
||||
|
||||
.setup_build: &setup_build
|
||||
- apt-get update
|
||||
- apt-get dist-upgrade -y
|
||||
- >
|
||||
apt-get install --no-install-recommends -y
|
||||
bash
|
||||
build-essential
|
||||
cmake
|
||||
coreutils
|
||||
findutils
|
||||
curl
|
||||
git
|
||||
grep
|
||||
make
|
||||
plantuml
|
||||
python3
|
||||
python3-pip
|
||||
python3-venv
|
||||
python3-distutils
|
||||
rsync
|
||||
sed
|
||||
# Convenient hack until this is fixed.
|
||||
- ln -s /usr/bin/python3 /usr/bin/python
|
||||
- python -m venv .venv
|
||||
- . ./.venv/bin/activate
|
||||
- python -m pip install -r requirements.txt
|
||||
- mkdir build
|
||||
- cd build
|
||||
- curl -sSL https://install.python-poetry.org | python3 - --version 1.4.1
|
||||
- export PATH="/root/.local/bin:$PATH"
|
||||
|
||||
sphinx_html:
|
||||
doc:
|
||||
stage: test
|
||||
needs: []
|
||||
script:
|
||||
- *setup_build
|
||||
- cmake -DDOC:STRING=html ..
|
||||
- poetry install -n
|
||||
- make
|
||||
artifacts:
|
||||
paths:
|
||||
- build/doc/html
|
||||
- build/doc
|
||||
|
||||
pages:
|
||||
stage: deploy
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
||||
needs: ["sphinx_html"]
|
||||
needs: ["doc"]
|
||||
script:
|
||||
- mv build/doc/html public
|
||||
- mv build/doc public
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
|
|
Loading…
Reference in a new issue