<commit_before>language: C

branches:
  except:
    - master

notifications:
  irc:
    channels:
      - "ircs://chat.freenode.net:6697/#libxcrypt"
    skip_join: true

sudo: true

matrix:
  fast_finish: true
  include:
    - compiler: gcc
      os: linux
      services: docker
      env:
        - CONF="--enable-obsolete-api --enable-weak-hashes"
        - FCVER="rawhide"
        - CODECOV=1
    - compiler: gcc
      os: linux
      services: docker
      env:
        - CONF="--enable-obsolete-api --enable-weak-hashes"
        - FCVER="rawhide"
    - compiler: clang
      os: linux
      services: docker
      env:
        - CONF="--enable-obsolete-api --enable-weak-hashes"
        - FCVER="rawhide"
    - compiler: gcc
      os: linux
      services: docker
      env:
        - CONF="--enable-obsolete-api --enable-weak-hashes"
        - FCVER="latest"
    - compiler: clang
      os: linux
      services: docker
      env:
        - CONF="--enable-obsolete-api --enable-weak-hashes"
        - FCVER="latest"
    - compiler: gcc
      os: linux
      services: docker
      env:
        - CONF="--disable-obsolete-api --enable-weak-hashes"
        - FCVER="rawhide"
    - compiler: clang
      os: linux
      services: docker
      env:
        - CONF="--disable-obsolete-api --enable-weak-hashes"
        - FCVER="rawhide"
    - compiler: gcc
      os: linux
      services: docker
      env:
        - CONF="--disable-obsolete-api --enable-weak-hashes"
        - FCVER="latest"
    - compiler: clang
      os: linux
      services: docker
      env:
        - CONF="--disable-obsolete-api --enable-weak-hashes"
        - FCVER="latest"
    - compiler: gcc
      os: linux
      services: docker
      env:
        - CONF="--disable-obsolete-api --disable-weak-hashes"
        - FCVER="rawhide"
    - compiler: clang
      os: linux
      services: docker
      env:
        - CONF="--disable-obsolete-api --disable-weak-hashes"
        - FCVER="rawhide"
    - compiler: gcc
      os: linux
      services: docker
      env:
        - CONF="--disable-obsolete-api --disable-weak-hashes"
        - FCVER="latest"
    - compiler: clang
      os: linux
      services: docker
      env:
        - CONF="--disable-obsolete-api --disable-weak-hashes"
        - FCVER="latest"

before_install:
  - docker pull fedora:$FCVER
  - perl -pe 's/\$(\w+)/$ENV{$1}/g' .travis.env.in > travis.env
  - docker run -t -d -P --env-file travis.env --name buildenv -v $HOME/.ccache:/root/.ccache -v $PWD:/opt/libxcrypt fedora:$FCVER /bin/sh -c "mkdir -p /opt/libxcrypt ; bash"
  - docker exec -t buildenv /bin/sh -c "echo \"deltarpm=0\" >> /etc/dnf/dnf.conf"
  - docker exec -t buildenv /bin/sh -c "echo \"max_parallel_downloads=20\" >> /etc/dnf/dnf.conf"
  - docker exec -t buildenv /bin/sh -c "echo \"\" >> /etc/dnf/dnf.conf"
  - if [[ "$FCVER" == "rawhide" ]] ; then docker exec -t buildenv /bin/sh -c "cat /opt/libxcrypt/.travis.dnf.conf.rawhide_latest >> /etc/dnf/dnf.conf" ; fi
  - docker exec -t buildenv /bin/sh -c "dnf makecache"
  - docker exec -t buildenv /bin/sh -c "dnf -y upgrade"
  - docker exec -t buildenv /bin/sh -c "dnf -y --setopt=install_weak_deps=0 groups install buildsys-build"
  - docker exec -t buildenv /bin/sh -c "dnf -y --setopt=install_weak_deps=0 install libtool"
  - if [[ "$CC" == "clang" ]]  ; then docker exec -t buildenv /bin/sh -c "dnf -y --setopt=install_weak_deps=0 install clang" ; fi
  - if [[ "$CODECOV" == "1" ]] ; then docker exec -t buildenv /bin/sh -c "dnf -y --setopt=install_weak_deps=0 install '/usr/bin/git' '/usr/bin/lcov' '/usr/bin/pip3'" ; fi
  - if [[ "$CODECOV" == "1" ]] ; then docker exec -t buildenv /bin/sh -c "pip3 install codecov" ; fi

before_script:
  - docker exec -t buildenv /bin/sh -c "rpm -E %optflags" > cflags.txt
  - docker exec -t buildenv /bin/sh -c "rpm -E %__global_ldflags" > ldflags.txt

script:
  - export CFLAGS="`cat cflags.txt | tr -d '\012\015'` -Wno-unused-command-line-argument" ; export CXXFLAGS="$CFLAGS" ; echo $CFLAGS
  - export LDFLAGS="`cat ldflags.txt | tr -d '\012\015'`" ; echo $LDFLAGS
  - if [[ "$CODECOV" == "1" ]] ; then export CFLAGS="-O0 -g --coverage" ; export CXXFLAGS="$CFLAGS" ; export LDFLAGS="--coverage" ; fi
  - docker exec -t buildenv /bin/sh -c "cat /etc/redhat-release"
  - docker exec -t buildenv /bin/sh -c "cd /opt/libxcrypt && autoreconf -fiv"<commit_msg>Travis: Set install_weak_deps as global option<commit_after>language: C

branches:
  except:
    - master

