name: Rust

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

env:
  CARGO_TERM_COLOR: always

jobs:
  ubuntu-nightly:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions-rs/toolchain@v1
      with:
        profile: minimal
        toolchain: nightly
        override: true
    - name: Install Deps
      run: sudo apt-get install --no-install-recommends binutils-dev libunwind8-dev
    - name: Test
      run: ./test.sh
  
  ubuntu-beta:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions-rs/toolchain@v1
      with:
        profile: minimal
        toolchain: beta
        override: true
    - name: Install Deps
      run: sudo apt-get install --no-install-recommends binutils-dev libunwind8-dev
    - name: Test
      run: ./test.sh
      
  ubuntu-stable:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions-rs/toolchain@v1
      with:
        profile: minimal
        toolchain: stable
        override: true
    - name: Install Deps
      run: sudo apt-get install --no-install-recommends binutils-dev libunwind8-dev
    - name: Test
      run: ./test.sh
        
#  macos-nightly:
#    runs-on: macos-10.15 # macos-11 is not yet supported by upstream honggfuzz
#    steps:
#    - uses: actions/checkout@v2
#    - uses: actions-rs/toolchain@v1
#      with:
#        profile: minimal
#        toolchain: nightly
#        override: true
#    - name: Test
#      run: ./test.sh

