2018-06-22 19:31:30 +03:00
|
|
|
# This file controls GitLab CI (Continuous Integration) for FLTK.
|
|
|
|
#
|
|
|
|
# It serves two purposes:
|
|
|
|
#
|
2020-09-07 16:00:38 +03:00
|
|
|
# (1) Continuously building FLTK with one or more build systems.
|
2018-06-22 19:31:30 +03:00
|
|
|
# (2) Generating current HTML documentation and putting it online.
|
|
|
|
#
|
2022-08-17 16:16:17 +03:00
|
|
|
# The HTML documentation will be viewable at:
|
2018-06-22 19:31:30 +03:00
|
|
|
#
|
2022-08-17 16:16:17 +03:00
|
|
|
# https://fltk.gitlab.io/fltk/
|
|
|
|
#
|
|
|
|
# The PDF documentation will be viewable at:
|
|
|
|
#
|
|
|
|
# https://fltk.gitlab.io/fltk/fltk.pdf
|
2018-06-22 19:31:30 +03:00
|
|
|
#
|
|
|
|
# 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)
|
|
|
|
|
2020-09-07 13:09:55 +03:00
|
|
|
# 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
|
|
|
|
|
2018-06-22 19:31:30 +03:00
|
|
|
build-autotools:
|
|
|
|
stage: build
|
2020-09-07 13:09:55 +03:00
|
|
|
only:
|
|
|
|
- schedules
|
2018-06-22 19:31:30 +03:00
|
|
|
# install the necessary build tools
|
2020-07-01 19:03:10 +03:00
|
|
|
before_script:
|
2018-06-22 19:31:30 +03:00
|
|
|
- apt update && apt -y install make autoconf man
|
2020-08-21 20:56:51 +03:00
|
|
|
- apt -y install freeglut3-dev libfontconfig-dev libxft-dev libglew-dev
|
2018-06-22 19:31:30 +03:00
|
|
|
- apt -y install libxcursor-dev libxinerama-dev libasound2-dev
|
|
|
|
- apt -y install libpango1.0-dev libcairo2-dev
|
2020-07-01 19:03:10 +03:00
|
|
|
script:
|
2018-06-22 19:31:30 +03:00
|
|
|
- make clean
|
|
|
|
- ./configure --enable-pango --enable-cairo
|
|
|
|
- time make -j3
|
|
|
|
- cd examples && time make
|
|
|
|
|
2020-09-07 13:09:55 +03:00
|
|
|
# Build with CMake and Ninja (with pango, cairo, building examples)
|
2018-06-22 19:31:30 +03:00
|
|
|
|
|
|
|
build-cmake:
|
|
|
|
stage: build
|
2020-09-07 16:00:38 +03:00
|
|
|
only:
|
|
|
|
- master
|
2018-06-22 19:31:30 +03:00
|
|
|
# install the necessary build tools
|
|
|
|
before_script:
|
2020-09-07 16:00:38 +03:00
|
|
|
- date
|
2018-06-22 19:31:30 +03:00
|
|
|
- apt update && apt -y install cmake ninja-build
|
2020-08-21 20:56:51 +03:00
|
|
|
- apt -y install freeglut3-dev libfontconfig-dev libxft-dev libglew-dev
|
2018-06-22 19:31:30 +03:00
|
|
|
- apt -y install libxcursor-dev libxinerama-dev libasound2-dev
|
2020-09-07 13:09:55 +03:00
|
|
|
- apt -y install libpango1.0-dev libcairo2-dev
|
2018-06-22 19:31:30 +03:00
|
|
|
script:
|
2020-09-07 16:00:38 +03:00
|
|
|
- date
|
|
|
|
- gcc --version
|
2018-06-22 19:31:30 +03:00
|
|
|
- mkdir build && cd build
|
2024-02-07 20:30:11 +03:00
|
|
|
- cmake -G Ninja -D CMAKE_BUILD_TYPE=Debug -D FLTK_BUILD_EXAMPLES=ON -D FLTK_USE_PANGO=ON -D FLTK_OPTION_CAIRO_WINDOW=ON ..
|
2020-09-07 16:00:38 +03:00
|
|
|
- date
|
2018-06-22 19:31:30 +03:00
|
|
|
- time ninja
|
2020-09-07 16:00:38 +03:00
|
|
|
- date
|
2018-06-22 19:31:30 +03:00
|
|
|
|
|
|
|
# Generate and install HTML documentation
|
|
|
|
|
|
|
|
pages:
|
|
|
|
stage: deploy
|
2020-09-07 16:00:38 +03:00
|
|
|
only:
|
|
|
|
- master
|
|
|
|
# run this job (documentation) independent of the build jobs (empty "needs" clause)
|
|
|
|
needs: []
|
2018-06-22 19:31:30 +03:00
|
|
|
# install the necessary build tools
|
|
|
|
before_script:
|
2020-09-07 16:00:38 +03:00
|
|
|
- date
|
2022-08-09 22:41:31 +03:00
|
|
|
- apt update && apt -y install make autoconf man doxygen doxygen-latex
|
2018-06-22 19:31:30 +03:00
|
|
|
script:
|
2020-09-07 16:00:38 +03:00
|
|
|
- date
|
2018-06-22 19:31:30 +03:00
|
|
|
- make clean
|
|
|
|
- cd documentation
|
2020-09-07 16:00:38 +03:00
|
|
|
- date
|
2018-06-22 19:31:30 +03:00
|
|
|
- make && make html
|
2020-09-07 16:00:38 +03:00
|
|
|
- date
|
2022-08-09 22:41:31 +03:00
|
|
|
- make pdf
|
|
|
|
- date
|
2018-06-22 19:31:30 +03:00
|
|
|
- cd ..
|
|
|
|
- mkdir -p public/
|
|
|
|
- mv documentation/html/* public/
|
2022-08-09 22:41:31 +03:00
|
|
|
- mv documentation/fltk.pdf public/
|
2020-09-07 16:00:38 +03:00
|
|
|
- date
|
2018-06-22 19:31:30 +03:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- public
|
2022-08-17 16:28:35 +03:00
|
|
|
expire_in: 8 days
|