<commit_before>name: Test

# to-do:
#   - add a macos test with brew etc.
#   - build with clang/asan/etc. and run the fuzz tests

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-20.04

    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Add libheif PPA
        run: |
          sudo add-apt-repository ppa:strukturag/libde265
          sudo add-apt-repository ppa:strukturag/libheif

      - name: Update apt
        env:
          DEBIAN_FRONTEND: noninteractive
        run:
          sudo apt-get update -qq -o Acquire::Retries=3

      # libaom-dev, libde265-dev, libx265-dev are required by the libheif.pc in 
      # libheif-dev in the ppa, but not listed as deps in the debian package
      # see https://github.com/strukturag/libheif/issues/404
      - name: Install platform dependencies
        env:
          DEBIAN_FRONTEND: noninteractive
        run:
          sudo apt-get install --fix-missing -qq -o Acquire::Retries=3
                gtk-doc-tools
                gobject-introspection
                python3-pip
                python3-setuptools
                python3-wheel
                libfftw3-dev
                libexif-dev
                libjpeg-turbo8-dev
                libpng-dev
                libwebp-dev
                libtiff5-dev
                libaom-dev
                libde265-dev
                libx265-dev
                libheif-dev
                libexpat1-dev
                libcfitsio-dev
                libgsl-dev
                libmatio-dev
                libnifti-dev
                liborc-0.4-dev
                liblcms2-dev
                libpoppler-glib-dev
                librsvg2-dev
                libgif-dev
                libopenexr-dev
                libpango1.0-dev
                libgsf-1-dev
                libopenslide-dev
                libffi-dev

      - name: Configure libvips
        run: CFLAGS=-Wall CXXFLAGS=-Wall ./autogen.sh
            --disable-dependency-tracking
            --disable-deprecated

      - name: Build libvips
        run: make V=0

      - name: Check libvips
        run: make V=0 check

      - name: Install libvips
        run: |
                sudo make V=0 install
                sudo ldconfig

      - name: Install pyvips
        run: pip3 install pyvips pytest

      - name: Run test suite
        run: python3 -m pytest
<commit_msg>fix up github actions again<commit_after>name: Test

# to-do:
#   - add a macos test with brew etc.
#   - build with clang/asan/etc. and run the fuzz tests

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-20.04

    steps:
      - name: Checkout code
        uses: actions/checkout@v2

        # libvips work with 1.6.1 in ubuntu-20.04, but fails with 1.10
        # - name: Add libheif PPA
        # run: |
        #   sudo add-apt-repository ppa:strukturag/libde265
        #   sudo add-apt-repository ppa:strukturag/libheif
        # you need to add libaom-dev, libde265-dev, libx265-dev below to get
        # this to work, see https://github.com/strukturag/libheif/issues/404

      - name: Update apt
        env:
          DEBIAN_FRONTEND: noninteractive
        run:
          sudo apt-get update -qq -o Acquire::Retries=3

      - name: Install platform dependencies
        env:
          DEBIAN_FRONTEND: noninteractive
        run:
          sudo apt-get install --fix-missing -qq -o Acquire::Retries=3
                gtk-doc-tools
                gobject-introspection
                python3-pip
                python3-setuptools
                python3-wheel
                libfftw3-dev
                libexif-dev
                libjpeg-turbo8-dev
                libpng-dev
                libwebp-dev
                libtiff5-dev
                libheif-dev
                libexpat1-dev
                libcfitsio-dev
                libgsl-dev
                libmatio-dev
                libnifti-dev
                liborc-0.4-dev
                liblcms2-dev
                libpoppler-glib-dev
                librsvg2-dev
                libgif-dev
                libopenexr-dev
                libpango1.0-dev
                libgsf-1-dev
                libopenslide-dev
                libffi-dev

      - name: Configure libvips
        run: CFLAGS=-Wall CXXFLAGS=-Wall ./autogen.sh
            --disable-dependency-tracking
            --disable-deprecated

      - name: Build libvips
        run: make V=0

      - name: Check libvips
        run: make V=0 check

      - name: Install libvips
        run: |
                sudo make V=0 install
                sudo ldconfig

      - name: Install pyvips
        run: pip3 install pyvips pytest

      - name: Run test suite
        run: python3 -m pytest

{'fraction_non_alphanumeric': 0.06893045953639691, 'fraction_numerical': 0.01870679137860919, 'mean_word_length': 1.2481718464351006, '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': '2235280', 'n_tokens_mistral': 1595, 'n_tokens_neox': 1461, 'n_words': 356}