<commit_before>name: Jupyter notebooks

on:
  # Trigger the workflow on push or pull request,
  # but only for the master branch
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  test:
    name: Test Jupyter notebooks on ${{ matrix.python-version }} and ${{ matrix.os }} with ${{ matrix.compiler }}
    runs-on: ${{ matrix.os }}
    strategy:
      # Prevent all build to stop if a single one fails
      fail-fast: false
      matrix:
        name: [
          ubuntu-18.04-gcc-9,
          ubuntu-18.04-clang-9,
          macOS-10.14-gcc-9,
          macOS-10.14-xcode-11.0
          ]

        include:

          - name: ubuntu-18.04-gcc-9
            os: ubuntu-18.04
            compiler: gcc
            version: "9"

          - name: ubuntu-18.04-clang-9
            os: ubuntu-18.04
            compiler: clang
            version: "9"

          - name: macOS-10.14-gcc-9
            os: macOS-10.14
            compiler: gcc
            version: "9"

          - name: macOS-10.14-xcode-11.0
            os: macOS-10.14
            compiler: xcode
            version: "11"

        python-version: ['3.6', '3.7']
        # os: [ubuntu-latest]
        # gcc-version: [9]
    steps:
    - uses: actions/checkout@v1
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v1
      with:
        python-version: ${{ matrix.python-version }}

    - name: Install (Linux)
      if: runner.os == 'Linux'
      run: |
        # Required for libc6-dbg:i386 and g++-multilib packages which are
        # needed for x86 builds.
        sudo dpkg --add-architecture i386
        # clang-3.7 and earlier are not available in Bionic anymore so we get
        # them from the Xenial repositories instead.
        sudo add-apt-repository "deb http://dk.archive.ubuntu.com/ubuntu/ xenial main"
        sudo add-apt-repository "deb http://dk.archive.ubuntu.com/ubuntu/ xenial universe"
        # LLVM 9 is not in Bionic's repositories so we add the official LLVM repository.
        if [ "${{ matrix.compiler }}" = "clang" ] && [ "${{ matrix.version }}" = "9" ]; then
          sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main"
        fi

        sudo apt-get update

        if [ "${{ matrix.compiler }}" = "gcc" ]; then
          sudo apt-get install -y g++-${{ matrix.version }} g++-${{ matrix.version }}-multilib
          echo "::set-env name=CC::gcc-${{ matrix.version }}"
          echo "::set-env name=CXX::g++-${{ matrix.version }}"
        else
          sudo apt-get install -y clang-${{ matrix.version }} g++-multilib
          echo "::set-env name=CC::clang-${{ matrix.version }}"
          echo "::set-env name=CXX::clang++-${{ matrix.version }}"
        fi

        sudo apt-get install -y mpich libmpich-dev

    - name: Install (macOS)
      if: runner.os == 'macOS'
      run: |
        brew install mpich
        if [ "${{ matrix.compiler }}" = "gcc" ]; then
          brew install gcc@${{ matrix.version }}
          echo "::set-env name=CC::gcc-${{ matrix.version }}"
          echo "::set-env name=CXX::g++-${{ matrix.version }}"
        else
          sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app
          echo "::set-env name=CC::clang"
          echo "::set-env name=CXX::clang++"
        fi

    # - name: Install GCC ${{ matrix.gcc-version }}
    #   run : |
    #     sudo apt-get install -y g++-${{ matrix.gcc-version }}

    # - name: Install MPI
    #   run : |
    #     sudo apt-get install -y mpich libmpich-dev

    - name: Install dependencies
      run: |
        pip install --upgrade pip
        pip install -e .[extras]

    - name: Evaluate cells of example notebooks
      run: |
        bash .github/workflows/test-notebooks.sh $CC<commit_msg>Reduce matrix to only Linux-gcc and macOS-clang<commit_after>name: Jupyter Notebooks

on:
  # Trigger the workflow on push or pull request,
  # but only for the master branch
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  test:
    name: Test Jupyter notebooks on ${{ matrix.python-version }} and ${{ matrix.os }} with ${{ matrix.compiler }}
    runs-on: ${{ matrix.os }}
    strategy:
      # Prevent all build to stop if a single one fails
      fail-fast: false
      matrix:
        name: [
          ubuntu-18.04-gcc-9,
          macOS-10.14-xcode-11.0
          ]

        include:

          - name: ubuntu-18.04-gcc-9
            os: ubuntu-18.04
            compiler: gcc
            version: "9"

          - name: macOS-10.14-xcode-11.0
            os: macOS-10.14
            compiler: xcode
            version: "11"

        python-version: ['3.6', '3.7']

    steps:
    - uses: actions/checkout@v1
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v1
      with:
        python-version: ${{ matrix.python-version }}

    - name: Install (Linux)
      if: runner.os == 'Linux'
      run: |
        # Required for libc6-dbg:i386 and g++-multilib packages which are
        # needed for x86 builds.
        sudo dpkg --add-architecture i386
        # clang-3.7 and earlier are not available in Bionic anymore so we get
        # them from the Xenial repositories instead.
        sudo add-apt-repository "deb http://dk.archive.ubuntu.com/ubuntu/ xenial main"
        sudo add-apt-repository "deb http://dk.archive.ubuntu.com/ubuntu/ xenial universe"
        # LLVM 9 is not in Bionic's repositories so we add the official LLVM repository.
        if [ "${{ matrix.compiler }}" = "clang" ] && [ "${{ matrix.version }}" = "9" ]; then
          sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main"
        fi

        sudo apt-get update

        if [ "${{ matrix.compiler }}" = "gcc" ]; then
          sudo apt-get install -y g++-${{ matrix.version }} g++-${{ matrix.version }}-multilib
          echo "::set-env name=CC::gcc-${{ matrix.version }}"
          echo "::set-env name=CXX::g++-${{ matrix.version }}"
        else
          sudo apt-get install -y clang-${{ matrix.version }} g++-multilib
          echo "::set-env name=CC::clang-${{ matrix.version }}"
          echo "::set-env name=CXX::clang++-${{ matrix.version }}"
        fi

        sudo apt-get install -y mpich libmpich-dev

    - name: Install (macOS)
      if: runner.os == 'macOS'
      run: |
        brew install mpich
        if [ "${{ matrix.compiler }}" = "gcc" ]; then
          brew install gcc@${{ matrix.version }}
          echo "::set-env name=CC::gcc-${{ matrix.version }}"
          echo "::set-env name=CXX::g++-${{ matrix.version }}"
        else
          sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app
          echo "::set-env name=CC::clang"
          echo "::set-env name=CXX::clang++"
        fi

    - name: Install dependencies
      run: |
        pip install --upgrade pip
        pip install -e .[extras]

    - name: Evaluate cells of example notebooks
      run: |
        bash .github/workflows/test-notebooks.sh $CC
{'fraction_non_alphanumeric': 0.14047954866008464, 'fraction_numerical': 0.019887165021156557, 'mean_word_length': 1.8638933764135703, 'pattern_counts': {'":': 16, '<': 3, '<?xml version=': 0, '>': 3, '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': '1531703', 'n_tokens_mistral': 2435, 'n_tokens_neox': 2191, 'n_words': 602}