name: CI

on: [push, pull_request]

jobs:

  test-ubuntu-latest:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: make
      # build with TLS just for compilatoin coverage
      run: make BUILD_TLS=yes
    - name: test
      run: |
        sudo apt-get install tcl8.6
        ./runtest --verbose
    - name: module api test
      run: ./runtest-moduleapi --verbose

  build-debian-old:
    runs-on: ubuntu-latest
    container: debian:oldoldstable
    steps:
    - uses: actions/checkout@v2
    - name: make
      run: |
        apt-get update && apt-get install -y build-essential
        make

  build-macos-latest:
    runs-on: macos-latest
    steps:
    - uses: actions/checkout@v2
    - name: make
      run: make

  build-32bit:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: make
      run: |
        sudo apt-get update && sudo apt-get install libc6-dev-i386
        make 32bit

  build-libc-malloc:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: make
      run: make MALLOC=libc

