name: generic-release

on:
  pull_request:
    # This will eventually only be for pushes to release
    # but for dogfooding purposes, I'm running it even
    # on dev pushes
    branches: [ dev, release, actionsTest ]

jobs:
  # missing jobs
  #
  # ppc64le + fuzz test
  # Qemu PPC64 + Fuzz test
  # Qemu aarch64 + Fuzz Test (on Xenial)
  # versions comp
  # meson test

  osx:
    runs-on: macos-10.15
    steps:
    - uses: actions/checkout@v2
    - name: OS-X
      run: |
        make test
        # make -c lib all (need to fix. not working right now)

  tsan:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: thread sanitizer
      run: |
        CC=clang make tsan-test-zstream
        CC=clang make tsan-fuzztest

  zlib-wrapper:
    runs-on: ubuntu-16.04
    steps:
    - uses: actions/checkout@v2
    - name: zlib wrapper test
      run: |
        make valgrindinstall
        make -C zlibWrapper test
        make -C zlibWrapper valgrindTest

  lz4-threadpool-partial-libs:
    runs-on: ubuntu-16.04
    steps:
    - uses: actions/checkout@v2
    - name: LZ4, thread pool, and partial libs testslib wrapper test
      run: |
        make lz4install
        make -C tests test-lz4
        make check < /dev/null | tee   # mess with lz4 console detection
        make clean
        make -C tests test-pool
        make clean
        bash tests/libzstd_partial_builds.sh
