Skip to content
Snippets Groups Projects
.gitlab-ci.yml 17.78 KiB
################################################################################
### STAGES

stages:
  - prepare
  - build
  - tests
  - distrib
  - compatibility
  - release
  - publish

################################################################################
### DEFAULT JOB PARAMETERS

default:
  interruptible: true
  tags: [ nix-v2 ]

################################################################################
### VARIABLES

variables:
  DEFAULT: "master"
  OCAML: "4.14"
  NODE: "22"
  PUBLISH: "no"
  RELEASE: "no"

################################################################################
### ONLY/EXCEPT TEMPLATES

.build_template: &manual_when_not_special_pipeline
  except:
    refs:
      - schedules
    variables:
      - $RELEASE == "yes"
  when: manual

.build_template: &when_release
  only:
    variables:
      - $RELEASE == "yes"

.build_template: &when_schedules
  only:
    refs:
      - schedules

.build_template: &when_publish
  only:
    variables:
      - $PUBLISH == "yes"

################################################################################
### IVETTE SETUP TEMPLATE

.build_template: &ivette_setup
  image: "ocaml/opam:ubuntu-lts-ocaml-$OCAML"
  before_script:
    # Prepare
    - sudo apt update
    # TS
    - sudo apt install -y xvfb curl unzip libnss3 libasound2-plugins
    - sudo curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
    - export NVM_DIR="$HOME/.nvm"
    - . "$NVM_DIR/nvm.sh"
    - nvm install $NODE
    - nvm use node $NODE