Skip to content

Add function for log base 2 #40

Add function for log base 2

Add function for log base 2 #40

Workflow file for this run

name: Haskell CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
env:
cabal-build-dir: _build
runs-on: ubuntu-latest
steps:
- name: ✅ Checkout
uses: actions/checkout@v4
- name: 🌳 Environment
uses: haskell-actions/setup@v2
id: setup-haskell-cabal
with:
ghc-version: '9.8.2'
cabal-version: '3.10.1.0'
- name: 🧊 Freeze
run: >
cabal freeze
--builddir=${{ env.cabal-build-dir }}
- name: 🚪 Cache
uses: actions/cache@v4
env:
hash: ${{ hashFiles('cabal.project.freeze') }}
with:
key: ${{ matrix.os }}-ghc-${{ matrix.ghc }}-${{ env.hash }}
restore-keys: |
${{ matrix.os }}-ghc-${{ matrix.ghc }}-
path: |
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
${{ env.cabal-build-dir }}
- name: ❄ Install libsodium
run: |
git clone https://github.com/input-output-hk/libsodium
cd libsodium
git checkout dbb48cc
./autogen.sh
./configure
make
sudo make install
- name: 🪨 Install dependencies
run: |
cabal update
cabal build --only-dependencies --enable-tests --enable-benchmarks
- name: 🏠 Build
env:
LD_LIBRARY_PATH: "/usr/local/lib:$LD_LIBRARY_PATH"
PKG_CONFIG_PATH: "/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
run: cabal build --enable-tests --enable-benchmarks --extra-include-dirs=/usr/local/include --extra-lib-dirs=/usr/local/lib all
- name: 🧪 Run tests
run: cabal test --extra-include-dirs=/usr/local/include --extra-lib-dirs=/usr/local/lib all