Skip to content

cardano-client: use non experimental versions of node-to-client protocol #9717

cardano-client: use non experimental versions of node-to-client protocol

cardano-client: use non experimental versions of node-to-client protocol #9717

Workflow file for this run

name: Haskell CI
on:
pull_request:
push:
branches:
- 'staging'
- 'trying'
jobs:
check-cabal-files:
runs-on: ubuntu-latest
steps:
- name: Install Haskell
uses: input-output-hk/setup-haskell@v1
id: setup-haskell
with:
cabal-version: "3.10.1.0"
- uses: actions/checkout@v3
- name: Cabal check
run: ./scripts/ci/check-cabal-files.sh
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ghc: ["8.10.7", "9.2.5"]
os: [ubuntu-latest, windows-latest]
env:
# Modify this value to "invalidate" the cabal cache.
CABAL_CACHE_VERSION: "2022-12-30"
# current ref from: 27.02.2022
SECP256K1_REF: ac83be33d0956faf6b7f61a60ab524ef7d6a473a
SECP_CACHE_VERSION: "2022-12-30"
steps:
- name: Install Haskell
uses: input-output-hk/setup-haskell@v1
id: setup-haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: "3.8.1.0"
pacman-packages: >
mingw-w64-x86_64-pkg-config
mingw-w64-x86_64-libsodium
mingw-w64-x86_64-openssl
base-devel
autoconf-wrapper
autoconf
automake
libtool
make
- name: "[OUTPUT] cache keys: version, weeknum"
id: cache-keys
shell: bash
run: |
echo "weeknum=$(/usr/bin/date -u "+%W")" >> $GITHUB_OUTPUT
echo "CACHE_VERSION=20220919" >> $GITHUB_OUTPUT
echo "DIST_CACHE_VERSION=20221122" >> $GITHUB_OUTPUT
- name: "LINUX: Install build environment (apt-get)"
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get -y install libsodium23 libsodium-dev
sudo apt-get -y install libsystemd0 libsystemd-dev
sudo apt-get -y remove --purge software-properties-common
sudo apt-get -y autoremove
- name: "LINUX: Install build environment (for secp256k1)"
if: runner.os == 'Linux'
run: sudo apt-get -y install autoconf automake libtool
- uses: actions/checkout@v3
- name: Install secp256k1
uses: input-output-hk/setup-secp256k1@v1
with:
git-ref: ${{ env.SECP256K1_REF }}
cache-version: ${{ env.SECP_CACHE_VERSION }}
- name: "Configure cabal.project.local"
if: runner.os != 'Windows'
run: |
cp .github/workflows/cabal.project.local.Linux cabal.project.local
- name: "Configure cabal.project.local Windows"
if: runner.os == 'Windows'
run: |
cp .github/workflows/cabal.project.local.Windows cabal.project.local
- name: Update Hackage and CHaP
run: cabal update
- name: Record dependencies
id: record-deps
run: cabal build all --dry-run
cat dist-newstyle/cache/plan.json | jq -r '."install-plan"[].id' | sort | uniq > dependencies.txt
- uses: actions/cache@v3
name: "Cache `cabal store`"
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: cache-dependencies-${{ env.CABAL_CACHE_VERSION }}-${{ steps.cache-keys.outputs.CACHE_VERSION }}-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('dependencies.txt') }}
restore-keys: cache-dependencies-${{ env.CABAL_CACHE_VERSION }}-${{ steps.cache-keys.outputs.CACHE_VERSION }}-${{ runner.os }}-${{ matrix.ghc }}
- uses: actions/cache@v3
name: "Cache `dist-newstyle`"
with:
path: |
dist-newstyle
!dist-newstyle/**/.git
key: cache-dist-${{ env.CABAL_CACHE_VERSION }}-${{ steps.cache-keys.outputs.DIST_CACHE_VERSION }}-${{ runner.os }}-${{ matrix.ghc }}-${{ steps.cache-keys.outputs.weeknum }}
restore-keys: cache-dist-${{ env.CABAL_CACHE_VERSION }}-${{ steps.cache-keys.outputs.DIST_CACHE_VERSION }}-${{ runner.os }}-${{ matrix.ghc }}
- name: Update PATH on windows
if: runner.os == 'Windows'
run: |
$env:PATH=("C:\msys64\mingw64\bin;{0}" -f $env:PATH)
echo "PATH=$env:PATH" >> $env:GITHUB_ENV
- name: Build dependencies
run: cabal build --only-dependencies all -j
- name: Build projects [build]
run: cabal build all -j
# Test network packages
- name: ntp-client [test]
run: cabal run ntp-client:test
- name: network-mux [test]
run: cabal run network-mux:test
- name: ourobors-network-testing [test]
run: cabal run ouroboros-network-testing:test
- name: ourobors-network-framework [test]
run: cabal run ouroboros-network-framework:test
- name: ouroboros-network-protocols [test]
run: cabal run ouroboros-network-protocols:test
# We don't run cddl in GitHub actions (only on Hydra).
# - name: ouroboros-network-protocols [cddl]
# run: |
# # The tests call out to msys2 commands. We generally do not want to mix toolchains, so
# # we are very deliberate about only adding msys64 to the path where absolutely necessary.
# ${{ (runner.os == 'Windows' && '$env:PATH=("C:\msys64\mingw64\bin;{0}" -f $env:PATH)') || '' }}
# cabal run ouroboros-network-protocols-test:cddl
- name: ouroboros-network [test]
run: cabal run ouroboros-network:test
# Consensus tests take too long on GitHub's Azure machines
# Uncomment the following back in for debugging. Remember to launch a `pwsh` from
# the tmux session to debug `pwsh` issues. And be reminded that the `/msys2` and
# `/msys2/mingw64` paths are not in PATH by default for the workflow, but tmate
# will put them in.
# You may also want to run
#
# $env:PATH=("C:\Program Files\PowerShell\7;{0}" -f $env:ORIGINAL_PATH)
#
# to restore the original path. Do note that some test might need msys2
# and will silently fail if msys2 is not in path. See the "Run tests" step.
#
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# with:
# limit-access-to-actor: true