From 03320dc7323641a769e5edcbd6faa092252c0959 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 25 Aug 2020 16:25:19 +0200 Subject: Add GitHub Actions-based CI --- .github/workflows/build.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ README.rst | 15 ++++++++++++++- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build.yml mode change 120000 => 100644 README.rst diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..905f39d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,42 @@ +name: build +on: [push, pull_request] +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + ghc: ['8.6', '8.8', '8.10'] + cabal: ['3.0', '3.2'] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-haskell@v1 + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} + - name: Cache + uses: actions/cache@v1 + env: + cache-name: cache-cabal + with: + path: ~/.cabal + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: Install dependencies + run: | + cabal update + cabal build --only-dependencies --enable-tests --enable-benchmarks + - name: Build + run: cabal build --enable-tests --enable-benchmarks all + - name: Run tests + run: cabal test all + - name: Build documentation + run: cabal run pesto-doc + - uses: actions/upload-artifact@v2 + with: + name: documentation + path: _build/ + diff --git a/README.rst b/README.rst deleted file mode 120000 index 8b4cb52..0000000 --- a/README.rst +++ /dev/null @@ -1 +0,0 @@ -src/Codec/Pesto.lhs \ No newline at end of file diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..116df09 --- /dev/null +++ b/README.rst @@ -0,0 +1,14 @@ +Pesto +===== + +.. image:: https://github.com/PromyLOPh/pesto/workflows/build/badge.svg + +Pesto is a text-based human-editable and machine-transformable cooking recipe +interchange format. + +For more information see the latest draft_, which is rendered from its Literate +Haskell sources_. + +.. _draft: https://6xq.net/pesto/ +.. _sources: https://github.com/PromyLOPh/pesto/blob/master/src/lib/Codec/Pesto.lhs + -- cgit v1.2.3