doc: documented base token extractors #425
This file contains 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: CI | |
on: [push, pull_request] | |
jobs: | |
validate: | |
name: GHC ${{ matrix.ghc }}, Cabal ${{ matrix.cabal }} | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
# In 2022 State of Haskell: | |
# 41% 8.10 | |
# 25% 9.0 | |
# 48% 9.2 | |
# 26% 9.4 | |
# 10% 9.6 | |
# As such, we'll keep supporting 8.10 as an LTS of sorts for now. | |
ghc: ['8.10', '9.2', '9.4', '9.6', latest] | |
cabal: ['3.6', latest] | |
exclude: | |
- ghc: '9.4' | |
cabal: '3.6' | |
- ghc: '9.6' | |
cabal: '3.6' | |
- ghc: 'latest' | |
cabal: '3.6' | |
env: | |
CONFIG: "--enable-tests --enable-doc" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Haskell | |
uses: haskell-actions/setup@v2 | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
cabal-version: ${{ matrix.cabal }} | |
- name: Determine Dependencies | |
run: | | |
cabal update | |
cabal freeze $CONFIG | |
- name: Check Cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cabal/store | |
dist-newstyle | |
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}-${{ hashFiles('cabal.project.freeze') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}- | |
- name: Build | |
run: cabal build gigaparsec $CONFIG | |
- name: Test | |
run: | | |
cabal test $CONFIG --test-options="--color always" | |
- name: Doc | |
run: cabal haddock gigaparsec $CONFIG | |
deploy: | |
name: Deploy Docs | |
needs: validate | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
ghc: [latest] | |
cabal: [latest] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Haskell | |
uses: haskell-actions/setup@v2 | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
cabal-version: ${{ matrix.cabal }} | |
- name: Determine Dependencies | |
run: | | |
cabal update | |
cabal freeze $CONFIG | |
- name: Check Cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cabal/store | |
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}-${{ hashFiles('cabal.project.freeze') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}- | |
- name: Doc | |
run: cabal haddock gigaparsec --enable-doc --haddock-hyperlink-source --haddock-quickjump --haddock-html-location='https://hackage.haskell.org/package/$pkg-$version/docs' | |
- name: Prepare to upload built htmls | |
run: cp -r ./$(find dist-newstyle -path '*/doc/html/gigaparsec') site | |
- name: Deploy haddock | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: site |