image: "debian"

build:
    stage: build
    before_script:
        - echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list
        - apt update -qq
        - apt install -y -qq gcc-arm-none-eabi python3-pip git
        - apt install -y -qq -t stretch-backports meson
        - pip3 install crc16
    script:
        - ./bootstrap.sh
        - ninja -C build/

pages:
    stage: deploy
    image: ubuntu:bionic
    before_script:
        - apt update -qq
        - apt install -y -qq python3-pip git clang libclang-dev llvm
        - pip3 install sphinx sphinx_rtd_theme clang
    script:
        - export LD_LIBRARY_PATH=$(llvm-config --libdir)
        - echo $LD_LIBRARY_PATH
        - sphinx-build -b html Documentation/ Documentation/output/
        - mv Documentation/output/ public/
    artifacts:
        paths:
            - public/
    only:
        - master
