<commit_before>variables:
  OMP_NUM_THREADS: "1"


before_script:
  - apt-get update -qq && apt-get install -y -qq
  - apt-get install -y -qq make git
  - apt-get install -y -qq libfftw3-dev libblas-dev libpng-dev
  - apt-get install -y -qq gcc liblapacke-dev

stages:
  - build
  - test1
  - test2

Build:
  image: debian:stable
  stage: build
  script:
    - make all
  artifacts:
    paths:
      - bart
      - ./lib/
    expire_in: 45 minutes


Build_Clang:
  image: debian:stable
  stage: build
  script:
    - apt-get install -y clang-11 libblocksruntime-dev
    - CC=clang-11 OMP=0 make all
  artifacts:
    paths:
      - bart
      - ./lib/
    expire_in: 45 minutes


Build_Static:
  image: debian:stable
  stage: build
  script:
    - apt-get install -y libgfortran-10-dev
    - SLINK=1 make
  artifacts:
    paths:
      - bart
    expire_in: 45 minutes


Build_UBSan:
  image: debian:testing
  stage: build
  script:
    - UBSAN=1 ASAN=1 make all
  artifacts:
    paths:
      - bart
      - ./lib/
    expire_in: 45 minutes


Build_GPU:
  image: nvidia/cuda:10.2-devel-ubuntu18.04
  stage: build
  script:
    - CUDA=1 CUDA_BASE=/usr/local/cuda CUDA_LIB=lib64 make all
  artifacts:
    paths:
      - bart
      - ./lib/
    expire_in: 45 minutes


Build_LTO:
  image: debian:stable
  stage: build
  script:
    - CFLAGS="-flto -O2 -g" make
  artifacts:
    paths:
      - bart
    expire_in: 45 minutes



Build_Tensorflow:
  image: nvidia/cuda:10.2-devel-ubuntu18.04
  stage: build
  script:
    - apt-get install -y wget
    - wget https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-2.4.0.tar.gz
    - mkdir tensorflow && tar -C tensorflow -xvzf libtensorflow-gpu-linux-x86_64-2.4.0.tar.gz
    - TENSORFLOW=1 TENSORFLOW_BASE=./tensorflow/ CUDA=1 CUDA_BASE=/usr/local/cuda CUDA_LIB=lib64 make
  artifacts:
    paths:
      - bart
      - ./lib/
    expire_in: 45 minutes


Unit_Test:
  image: debian:stable
  stage: test1
  script:
    - AUTOCLEAN=0 make utest
  needs: [Build]
  dependencies:
     - Build


Unit_Test_Clang:
  image: debian:stable
  stage: test1
  script:
    - apt-get install -y clang-11 libblocksruntime-dev
    - AUTOCLEAN=0 CC=clang-11 OMP=0 make utest
  needs: [Build_Clang]
  dependencies:
     - Build_Clang


Unit_Test_Valgrind:
  image: debian:stable
  stage: test1
  script:
    - apt-get install -y valgrind
    - AUTOCLEAN=0 UTESTLEAK=1 make utest
  needs: [Build]
  dependencies:
     - Build


Unit_Test_UBSan:
  image: debian:testing
  stage: test1
  script:
    - AUTOCLEAN=0 UBSAN=1 ASAN=1 make utest
  needs: [Build_UBSan]
  dependencies:
     - Build_UBSan


Unit_Test_GPU:
  image: nvidia/cuda:10.2-devel-ubuntu18.04
  stage: test1
  script: |
    if nvidia-smi ; then
      AUTOCLEAN=0 CUDA=1 CUDA_BASE=/usr/local/cuda CUDA_LIB=lib64 make utest_gpu
    else
      printf "No usable GPU found, skipping GPU tests!\n"
    fi
  needs: [Build_GPU]
  dependencies:
    - Build_GPU


Unit_Test_Tensorflow:
  image: nvidia/cuda:10.2-devel-ubuntu18.04
  stage: test1
  script:
    - apt-get install -y wget
    - wget https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-2.4.0.tar.gz
    - mkdir tensorflow && tar -C tensorflow -xvzf libtensorflow-gpu-linux-x86_64-2.4.0.tar.gz
    - TENSORFLOW=1 TENSORFLOW_BASE=./tensorflow/ CUDA=1 CUDA_BASE=/usr/local/cuda CUDA_LIB=lib64 make utest
  needs: [Build_Tensorflow]
  dependencies:
    - Build_Tensorflow


Unit_Test_LTO:
  image: debian:stable
  stage: test1
  script:
    - CFLAGS="-flto -O2 -g" make test
  needs: [Build_LTO]
  dependencies:
    - Build_LTO
<commit_msg>.gitlab-ci: Unit Test LTO should run unit tests<commit_after>variables:
  OMP_NUM_THREADS: "1"


