<commit_before># Copyright (c) 2016-2017 <NAME>. All Rights Reserved.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

variables:
  GIT_DEPTH: "3"

cache:
  key: $CI_PROJECT_PATH
  paths:
    - c_src/re2
    - deps
    - .rebar/re2_*_plt

.build_job_template: &build_job_definition
  stage: build
  script:
    - rebar -V
    # Even though the tree is clean, we call this here to make sure
    # the cached re2 upstream clone is clean as well.
    - make clean
    - make all doc
    - RE2_TEST_DEPS=1 rebar prepare-deps
    - rebar check-plt || rebar -vv build-plt
    - rebar -vv dialyze
    - rm .rebar/erlcinfo

.artifact_paths_template: &artifact_paths_defitinion
  paths:
    - ebin
    - doc
    - priv

default-build:
  <<: *build_job_definition
  image: erlang:17
  artifacts:
    name: "$CI_PROJECT_NAME-ci-${CI_BUILD_REF_NAME}"
    <<: *artifact_paths_defitinion
    # Temporary artifacts for non-release builds are removed after a week
    # because they are just for use in test jobs.
    expire_in: 1 week

release:
  <<: *build_job_definition
  image: erlang:17
  artifacts:
    name: "$CI_PROJECT_NAME-${CI_BUILD_REF_NAME}"
    <<: *artifact_paths_defitinion
  only:
    - tags

.test_job_template: &test_job_definition
  stage: test
  script:
    - RE2_TEST_DEPS=1 rebar eunit
  dependencies:
    - default-build

test:17:
  <<: *test_job_definition
  image: erlang:17

test:18:
  <<: *test_job_definition
  image: erlang:18

test:19:
  <<: *test_job_definition
  image: erlang:19

test:20:
  <<: *test_job_definition
  image: erlang:20<commit_msg>gitlab-ci: dialyze in a separate job<commit_after># Copyright (c) 2016-2017 <NAME>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

variables:
  GIT_DEPTH: "3"

cache:
  key: $CI_PROJECT_PATH
  paths:
    - c_src/re2
    - deps
    - .rebar/re2_*_plt

.build_job_template: &build_job_definition
  stage: build
  script:
    - rebar -V
    # Even though the tree is clean, we call this here to make sure
    # the cached re2 upstream clone is clean as well.
    - make clean
    - make all doc
    - RE2_TEST_DEPS=1 rebar prepare-deps
    - rm .rebar/erlcinfo

.artifact_paths_template: &artifact_paths_defitinion
  paths:
    - ebin
    - doc
    - priv

default-build:
  <<: *build_job_definition
  image: erlang:17
  artifacts:
    name: "$CI_PROJECT_NAME-ci-${CI_BUILD_REF_NAME}"
    <<: *artifact_paths_defitinion
    # Temporary artifacts for non-release builds are removed after a month
    # because they are just for use in test jobs.
    expire_in: 1 month

release:
  <<: *build_job_definition
  image: erlang:17
  artifacts:
    name: "$CI_PROJECT_NAME-${CI_BUILD_REF_NAME}"
    <<: *artifact_paths_defitinion
  only:
    - tags

.test_job_template: &test_job_definition
  stage: test
  script:
    - RE2_TEST_DEPS=1 rebar eunit
  dependencies:
    - default-build

test:17:
  <<: *test_job_definition
  image: erlang:17

test:18:
  <<: *test_job_definition
  image: erlang:18

test:19:
  <<: *test_job_definition
  image: erlang:19

test:20:
  <<: *test_job_definition
  image: erlang:20

test:dialyze:
  stage: test
  image: erlang:20
  dependencies:
    - default-build
  script:
    - rebar check-plt || rebar -vv build-plt
    - rebar -vv dialyze
{'fraction_non_alphanumeric': 0.08072631809232116, 'fraction_numerical': 0.016626558739881864, 'mean_word_length': 3.5267326732673268, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '1013036', 'n_tokens_mistral': 1601, 'n_tokens_neox': 1494, 'n_words': 505}