image: registry.gitlab.gnome.org/gnome/glib-networking/master:v8

fedora-x86_64:
  script:
    # Sadly, GCC 9's LeakSanitizer is quite crashy, #86.
    # So we will run our tests under asan only once.
    - meson -Db_sanitize=address
            -Dgnutls=enabled
            -Dopenssl=enabled
            -Dlibproxy=enabled
            -Dgnome_proxy=enabled
            -Dwerror=true
            build/
    - ninja -C build/
    - ASAN_OPTIONS=fast_unwind_on_malloc=0 meson test --verbose --timeout-multiplier=3 -C build/
    - rm -rf build/

    # Now again, this time without asan. We will additionally test installation.
    - meson --prefix=$HOME/glib-networking-installed
            -Dgnutls=enabled
            -Dopenssl=enabled
            -Dlibproxy=enabled
            -Dgnome_proxy=enabled
            -Dwerror=true
            build/
    - ninja -C build/
    - meson test -v -C build/ --repeat=500
    - meson install -C build/
  artifacts:
    paths:
      - build/test-results
    when: on_failure

image: registry.gitlab.gnome.org/gnome/glib-networking/master:v8

fedora-x86_64:
  script:
    # Sadly, GCC 9's LeakSanitizer is quite crashy, #86.
    # So we will run our tests under asan only once.
    - meson -Db_sanitize=address
            -Dgnutls=enabled
            -Dopenssl=enabled
            -Dlibproxy=enabled
            -Dgnome_proxy=enabled
            -Dwerror=true
            build/
    - ninja -C build/
    - ASAN_OPTIONS=fast_unwind_on_malloc=0 meson test --verbose --timeout-multiplier=10 -C build/
    - rm -rf build/

    # Now again, this time without asan. We will additionally test installation.
    - meson --prefix=$HOME/glib-networking-installed
            -Dgnutls=enabled
            -Dopenssl=enabled
            -Dlibproxy=enabled
            -Dgnome_proxy=enabled
            -Dwerror=true
            build/
    - ninja -C build/
    - meson test -v -C build/ --repeat=500
    - meson install -C build/
  artifacts:
    paths:
      - build/test-results
    when: on_failure

Increase CI timeout for asan run
Increase CI timeout for asan run

It's rare, but we have hit the 3x (90s) timeout, so let's increase it
even further to 10x (300s, five minutes).
