---
# vi: ts=2 sw=2 et:
#
name: Unit tests
on: [pull_request]

jobs:
  build:
    runs-on: ubuntu-20.04
    strategy:
      fail-fast: false
      matrix:
        image: [centos8, stream8]
        phase: [GCC, GCC_ASAN]
    env:
      CONT_NAME: "systemd-centos8-ci"
      CENTOS_RELEASE: ${{ matrix.image }}
    steps:
      - name: Repository checkout
        uses: actions/checkout@v1
      - name: Install build dependencies
        run: sudo -E .github/workflows/unit_tests.sh SETUP
      - name: Build & test (${{ env.CENTOS_RELEASE }} / ${{ matrix.phase }})
        run: sudo -E .github/workflows/unit_tests.sh RUN_${{ matrix.phase }}
      - name: Cleanup
        run: sudo -E .github/workflows/unit_tests.sh CLEANUP
