fltk/.gitlab-ci.yml
Albrecht Schlosser 0696bbe422 Reduce GitLab CI/CD build time due to new limits
GitLab Free account CI/CD limits effective Oct 1, 2020 will be
400 minutes per month. Trying to keep build time below the limit.
2020-09-07 12:09:55 +02:00

91 lines
2.3 KiB
YAML

# This file controls GitLab CI (Continuous Integration) for FLTK.
#
# It serves two purposes:
#
# (1) Continuously building FLTK with several build systems.
# (2) Generating current HTML documentation and putting it online.
#
# The documentation will be viewable at:
#
# https://fltk.gitlab.io/<repository>/
#
# <repository> can be:
# - fltk
#
# Details of this script:
#
# use the official gcc image, based on debian
# can use versions as well, like gcc:5.2
# see https://hub.docker.com/_/gcc/
image: gcc
stages:
- build
- deploy
# Build with autoconf/make (including Pango and Cairo)
# Disabled for regular builds after commits to save build time: "only schedules"
# Note: Build time limits on "GitLab Free" effective Oct 2020: 400 minutes per month
build-autotools:
stage: build
only:
- schedules
# install the necessary build tools
before_script:
- apt update && apt -y install make autoconf man
- apt -y install freeglut3-dev libfontconfig-dev libxft-dev libglew-dev
- apt -y install libxcursor-dev libxinerama-dev libasound2-dev
- apt -y install libpango1.0-dev libcairo2-dev
script:
- make clean
- ./configure --enable-pango --enable-cairo
- time make -j3
- cd examples && time make
artifacts:
paths:
- lib/
- test/cairo_test
- test/glpuzzle
- test/unittests
- test/fltk-versions
# Build with CMake and Ninja (with pango, cairo, building examples)
build-cmake:
stage: build
# install the necessary build tools
before_script:
- apt update && apt -y install cmake ninja-build
- apt -y install freeglut3-dev libfontconfig-dev libxft-dev libglew-dev
- apt -y install libxcursor-dev libxinerama-dev libasound2-dev
- apt -y install libpango1.0-dev libcairo2-dev
script:
- mkdir build && cd build
- cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DFLTK_BUILD_EXAMPLES=ON -DOPTION_USE_PANGO=ON -DOPTION_CAIRO=ON ..
- time ninja
artifacts:
paths:
- build/lib/
- build/bin/
# Generate and install HTML documentation
pages:
stage: deploy
# install the necessary build tools
before_script:
- apt update && apt -y install make autoconf man doxygen
script:
- make clean
- cd documentation
- make && make html
- cd ..
- mkdir -p public/
- mv documentation/html/* public/
artifacts:
paths:
- public