ci: update ci to use poetry

This commit is contained in:
Renken 2023-04-14 20:24:12 +02:00
parent 154f041c5e
commit 06ca913562
Signed by: renken
GPG key ID: 1F2BB159B645E575

View file

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