Add GitHub action to build and unit test #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Test | |
| on: | |
| push: | |
| branches: [ develop, master ] | |
| pull_request: | |
| branches: [ develop, master ] | |
| workflow_dispatch: | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential libevent-dev libssl-dev libnet1-dev libpcap-dev libsqlite3-dev check | |
| - name: Build | |
| run: make | |
| - name: Run unit tests | |
| run: make unittest |