nichijou/.gitlab-ci.yml

83 lines
1.3 KiB
YAML
Raw Normal View History

2022-04-02 09:24:17 -04:00
image: debian
2019-12-13 19:44:34 -05:00
stages:
- analyse
- test
- deploy
variables:
GIT_SUBMODULE_STRATEGY: normal
2022-04-02 09:24:17 -04:00
cache:
paths:
- .venv/
before_script:
- apt-get update
- apt-get dist-upgrade -y
- >
apt-get install --no-install-recommends -y
bash
build-essential
cmake
coreutils
findutils
git
grep
make
plantuml
python3
python3-pip
python3-venv
rsync
sed
# Convenient hack until this is fixed.
- ln -s /usr/bin/python3 /usr/bin/python
.setup_build: &setup_build
- python -m venv .venv
- . ./.venv/bin/activate
- python -m pip install -r requirements.txt
- mkdir build
- cd build
2019-12-13 19:44:34 -05:00
line_limit:
stage: analyse
2022-04-02 09:24:17 -04:00
needs: []
2019-12-13 19:44:34 -05:00
allow_failure: true
script:
2022-04-02 09:24:17 -04:00
- *setup_build
2019-12-13 19:44:34 -05:00
- cmake -DDOC:STRING=OFF -DLINE_LIMIT:BOOL=ON -DWERROR:BOOL=ON ..
- make line_limit
regex_check:
stage: analyse
2022-04-02 09:24:17 -04:00
needs: []
2019-12-13 19:44:34 -05:00
allow_failure: true
script:
2022-04-02 09:24:17 -04:00
- *setup_build
2019-12-13 19:44:34 -05:00
- cmake -DDOC:STRING=OFF -DREGEX_CHECK:BOOL=ON -DWERROR:BOOL=ON ..
- make regex_check
sphinx_html:
stage: test
2022-04-02 09:24:17 -04:00
needs: []
2019-12-13 19:44:34 -05:00
script:
2022-04-02 09:24:17 -04:00
- *setup_build
- cmake -DDOC:STRING=html ..
2019-12-13 19:44:34 -05:00
- make
artifacts:
paths:
- build/doc/html
2022-04-02 09:24:17 -04:00
pages:
2019-12-13 19:44:34 -05:00
stage: deploy
2022-04-02 09:24:17 -04:00
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
needs: ["sphinx_html"]
2019-12-13 19:44:34 -05:00
script:
- mv build/doc/html public
2022-04-02 09:24:17 -04:00
artifacts:
paths:
- public