<commit_before>image: ocaml/opam:ubuntu

# this doesn't seem to work
cache:
  paths:
    - .opamcache

stages:
  - build
  - test

variables:
  # some default values
  NJOBS: "2"
  COMPILER: "system"
  CAMLP5_VER: "6.14"

  # some useful values
  COMPILER_32BIT: "4.02.3+32bit"

  COMPILER_BLEEDING_EDGE: "4.05.0"
  CAMLP5_VER_BLEEDING_EDGE: "7.01"

  TIMING_PACKAGES: "time python"

  COQIDE_PACKAGES: "libgtk2.0-dev libgtksourceview2.0-dev"
  #COQIDE_PACKAGES_32BIT: "libgtk2.0-dev:i386 libgtksourceview2.0-dev:i386"
  COQIDE_OPAM: "lablgtk-extras"
  COQDOC_PACKAGES: "texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-math-extra texlive-fonts-recommended texlive-fonts-extra latex-xcolor ghostscript transfig imagemagick tipa"
  COQDOC_OPAM: "hevea"


before_script:
  - ls # figure out if artifacts are around
  - printenv
#  - if [ "$COMPILER" = "$COMPILER_32BIT" ]; then sudo dpkg --add-architecture i386; fi
  - if [ -n "${EXTRA_PACKAGES}" ]; then sudo apt-get update -qq && sudo apt-get install -y -qq ${EXTRA_PACKAGES}; fi

  # setup cache
  - if [ ! "(" -d .opamcache ")" ]; then mv ~/.opam .opamcache; else mv ~/.opam ~/.opam-old; fi
  - ln -s $(readlink -f .opamcache) ~/.opam

  # the default repo in this docker image is a local directory
  # at the time of 4aaeb8abf it lagged behind the official
  # repository such that camlp5 7.01 was not available
  - opam repository set-url default https://opam.ocaml.org
  - opam update
  - opam switch ${COMPILER}
  - eval $(opam config env)
  - opam config list
  - opam install -j ${NJOBS} -y camlp5.${CAMLP5_VER} ocamlfind ${EXTRA_OPAM}
  - rm -rf ~/.opam/log/
  - opam list

# TODO figure out how to build doc for installed coq
.build-template: &build-template
  stage: build
  artifacts:
    name: "$CI_JOB_NAME"
    paths:
      - _install_ci
      - config/Makefile
    expire_in: 1 week
  script:
    - set -e

    - echo 'start:coq.config'
    - ./configure -prefix "$(pwd)/_install_ci" ${EXTRA_CONF}
    - echo 'end:coq.config'

    - echo 'start:coq.build'
    - make -j ${NJOBS}
    - echo 'end:coq:build'

    - echo 'start:coq.install'
    - make install
    - cp bin/fake_ide _install_ci/bin/
    - echo 'end:coq.install'

    - set +e
  variables: &build-variables
    EXTRA_CONF: "-native-compiler yes -coqide opt"
    EXTRA_PACKAGES: "$COQIDE_PACKAGES"
    EXTRA_OPAM: "$COQIDE_OPAM"

.warnings-template: &warnings-template
  # keep warnings in test stage so we can test things even when warnings occur
  stage: test
  dependencies: []
  script:
    - set -e

    - echo 'start:coq.config'
    - ./configure -local ${EXTRA_CONF}
    - echo 'end:coq.config'

    - echo 'start:coq.build'
    - make -j ${NJOBS} coqocaml<commit_msg>GitLab CI: make all_stdlib.v in build job<commit_after>image: ocaml/opam:ubuntu

# this doesn't seem to work
cache:
  paths:
    - .opamcache

stages:
  - build
  - test

variables:
  # some default values
  NJOBS: "2"
  COMPILER: "system"
  CAMLP5_VER: "6.14"

  # some useful values
  COMPILER_32BIT: "4.02.3+32bit"

  COMPILER_BLEEDING_EDGE: "4.05.0"
  CAMLP5_VER_BLEEDING_EDGE: "7.01"

  TIMING_PACKAGES: "time python"

  COQIDE_PACKAGES: "libgtk2.0-dev libgtksourceview2.0-dev"
  #COQIDE_PACKAGES_32BIT: "libgtk2.0-dev:i386 libgtksourceview2.0-dev:i386"
  COQIDE_OPAM: "lablgtk-extras"
  COQDOC_PACKAGES: "texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-math-extra texlive-fonts-recommended texlive-fonts-extra latex-xcolor ghostscript transfig imagemagick tipa"
  COQDOC_OPAM: "hevea"


before_script:
  - ls # figure out if artifacts are around
  - printenv
#  - if [ "$COMPILER" = "$COMPILER_32BIT" ]; then sudo dpkg --add-architecture i386; fi
  - if [ -n "${EXTRA_PACKAGES}" ]; then sudo apt-get update -qq && sudo apt-get install -y -qq ${EXTRA_PACKAGES}; fi

  # setup cache
  - if [ ! "(" -d .opamcache ")" ]; then mv ~/.opam .opamcache; else mv ~/.opam ~/.opam-old; fi
  - ln -s $(readlink -f .opamcache) ~/.opam

  # the default repo in this docker image is a local directory
  # at the time of 4aaeb8abf it lagged behind the official
  # repository such that camlp5 7.01 was not available
  - opam repository set-url default https://opam.ocaml.org
  - opam update
  - opam switch ${COMPILER}
  - eval $(opam config env)
  - opam config list
  - opam install -j ${NJOBS} -y camlp5.${CAMLP5_VER} ocamlfind ${EXTRA_OPAM}
  - rm -rf ~/.opam/log/
  - opam list

# TODO figure out how to build doc for installed coq
.build-template: &build-template
  stage: build
  artifacts:
    name: "$CI_JOB_NAME"
    paths:
      - _install_ci
      - config/Makefile
      - test-suite/misc/universes/all_stdlib.v
    expire_in: 1 week
  script:
    - set -e

    - echo 'start:coq.config'
    - ./configure -prefix "$(pwd)/_install_ci" ${EXTRA_CONF}
    - echo 'end:coq.config'

    - echo 'start:coq.build'
    - make -j ${NJOBS}
    - make test-suite/misc/universes/all_stdlib.v
    - echo 'end:coq:build'

    - echo 'start:coq.install'
    - make install
    - cp bin/fake_ide _install_ci/bin/
    - echo 'end:coq.install'

    - set +e
  variables: &build-variables
    EXTRA_CONF: "-native-compiler yes -coqide opt"
    EXTRA_PACKAGES: "$COQIDE_PACKAGES"
    EXTRA_OPAM: "$COQIDE_OPAM"

.warnings-template: &warnings-template
  # keep warnings in test stage so we can test things even when warnings occur
  stage: test
  dependencies: []
  script:
    - set -e

    - echo 'start:coq.config'
    - ./configure -local ${EXTRA_CONF}
    - echo 'end:coq.config'

    - echo 'start:coq.build'
    - make -j ${NJOBS} coqocaml
{'fraction_non_alphanumeric': 0.12367807850869332, 'fraction_numerical': 0.01828284638824162, 'mean_word_length': 3.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5060669', 'n_tokens_mistral': 2286, 'n_tokens_neox': 2139, 'n_words': 542}