wip #14
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-linux | |
on: | |
pull_request: | |
push: | |
paths: | |
- '.github/workflows/ci-linux.yaml' | |
- 'cabal.project' | |
- '*/src/**' | |
# INFO: The following configuration block ensures that only one build runs per branch, | |
# which may be desirable for projects with a costly build process. | |
# Remove this block from the CI workflow to let each CI job run to completion. | |
concurrency: | |
group: build-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Setup libsodium and libsecp256k1 | |
- uses: ./.github/actions/setup_security_libs.yml | |
- uses: actions/checkout@v4 | |
- uses: haskell-actions/setup@v2 | |
id: setup | |
with: | |
ghc-version: '8.10' # Resolves to the latest point release of GHC 8.10 | |
cabal-version: '3.6.0.0' # Exact version of Cabal | |
- name: Set up cabal.project.local | |
run: | | |
echo "package cardano-crypto-praos" >> cabal.project.local | |
echo " flags: -external-libsodium-vrf" >> cabal.project.local | |
- name: Cached Dependencies | |
uses: actions/cache@v2 | |
id: cabal-cache | |
with: | |
path: | | |
cabal.project.local | |
${{ steps.setup.outputs.cabal-store }} | |
key: ${{ hashFiles('**/*.cabal', '**/cabal.project') }} | |
- name: Install dependencies | |
if: steps.cabal-cache.outputs.cache-hit != 'true' | |
run: cabal build all --only-dependencies | |
test: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
# Setup libsodium and libsecp256k1 | |
- uses: ./.github/actions/setup_security_libs.yml | |
- uses: actions/checkout@v4 | |
- uses: haskell-actions/setup@v2 | |
id: setup | |
with: | |
ghc-version: '8.10' | |
cabal-version: '3.6.0.0' | |
- name: Cached Dependencies | |
uses: actions/cache@v2 | |
id: cabal-cache | |
with: | |
path: | | |
cabal.project.local | |
${{ steps.setup.outputs.cabal-store }} | |
key: ${{ hashFiles('**/*.cabal', '**/cabal.project', 'cabal.project.local') }} | |
- name: Build dependencies for integration test | |
run: | | |
cabal install -j cardano-node cardano-cli --overwrite-policy=always | |
cabal install -j convex-wallet --overwrite-policy=always | |
echo "/home/runner/.cabal/bin" >> $GITHUB_PATH | |
- name: Test all | |
run: cabal test all |