name: Benchmark
on: push
jobs:
  benchmark:
    runs-on: [self-hosted, benchmark]
    if: "contains(github.event.head_commit.message, '[benchmark]')"
    timeout-minutes: 10080
    steps:
    - uses: actions/checkout@v1
    - name: Benchmark
      run: |
        julia --project=@. -e 'using Pkg; Pkg.instantiate()'
        make build/sysimage.so
        make -C benchmark clean
        make -C benchmark -kj4
        make -C benchmark tables
        make -C benchmark clean-mps clean-sol
    - name: Upload logs
      uses: actions/upload-artifact@v2
      with:
        name: Logs
        path: benchmark/results/*
    - name: Upload tables & charts
      uses: actions/upload-artifact@v2
      with:
        name: Tables
        path: benchmark/tables/*