before_script:
  - apt-get update -qq && apt-get install -y -qq
  - apt-get install -y -qq make git
  - apt-get install -y -qq libfftw3-dev libblas-dev libpng-dev
  - apt-get install -y -qq gcc liblapacke-dev

stages:
  - build
  - test1
  - test2

Build:
  image: debian:stable
  stage: build
  script:
    - make all
  artifacts:
    paths:
      - bart
      - ./lib/
    expire_in: 45 minutes


Build_Clang:
  image: debian:stable
  stage: build
  script:
    - apt-get install -y clang-11 libblocksruntime-dev
    - CC=clang-11 OMP=0 make all
  artifacts:
    paths:
      - bart
      - ./lib/
    expire_in: 45 minutes


Build_Static:
  image: debian:stable
  stage: build
  script:
    - apt-get install -y libgfortran-10-dev
    - SLINK=1 make
  artifacts:
    paths:
      - bart
    expire_in: 45 minutes


Build_UBSan:
  image: debian:testing
  stage: build
  script:
    - UBSAN=1 ASAN=1 make all
  artifacts:
    paths:
      - bart
      - ./lib/
    expire_in: 45 minutes


Build_GPU:
  image: nvidia/cuda:10.2-devel-ubuntu18.04
  stage: build
  script:
    - CUDA=1 CUDA_BASE=/usr/local/cuda CUDA_LIB=lib64 make all
  artifacts:
    paths:
      - bart
      - ./lib/
    expire_in: 45 minutes


Build_LTO:
  image: debian:stable
  stage: build
  script:
    - CFLAGS="-flto -O2 -g" make
  artifacts:
    paths:
      - bart
    expire_in: 45 minutes



Build_Tensorflow:
  image: nvidia/cuda:10.2-devel-ubuntu18.04
  stage: build
  script:
    - apt-get install -y wget
    - wget https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-2.4.0.tar.gz
    - mkdir tensorflow && tar -C tensorflow -xvzf libtensorflow-gpu-linux-x86_64-2.4.0.tar.gz
    - TENSORFLOW=1 TENSORFLOW_BASE=./tensorflow/ CUDA=1 CUDA_BASE=/usr/local/cuda CUDA_LIB=lib64 make
  artifacts:
    paths:
      - bart
      - ./lib/
    expire_in: 45 minutes


Unit_Test:
  image: debian:stable
  stage: test1
  script:
    - AUTOCLEAN=0 make utest
  needs: [Build]
  dependencies:
     - Build


Unit_Test_Clang:
  image: debian:stable
  stage: test1
  script:
    - apt-get install -y clang-11 libblocksruntime-dev
    - AUTOCLEAN=0 CC=clang-11 OMP=0 make utest
  needs: [Build_Clang]
  dependencies:
     - Build_Clang


Unit_Test_Valgrind:
  image: debian:stable
  stage: test1
  script:
    - apt-get install -y valgrind
    - AUTOCLEAN=0 UTESTLEAK=1 make utest
  needs: [Build]
  dependencies:
     - Build


Unit_Test_UBSan:
  image: debian:testing
  stage: test1
  script:
    - AUTOCLEAN=0 UBSAN=1 ASAN=1 make utest
  needs: [Build_UBSan]
  dependencies:
     - Build_UBSan


Unit_Test_GPU:
  image: nvidia/cuda:10.2-devel-ubuntu18.04
  stage: test1
  script: |
    if nvidia-smi ; then
      AUTOCLEAN=0 CUDA=1 CUDA_BASE=/usr/local/cuda CUDA_LIB=lib64 make utest_gpu
    else
      printf "No usable GPU found, skipping GPU tests!\n"
    fi
  needs: [Build_GPU]
  dependencies:
    - Build_GPU


Unit_Test_Tensorflow:
  image: nvidia/cuda:10.2-devel-ubuntu18.04
  stage: test1
  script:
    - apt-get install -y wget
    - wget https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-2.4.0.tar.gz
    - mkdir tensorflow && tar -C tensorflow -xvzf libtensorflow-gpu-linux-x86_64-2.4.0.tar.gz
    - TENSORFLOW=1 TENSORFLOW_BASE=./tensorflow/ CUDA=1 CUDA_BASE=/usr/local/cuda CUDA_LIB=lib64 make utest
  needs: [Build_Tensorflow]
  dependencies:
    - Build_Tensorflow


Unit_Test_LTO:
  image: debian:stable
  stage: test1
  script:
    - CFLAGS="-flto -O2 -g" make utest
  needs: [Build_LTO]
  dependencies:
    - Build_LTO

{'fraction_non_alphanumeric': 0.10348598769651401, 'fraction_numerical': 0.032809295967190705, 'mean_word_length': 2.593320235756385, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '7078638', 'n_tokens_mistral': 3052, 'n_tokens_neox': 2833, 'n_words': 631}