name: Valgrind memcheck
on:
  pull_request:
  push:
    # don't run on packaging branches
    branches-ignore:
      - 'for-debian'
      - 'debian/**'
      - 'pristine-tar'
    paths:
      - '**'
      - '!doc/**'
      - '!**.md'
jobs:
  debian-buster:
    runs-on: ubuntu-latest
    container: debian:buster
    steps:
      - uses: actions/checkout@v2
      - name: network overview
        run: |
          ip addr show
          cat /etc/hosts
      - name: install dependencies
        run: |
          apt-get update
          apt-get -y install python3-yaml apache2-bin apache2-dev curl gnutls-bin libapr1-dev libgnutls28-dev openssl pkg-config procps softhsm2 valgrind
      - name: autoreconf
        run: autoreconf -fiv
      - name: configure
        run: APACHE_MUTEX=pthread ./configure --enable-valgrind-test
      - name: store config.log
        uses: actions/upload-artifact@v2
        if: failure()
        with:
          name: buster-config-log
          path: config.log
      - name: make
        run: make
      - name: make check
        run: VERBOSE=1 make check
      - name: store test logs
        uses: actions/upload-artifact@v2
        if: failure() || cancelled()
        with:
          name: buster-apache-logs
          path: |
            test/test-*.log
            test/logs/

name: Valgrind memcheck
on:
  pull_request:
  push:
    # don't run on packaging branches
    branches-ignore:
      - 'for-debian'
      - 'debian/**'
      - 'pristine-tar'
    paths:
      - '**'
      - '!doc/**'
      - '!**.md'
jobs:
  debian-buster:
    runs-on: ubuntu-latest
    container: debian:buster
    steps:
      - uses: actions/checkout@v2
      - name: network overview
        run: |
          ip addr show
          cat /etc/hosts
      - name: install dependencies
        run: |
          apt-get update
          apt-get -y install python3-yaml apache2-bin apache2-dev curl gnutls-bin libapr1-dev libgnutls28-dev openssl pkg-config procps softhsm2 valgrind
      - name: find usable IPs for tests
        run: |
          echo "test_ips=$(python3 test/check_test_ips.py -H localhost)" >> ${GITHUB_ENV}
      - name: autoreconf
        run: autoreconf -fiv
      - name: configure
        run: TEST_IP="${test_ips}" APACHE_MUTEX=pthread ./configure --enable-valgrind-test
      - name: store config.log
        uses: actions/upload-artifact@v2
        if: failure()
        with:
          name: buster-config-log
          path: config.log
      - name: make
        run: make
      - name: make check
        run: VERBOSE=1 make check
      - name: store test logs
        uses: actions/upload-artifact@v2
        if: failure() || cancelled()
        with:
          name: buster-apache-logs
          path: |
            test/test-*.log
            test/logs/

Use IP detection for Valgrind tests
Use IP detection for Valgrind tests

This lets the test 30_ip_based_vhosts run in the Valgrind CI workflow.
