Skip to content

Use pkg-config in CI #427

Use pkg-config in CI

Use pkg-config in CI #427

Workflow file for this run

name: sel
# Trigger the workflow on push or pull request, but only for the main branch
on:
pull_request:
push:
branches: ["main"]
workflow_run:
workflows: ["libsodium-bindings"]
types:
- completed
jobs:
generateMatrix:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: "Generate matrix from cabal"
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Extract the tested GHC versions
id: set-matrix
uses: kleidukos/get-tested@v0.1.7.0
with:
cabal-file: sel/sel.cabal
ubuntu: true
macos: true
version: 0.1.6.0
tests:
name: ${{ matrix.ghc }} on ${{ matrix.os }}
needs: generateMatrix
runs-on: ${{ matrix.os }}
strategy:
matrix: ${{ fromJSON(needs.generateMatrix.outputs.matrix) }}
steps:
- name: Checkout base repo
uses: actions/checkout@v4
- name: Set up Haskell
id: setup-haskell
uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: 'latest'
- name: Configure
run: |
./.github/workflows/install-libsodium.sh
- name: Cache
uses: actions/cache@v4.0.2
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: ${{ runner.os }}-ghc-${{ matrix.ghc }}-cabal-${{ hashFiles('**/plan.json') }}
restore-keys: ${{ runner.os }}-ghc-${{ matrix.ghc }}-
- name: Build
run: cabal build sel
- name: Test
run: cabal test sel