Skip to content
Snippets Groups Projects
.gitlab-ci.yml 1.7 KiB
Newer Older
variables:
    GIT_SSL_NO_VERIFY: "true"
    GIT_SUBMODULE_STRATEGY: "recursive"
    GIT_DEPTH: "3"

Guilhem Saurel's avatar
Guilhem Saurel committed
stages:
Guilhem Saurel's avatar
Guilhem Saurel committed
  - pages
Guilhem Saurel's avatar
Guilhem Saurel committed
  - minimal
  - full

cache:
  paths:
    - build/ccache

.build_template: &build
    script:
Guilhem Saurel's avatar
Guilhem Saurel committed
        - mkdir -p build/ccache
Guilhem Saurel's avatar
Guilhem Saurel committed
        - export CCACHE_BASEDIR=${PWD}
        - export CCACHE_DIR=${PWD}/ccache
        - cmake .. -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
        - make
        - make test
        - make install

build_minimal_14:
    <<: *build
    image: ${CI_REGISTRY_IMAGE}/minimal:14.04
Guilhem Saurel's avatar
Guilhem Saurel committed
    stage: minimal
Guilhem Saurel's avatar
Guilhem Saurel committed
    retry: 2
    except:
      - gh-pages
    image: ${CI_REGISTRY_IMAGE}/full:14.04
Guilhem Saurel's avatar
Guilhem Saurel committed
    stage: full
Guilhem Saurel's avatar
Guilhem Saurel committed
    retry: 2
    except:
      - gh-pages
Guilhem Saurel's avatar
Guilhem Saurel committed
    dependencies:
      - build_minimal_14

build_minimal_16:
    <<: *build
    image: ${CI_REGISTRY_IMAGE}/minimal:16.04
Guilhem Saurel's avatar
Guilhem Saurel committed
    stage: minimal
Guilhem Saurel's avatar
Guilhem Saurel committed
    retry: 2
    except:
      - gh-pages
    image: ${CI_REGISTRY_IMAGE}/full:16.04
Guilhem Saurel's avatar
Guilhem Saurel committed
    stage: full
Guilhem Saurel's avatar
Guilhem Saurel committed
    retry: 2
    except:
      - gh-pages
Guilhem Saurel's avatar
Guilhem Saurel committed
    dependencies:
      - build_minimal_16
Guilhem Saurel's avatar
Guilhem Saurel committed

build_minimal_zesty:
    <<: *build
    image: ${CI_REGISTRY_IMAGE}/minimal:zesty
Guilhem Saurel's avatar
Guilhem Saurel committed
    stage: minimal
Guilhem Saurel's avatar
Guilhem Saurel committed
    retry: 2
    except:
      - gh-pages
Guilhem Saurel's avatar
Guilhem Saurel committed
    allow_failure: true
Guilhem Saurel's avatar
Guilhem Saurel committed

build_full_zesty:
    <<: *build
    image: ${CI_REGISTRY_IMAGE}/full:zesty
Guilhem Saurel's avatar
Guilhem Saurel committed
    stage: full
Guilhem Saurel's avatar
Guilhem Saurel committed
    retry: 2
    except:
      - gh-pages
Guilhem Saurel's avatar
Guilhem Saurel committed
    dependencies:
      - build_minimal_zesty
    allow_failure: true
Guilhem Saurel's avatar
Guilhem Saurel committed

pages:
  image: ruby:2.3
  stage: pages
  retry: 2
  variables:
    JEKYLL_ENV: production
  before_script:
    - gem install jekyll-sitemap
  script:
    - jekyll build -d public
  artifacts:
    paths:
      - public
  only:
    - gh-pages