notifications:
  irc:
    channels:
      - "ircs://chat.freenode.net:6697/#libxcrypt"
    skip_join: true

sudo: true

matrix:
  fast_finish: true
  include:
    - compiler: gcc
      os: linux
      services: docker
      env:
        - CONF="--enable-obsolete-api --enable-weak-hashes"
        - FCVER="rawhide"
        - CODECOV=1
    - compiler: gcc
      os: linux
      services: docker
      env:
        - CONF="--enable-obsolete-api --enable-weak-hashes"
        - FCVER="rawhide"
    - compiler: clang
      os: linux
      services: docker
      env:
        - CONF="--enable-obsolete-api --enable-weak-hashes"
        - FCVER="rawhide"
    - compiler: gcc
      os: linux
      services: docker
      env:
        - CONF="--enable-obsolete-api --enable-weak-hashes"
        - FCVER="latest"
    - compiler: clang
      os: linux
      services: docker
      env:
        - CONF="--enable-obsolete-api --enable-weak-hashes"
        - FCVER="latest"
    - compiler: gcc
      os: linux
      services: docker
      env:
        - CONF="--disable-obsolete-api --enable-weak-hashes"
        - FCVER="rawhide"
    - compiler: clang
      os: linux
      services: docker
      env:
        - CONF="--disable-obsolete-api --enable-weak-hashes"
        - FCVER="rawhide"
    - compiler: gcc
      os: linux
      services: docker
      env:
        - CONF="--disable-obsolete-api --enable-weak-hashes"
        - FCVER="latest"
    - compiler: clang
      os: linux
      services: docker
      env:
        - CONF="--disable-obsolete-api --enable-weak-hashes"
        - FCVER="latest"
    - compiler: gcc
      os: linux
      services: docker
      env:
        - CONF="--disable-obsolete-api --disable-weak-hashes"
        - FCVER="rawhide"
    - compiler: clang
      os: linux
      services: docker
      env:
        - CONF="--disable-obsolete-api --disable-weak-hashes"
        - FCVER="rawhide"
    - compiler: gcc
      os: linux
      services: docker
      env:
        - CONF="--disable-obsolete-api --disable-weak-hashes"
        - FCVER="latest"
    - compiler: clang
      os: linux
      services: docker
      env:
        - CONF="--disable-obsolete-api --disable-weak-hashes"
        - FCVER="latest"

before_install:
  - docker pull fedora:$FCVER
  - perl -pe 's/\$(\w+)/$ENV{$1}/g' .travis.env.in > travis.env
  - docker run -t -d -P --env-file travis.env --name buildenv -v $HOME/.ccache:/root/.ccache -v $PWD:/opt/libxcrypt fedora:$FCVER /bin/sh -c "mkdir -p /opt/libxcrypt ; bash"
  - docker exec -t buildenv /bin/sh -c "echo \"deltarpm=0\" >> /etc/dnf/dnf.conf"
  - docker exec -t buildenv /bin/sh -c "echo \"install_weak_deps=0\" >> /etc/dnf/dnf.conf"
  - docker exec -t buildenv /bin/sh -c "echo \"max_parallel_downloads=20\" >> /etc/dnf/dnf.conf"
  - docker exec -t buildenv /bin/sh -c "echo \"\" >> /etc/dnf/dnf.conf"
  - if [[ "$FCVER" == "rawhide" ]] ; then docker exec -t buildenv /bin/sh -c "cat /opt/libxcrypt/.travis.dnf.conf.rawhide_latest >> /etc/dnf/dnf.conf" ; fi
  - docker exec -t buildenv /bin/sh -c "dnf makecache"
  - docker exec -t buildenv /bin/sh -c "dnf -y upgrade"
  - docker exec -t buildenv /bin/sh -c "dnf -y groups install buildsys-build"
  - docker exec -t buildenv /bin/sh -c "dnf -y install libtool"
  - if [[ "$CC" == "clang" ]]  ; then docker exec -t buildenv /bin/sh -c "dnf -y install clang" ; fi
  - if [[ "$CODECOV" == "1" ]] ; then docker exec -t buildenv /bin/sh -c "dnf -y install '/usr/bin/git' '/usr/bin/lcov' '/usr/bin/pip3'" ; fi
  - if [[ "$CODECOV" == "1" ]] ; then docker exec -t buildenv /bin/sh -c "pip3 install codecov" ; fi

before_script:
  - docker exec -t buildenv /bin/sh -c "rpm -E %optflags" > cflags.txt
  - docker exec -t buildenv /bin/sh -c "rpm -E %__global_ldflags" > ldflags.txt

script:
  - export CFLAGS="`cat cflags.txt | tr -d '\012\015'` -Wno-unused-command-line-argument" ; export CXXFLAGS="$CFLAGS" ; echo $CFLAGS
  - export LDFLAGS="`cat ldflags.txt | tr -d '\012\015'`" ; echo $LDFLAGS
  - if [[ "$CODECOV" == "1" ]] ; then export CFLAGS="-O0 -g --coverage" ; export CXXFLAGS="$CFLAGS" ; export LDFLAGS="--coverage" ; fi
  - docker exec -t buildenv /bin/sh -c "cat /etc/redhat-release"
  - docker exec -t buildenv /bin/sh -c "cd /opt/libxcrypt && autoreconf -fiv"
{'fraction_non_alphanumeric': 0.15831043956043955, 'fraction_numerical': 0.006753663003663004, 'mean_word_length': 2.087279151943463, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '43151', 'n_tokens_mistral': 3323, 'n_tokens_neox': 3178, 'n_words': 763}