name: CI checks

on: [ push, pull_request ]

jobs:
  build:

    runs-on: ubuntu-latest

    name: Compilation

    steps:
    - name: Install dependencies
      run: sudo apt-get install -y flex bison gawk tcl tcl-dev tk tk-dev libcairo2 libcairo2-dev xcb libxcb1 libxcb1-dev libxrender-dev libxpm-dev libxcb-render0-dev libx11-xcb1 libx11-xcb-dev
    - name: Checkout source
      uses: actions/checkout@v3
    - name: configure
      run: ./configure
    - name: make
      run: make
    - name: Archive compiled binary
      uses: actions/upload-artifact@v3
      with:
        name: xschem
        path: src/xschem
