diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b4eb5e1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,12 @@ +name: Workflow for ci +on: [push, pull_request] +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Build + run: make + - name: Run tests + run: make check diff --git a/Makefile b/Makefile index 392b4eb..bb3a682 100644 --- a/Makefile +++ b/Makefile @@ -6,5 +6,8 @@ test : test.c optparse.h run : test ./test -abdfoo -c bar subcommand example.txt -a +check: test + ./test + clean : rm -f test diff --git a/README.md b/README.md index 2a85d56..fe4d1be 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Optparse +[![Build Status](https://github.com/skeeto/optparse/actions/workflows/ci.yml/badge.svg)](https://github.com/skeeto/optparse/actions/workflows/ci.yml) + Optparse is a public domain, portable, reentrant, embeddable, getopt-like option parser. As a single header file, it's trivially dropped into any project. It supports POSIX getopt option strings, GNU-style long options,