# Copyright 2019 Ilya Shipitsin <chipitsine@gmail.com>
# Copyright 2020 Tim Duesterhus <tim@bastelstu.be>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version
# 2 of the License, or (at your option) any later version.

name: VTest

on:
  push:

permissions:
  contents: read

jobs:
  # The generate-matrix job generates the build matrix using JSON output
  # generated by .github/matrix.py.
  generate-matrix:
    name: Generate Build Matrix
    runs-on: ubuntu-latest
    outputs:
      matrix: ${{ steps.set-matrix.outputs.matrix }}
    steps:
      - uses: actions/checkout@v2
      - name: Generate Build Matrix
        id: set-matrix
        run: python3 .github/matrix.py "${{ github.event_name }}"

  # The Test job actually runs the tests.
  Test:
    name: ${{ matrix.name }}
    needs: generate-matrix
    runs-on: ${{ matrix.os }}
    strategy:
      matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
      fail-fast: false
    env:
      # Configure a short TMPDIR to prevent failures due to long unix socket
      # paths.
      TMPDIR: /tmp
      # Force ASAN output into asan.log to make the output more readable.
      ASAN_OPTIONS: log_path=asan.log
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 100
    - name: Install apt dependencies
      if: ${{ startsWith(matrix.os, 'ubuntu-') }}
      run: |
        sudo apt-get update
        sudo apt-get install -y \
          liblua5.3-dev \
          libpcre2-dev \
          libsystemd-dev \
          ninja-build \
          socat
    - name: Install brew dependencies
      if: ${{ startsWith(matrix.os, 'macos-') }}
      run: |
        brew install socat
        brew install lua
    - name: Install VTest
      run: |
        scripts/build-vtest.sh
    - name: Install SSL ${{ matrix.ssl }}
      if: ${{ matrix.ssl && matrix.ssl != 'stock' }}
      run: env ${{ matrix.ssl }} scripts/build-ssl.sh
    - name: Install OpenTracing libs
      if: ${{ contains(matrix.FLAGS, 'USE_OT=1') }}
      run: scripts/build-ot.sh
    - name: Build WURFL
      if: ${{ contains(matrix.FLAGS, 'USE_WURFL=1') }}
      run: make -C addons/wurfl/dummy
    - name: Compile HAProxy with ${{ matrix.CC }}
      run: |
        make -j$(nproc) all \
          ERR=1 \
          TARGET=${{ matrix.TARGET }} \
          CC=${{ matrix.CC }} \
          DEBUG=-DDEBUG_STRICT=1 \
          ${{ join(matrix.FLAGS, ' ') }} \
          ADDLIB="-Wl,-rpath,/usr/local/lib/ -Wl,-rpath,$HOME/opt/lib/"
        sudo make install
    - name: Show HAProxy version
      id: show-version
      run: |
        echo "::group::Show dynamic libraries."
        if command -v ldd > /dev/null; then
          # Linux
          ldd $(which haproxy)
        else
          # macOS
          otool -L $(which haproxy)
        fi
        echo "::endgroup::"
        haproxy -vv
        echo "::set-output name=version::$(haproxy -v |awk 'NR==1{print $3}')"
    - name: Install problem matcher for VTest
      # This allows one to more easily see which tests fail.
      run: echo "::add-matcher::.github/vtest.json"
    - name: Run VTest for HAProxy ${{ steps.show-version.outputs.version }}
      id: vtest
      run: |
        # This is required for macOS which does not actually allow to increase
        # the '-n' soft limit to the hard limit, thus failing to run.
        ulimit -n 5000
        make reg-tests VTEST_PROGRAM=../vtest/vtest REGTESTS_TYPES=default,bug,devel
    - name: Show results
      if: ${{ failure() }}
      run: |
        for folder in ${TMPDIR}/haregtests-*/vtc.*; do
          printf "::group::"
          cat $folder/INFO
          cat $folder/LOG
          echo "::endgroup::"
        done
        shopt -s nullglob
        for asan in asan.log*; do
          echo "::group::$asan"
          cat $asan
          echo "::endgroup::"
        done
