Merge pull request #192 from kadena-io/jose/delete-txlogs #11
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: Build application binaries via cabal | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- '**' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
ghc: ['9.6.6', '9.8.2', '9.10.1'] | |
cabal: ['3.12'] | |
# 'macos-14' is an M1 runner | |
os: ['ubuntu-20.04', 'ubuntu-22.04', 'macos-14'] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set permissions for .ghcup (ubuntu) | |
if: startsWith(matrix.os, 'ubuntu-') | |
run: sudo chown -R $USER /usr/local/.ghcup | |
- name: Install GHC and Cabal | |
uses: haskell-actions/setup@v2 | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
cabal-version: ${{ matrix.cabal }} | |
- name: Confirm GHC and Cabal installation | |
run: | | |
ghc --version | |
cabal --version | |
- name: Update Cabal package database | |
run: cabal update | |
- name: Display outdated packages | |
run: cabal outdated | |
- name: Configure build | |
run: | | |
cabal build --dry-run | |
cabal freeze | |
- name: Sync with Cabal cache | |
uses: larskuhtz/cabal-cache-action@4b537195b33898fcd9adc62cee2a44986fd7b1b6 | |
with: | |
bucket: "kadena-cabal-cache" | |
region: "us-east-1" | |
folder: "packages/${{ matrix.os }}" | |
aws_access_key_id: "${{ secrets.kadena_cabal_cache_aws_access_key_id }}" | |
aws_secret_access_key: "${{ secrets.kadena_cabal_cache_aws_secret_access_key }}" | |
- name: Build only dependencies | |
run: cabal build --only-dependencies | |
- name: Build application | |
run: cabal build | |
- name: Run Tests | |
run: cabal run tests |