From 1690585b49f0e047627f04f2c7ffc4a077254f39 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Fri, 22 Jun 2018 16:31:30 +0000 Subject: [PATCH] Activate GitLab CI and GitLab Pages (HTML docs). The GitLab CI control file enables continuous builds after every commit and generates the (doxygen) HTML documentation. The documentation is put online on GitLab pages at: https://fltk.gitlab.io/fltk/ git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12964 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- .gitlab-ci.yml | 112 +++++++++++++++++++++++++++++++++++++++++++++++ public/README.md | 7 +++ 2 files changed, 119 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 public/README.md diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..0ed182db8 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,112 @@ +# 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 at: +# +# https://fltk.gitlab.io/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 + - test + - deploy + +# Build with autoconf/make (including Pango and Cairo) + +build-autotools: + stage: build + # install the necessary build tools + before_script: + - apt update && apt -y install make autoconf man + - apt -y install freeglut3-dev libfontconfig-dev libxft-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 + - examples/fltk-versions + +# Build with CMake and Ninja (Default configuration) + +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 + - apt -y install libxcursor-dev libxinerama-dev libasound2-dev + script: + - mkdir build && cd build + - cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja .. + - time ninja + artifacts: + paths: + - build/lib/ + - build/bin/ + +# Build HTML documentation + +documentation: + stage: build + only: + - schedules + # install the necessary build tools + before_script: + - apt update && apt -y install make autoconf man doxygen + script: + - make clean + - cd documentation && make && make html + artifacts: + paths: + - documentation/src/*.[1-6] + - documentation/html + + # depending on your build setup it's most likely a good idea to + # cache outputs to reduce the build time + # cache: + # paths: + # - "*.o" + +# run tests using the binary built before +#test: +# stage: test +# script: +# - ./runmytests.sh + + +# 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 diff --git a/public/README.md b/public/README.md new file mode 100644 index 000000000..f9af29ba0 --- /dev/null +++ b/public/README.md @@ -0,0 +1,7 @@ +# Public Documentation Directory + +File: public/README.md + +You should never see this file unless explicitly requested by URL. + +This is a placeholder for GitLab Pages.