From c8e1b7218c480b2aeb67f15618691a9739306951 Mon Sep 17 00:00:00 2001 From: NAKAJIMA Yusaku Date: Sat, 26 Nov 2022 18:00:42 +0900 Subject: [PATCH 1/2] Intruduce ci --- .github/workflows/ci.yml | 12 ++++++++++++ Makefile | 3 +++ 2 files changed, 15 insertions(+) create mode 100644 .github/workflows/ci.yml 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 From e3bc49908986a47d511cb353473ee050f3e3690d Mon Sep 17 00:00:00 2001 From: NAKAJIMA Yusaku Date: Sat, 26 Nov 2022 18:14:31 +0900 Subject: [PATCH 2/2] Add a build status badge. --- README.md | 2 ++ 1 file changed, 2 insertions(+) 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,