Skip to content

Fix an "insufficient buffer space" bug in Botan.Low.Cipher.cipherUpdate #96

Fix an "insufficient buffer space" bug in Botan.Low.Cipher.cipherUpdate

Fix an "insufficient buffer space" bug in Botan.Low.Cipher.cipherUpdate #96

Workflow file for this run

name: CI - Documentation
on:
push:
branches:
- "main"
pull_request:
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
# Set the default shell on all platforms.
defaults:
run:
shell: sh
env:
ghc-version: "9.6"
cabal-version: "3.12"
jobs:
################################################################################
# Build documentation
################################################################################
build:
name: Build documentation
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v5
- name: 🛠️ Setup Haskell
id: setup-haskell
uses: haskell-actions/setup@v2
with:
ghc-version: ${{ env.ghc-version }}
cabal-version: ${{ env.cabal-version }}
- name: "🛠️ [Linux]: Update environment variables"
if: ${{ runner.os == 'Linux' }}
run: |
echo "LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
- name: 🛠️ Setup Botan
uses: ./.github/actions/setup-botan
# Time out this step. If it's taking too long to finish, something is
# wrong with the setup-botan action. Maybe it's compiling too many things?
timeout-minutes: 30
with:
botan-version: 3.9.0
- name: 🛠️ Configure
run: |
cabal configure \
--enable-tests \
--enable-benchmarks \
--enable-documentation \
--ghc-options="-Werror"
cat "cabal.project.local"
- name: 💾 Generate Cabal plan
run: |
cabal build all --dry-run
# Use the cache action instead of the restore/save actions, because cabal
# haddock-project (used in the generate-haddock.sh script) tends to
# rebuild dependencies regardless of whether we build the dependencies
# manually beforehand.
- name: 💾 Cache Cabal dependencies
uses: actions/cache@v4
env:
key: build-documentation-${{ runner.os }}-ghc-${{ steps.setup-haskell.outputs.ghc-version }}-cabal-${{ steps.setup-haskell.outputs.cabal-version }}
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: ${{ env.key }}-plan-${{ hashFiles('dist-newstyle/cache/plan.json') }}
restore-keys: ${{ env.key }}-
- name: 🏗️ Build documentation
run: ./scripts/generate-haddock.sh
- name: 📦 Upload documentation
uses: actions/upload-artifact@v5
with:
name: haddocks-${{ runner.os }}-ghc-${{ env.ghc-version }}-cabal-${{ env.cabal-version }}
path: haddocks
if-no-files-found: error
retention-days: 1
################################################################################
# Publish documentation
################################################################################
publish-documentation:
name: Publish documentation
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
needs: [build]
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.publish-pages.outputs.page_url }}
steps:
- name: 🛠️ Setup Pages
uses: actions/configure-pages@v5
- name: 📦 Download documentation
uses: actions/download-artifact@v6
with:
name: haddocks-${{ runner.os }}-ghc-${{ env.ghc-version }}-cabal-${{ env.cabal-version }}
path: haddocks
- name: 📦 Upload documentation to Pages
uses: actions/upload-pages-artifact@v4
with:
path: haddocks
- name: 🚀 Publish documentation to Pages
id: publish-pages
uses: actions/deploy-pages@v4