Skip to content

Commit

Permalink
Limit CI concurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
newhoggy committed Mar 5, 2023
1 parent 18d5ab4 commit 1bd0fc4
Show file tree
Hide file tree
Showing 9 changed files with 103 additions and 63 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/check-cabal-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
push:
create:

# Limit concurrent runs of this workflow within a single PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
check-cabal-files:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/check-git-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name: Check git dependencies
on:
push:

# Limit concurrent runs of this workflow within a single PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/check-hlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name: Check HLint
on:
push:

# Limit concurrent runs of this workflow within a single PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/check-mainnet-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name: Check mainnet configuration
on:
push:

# Limit concurrent runs of this workflow within a single PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/check-nix-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name: Check nix configuration
on:
push:

# Limit concurrent runs of this workflow within a single PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ on:
- all
create:

# Limit concurrent runs of this workflow within a single PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ${{ matrix.os }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/markdown-links-ci-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: Check Markdown links

on: push

# Limit concurrent runs of this workflow within a single PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
markdown-link-check:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/stylish-haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
push:
create:

# Limit concurrent runs of this workflow within a single PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
Expand Down
126 changes: 63 additions & 63 deletions cardano-api/src/Cardano/Api/ProtocolParameters.hs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ import Cardano.Slotting.Slot (EpochNo)

import Cardano.Ledger.Babbage.PParams (BabbagePParams, BabbagePParamsHKD (..),
BabbagePParamsUpdate)
import Cardano.Ledger.BaseTypes (strictMaybeToMaybe)
import Cardano.Ledger.BaseTypes (maybeToStrictMaybe, strictMaybeToMaybe)
import qualified Cardano.Ledger.BaseTypes as Ledger
import qualified Cardano.Ledger.Core as Ledger
import Cardano.Ledger.Crypto (StandardCrypto)
Expand Down Expand Up @@ -121,7 +121,6 @@ import Cardano.Api.SerialiseTextEnvelope
import Cardano.Api.SerialiseUsing
import Cardano.Api.StakePoolMetadata
import Cardano.Api.TxMetadata
import Cardano.Api.Utils
import Cardano.Api.Value

-- | The values of the set of /updatable/ protocol parameters. At any
Expand Down Expand Up @@ -936,33 +935,33 @@ toShelleyPParamsUpdate
, protocolUpdateTreasuryCut
} =
ShelleyPParams {
_minfeeA = noInlineMaybeToStrictMaybe protocolUpdateTxFeePerByte
, _minfeeB = noInlineMaybeToStrictMaybe protocolUpdateTxFeeFixed
, _maxBBSize = noInlineMaybeToStrictMaybe protocolUpdateMaxBlockBodySize
, _maxTxSize = noInlineMaybeToStrictMaybe protocolUpdateMaxTxSize
, _maxBHSize = noInlineMaybeToStrictMaybe protocolUpdateMaxBlockHeaderSize
_minfeeA = maybeToStrictMaybe protocolUpdateTxFeePerByte
, _minfeeB = maybeToStrictMaybe protocolUpdateTxFeeFixed
, _maxBBSize = maybeToStrictMaybe protocolUpdateMaxBlockBodySize
, _maxTxSize = maybeToStrictMaybe protocolUpdateMaxTxSize
, _maxBHSize = maybeToStrictMaybe protocolUpdateMaxBlockHeaderSize
, _keyDeposit = toShelleyLovelace <$>
noInlineMaybeToStrictMaybe protocolUpdateStakeAddressDeposit
maybeToStrictMaybe protocolUpdateStakeAddressDeposit
, _poolDeposit = toShelleyLovelace <$>
noInlineMaybeToStrictMaybe protocolUpdateStakePoolDeposit
, _eMax = noInlineMaybeToStrictMaybe protocolUpdatePoolRetireMaxEpoch
, _nOpt = noInlineMaybeToStrictMaybe protocolUpdateStakePoolTargetNum
, _a0 = noInlineMaybeToStrictMaybe $ Ledger.boundRational =<<
maybeToStrictMaybe protocolUpdateStakePoolDeposit
, _eMax = maybeToStrictMaybe protocolUpdatePoolRetireMaxEpoch
, _nOpt = maybeToStrictMaybe protocolUpdateStakePoolTargetNum
, _a0 = maybeToStrictMaybe $ Ledger.boundRational =<<
protocolUpdatePoolPledgeInfluence
, _rho = noInlineMaybeToStrictMaybe $ Ledger.boundRational =<<
, _rho = maybeToStrictMaybe $ Ledger.boundRational =<<
protocolUpdateMonetaryExpansion
, _tau = noInlineMaybeToStrictMaybe $ Ledger.boundRational =<<
, _tau = maybeToStrictMaybe $ Ledger.boundRational =<<
protocolUpdateTreasuryCut
, _d = noInlineMaybeToStrictMaybe $ Ledger.boundRational =<<
, _d = maybeToStrictMaybe $ Ledger.boundRational =<<
protocolUpdateDecentralization
, _extraEntropy = toLedgerNonce <$>
noInlineMaybeToStrictMaybe protocolUpdateExtraPraosEntropy
maybeToStrictMaybe protocolUpdateExtraPraosEntropy
, _protocolVersion = uncurry Ledger.ProtVer <$>
noInlineMaybeToStrictMaybe protocolUpdateProtocolVersion
maybeToStrictMaybe protocolUpdateProtocolVersion
, _minUTxOValue = toShelleyLovelace <$>
noInlineMaybeToStrictMaybe protocolUpdateMinUTxOValue
maybeToStrictMaybe protocolUpdateMinUTxOValue
, _minPoolCost = toShelleyLovelace <$>
noInlineMaybeToStrictMaybe protocolUpdateMinPoolCost
maybeToStrictMaybe protocolUpdateMinPoolCost
}


Expand Down Expand Up @@ -996,46 +995,46 @@ toAlonzoPParamsUpdate
, protocolUpdateMaxCollateralInputs
} =
AlonzoPParams {
_minfeeA = noInlineMaybeToStrictMaybe protocolUpdateTxFeePerByte
, _minfeeB = noInlineMaybeToStrictMaybe protocolUpdateTxFeeFixed
, _maxBBSize = noInlineMaybeToStrictMaybe protocolUpdateMaxBlockBodySize
, _maxTxSize = noInlineMaybeToStrictMaybe protocolUpdateMaxTxSize
, _maxBHSize = noInlineMaybeToStrictMaybe protocolUpdateMaxBlockHeaderSize
_minfeeA = maybeToStrictMaybe protocolUpdateTxFeePerByte
, _minfeeB = maybeToStrictMaybe protocolUpdateTxFeeFixed
, _maxBBSize = maybeToStrictMaybe protocolUpdateMaxBlockBodySize
, _maxTxSize = maybeToStrictMaybe protocolUpdateMaxTxSize
, _maxBHSize = maybeToStrictMaybe protocolUpdateMaxBlockHeaderSize
, _keyDeposit = toShelleyLovelace <$>
noInlineMaybeToStrictMaybe protocolUpdateStakeAddressDeposit
maybeToStrictMaybe protocolUpdateStakeAddressDeposit
, _poolDeposit = toShelleyLovelace <$>
noInlineMaybeToStrictMaybe protocolUpdateStakePoolDeposit
, _eMax = noInlineMaybeToStrictMaybe protocolUpdatePoolRetireMaxEpoch
, _nOpt = noInlineMaybeToStrictMaybe protocolUpdateStakePoolTargetNum
, _a0 = noInlineMaybeToStrictMaybe $ Ledger.boundRational =<<
maybeToStrictMaybe protocolUpdateStakePoolDeposit
, _eMax = maybeToStrictMaybe protocolUpdatePoolRetireMaxEpoch
, _nOpt = maybeToStrictMaybe protocolUpdateStakePoolTargetNum
, _a0 = maybeToStrictMaybe $ Ledger.boundRational =<<
protocolUpdatePoolPledgeInfluence
, _rho = noInlineMaybeToStrictMaybe $ Ledger.boundRational =<<
, _rho = maybeToStrictMaybe $ Ledger.boundRational =<<
protocolUpdateMonetaryExpansion
, _tau = noInlineMaybeToStrictMaybe $ Ledger.boundRational =<<
, _tau = maybeToStrictMaybe $ Ledger.boundRational =<<
protocolUpdateTreasuryCut
, _d = noInlineMaybeToStrictMaybe $ Ledger.boundRational =<<
, _d = maybeToStrictMaybe $ Ledger.boundRational =<<
protocolUpdateDecentralization
, _extraEntropy = toLedgerNonce <$>
noInlineMaybeToStrictMaybe protocolUpdateExtraPraosEntropy
maybeToStrictMaybe protocolUpdateExtraPraosEntropy
, _protocolVersion = uncurry Ledger.ProtVer <$>
noInlineMaybeToStrictMaybe protocolUpdateProtocolVersion
maybeToStrictMaybe protocolUpdateProtocolVersion
, _minPoolCost = toShelleyLovelace <$>
noInlineMaybeToStrictMaybe protocolUpdateMinPoolCost
maybeToStrictMaybe protocolUpdateMinPoolCost
, _coinsPerUTxOWord = toShelleyLovelace <$>
noInlineMaybeToStrictMaybe protocolUpdateUTxOCostPerWord
maybeToStrictMaybe protocolUpdateUTxOCostPerWord
, _costmdls = if Map.null protocolUpdateCostModels
then Ledger.SNothing
else either (const Ledger.SNothing) Ledger.SJust
(toAlonzoCostModels protocolUpdateCostModels)
, _prices = noInlineMaybeToStrictMaybe $
, _prices = maybeToStrictMaybe $
toAlonzoPrices =<< protocolUpdatePrices
, _maxTxExUnits = toAlonzoExUnits <$>
noInlineMaybeToStrictMaybe protocolUpdateMaxTxExUnits
maybeToStrictMaybe protocolUpdateMaxTxExUnits
, _maxBlockExUnits = toAlonzoExUnits <$>
noInlineMaybeToStrictMaybe protocolUpdateMaxBlockExUnits
, _maxValSize = noInlineMaybeToStrictMaybe protocolUpdateMaxValueSize
, _collateralPercentage = noInlineMaybeToStrictMaybe protocolUpdateCollateralPercent
, _maxCollateralInputs = noInlineMaybeToStrictMaybe protocolUpdateMaxCollateralInputs
maybeToStrictMaybe protocolUpdateMaxBlockExUnits
, _maxValSize = maybeToStrictMaybe protocolUpdateMaxValueSize
, _collateralPercentage = maybeToStrictMaybe protocolUpdateCollateralPercent
, _maxCollateralInputs = maybeToStrictMaybe protocolUpdateMaxCollateralInputs
}

-- Decentralization and extra entropy are deprecated in Babbage
Expand Down Expand Up @@ -1067,42 +1066,42 @@ toBabbagePParamsUpdate
, protocolUpdateUTxOCostPerByte
} =
BabbagePParams {
_minfeeA = noInlineMaybeToStrictMaybe protocolUpdateTxFeePerByte
, _minfeeB = noInlineMaybeToStrictMaybe protocolUpdateTxFeeFixed
, _maxBBSize = noInlineMaybeToStrictMaybe protocolUpdateMaxBlockBodySize
, _maxTxSize = noInlineMaybeToStrictMaybe protocolUpdateMaxTxSize
, _maxBHSize = noInlineMaybeToStrictMaybe protocolUpdateMaxBlockHeaderSize
_minfeeA = maybeToStrictMaybe protocolUpdateTxFeePerByte
, _minfeeB = maybeToStrictMaybe protocolUpdateTxFeeFixed
, _maxBBSize = maybeToStrictMaybe protocolUpdateMaxBlockBodySize
, _maxTxSize = maybeToStrictMaybe protocolUpdateMaxTxSize
, _maxBHSize = maybeToStrictMaybe protocolUpdateMaxBlockHeaderSize
, _keyDeposit = toShelleyLovelace <$>
noInlineMaybeToStrictMaybe protocolUpdateStakeAddressDeposit
maybeToStrictMaybe protocolUpdateStakeAddressDeposit
, _poolDeposit = toShelleyLovelace <$>
noInlineMaybeToStrictMaybe protocolUpdateStakePoolDeposit
, _eMax = noInlineMaybeToStrictMaybe protocolUpdatePoolRetireMaxEpoch
, _nOpt = noInlineMaybeToStrictMaybe protocolUpdateStakePoolTargetNum
, _a0 = noInlineMaybeToStrictMaybe $ Ledger.boundRational =<<
maybeToStrictMaybe protocolUpdateStakePoolDeposit
, _eMax = maybeToStrictMaybe protocolUpdatePoolRetireMaxEpoch
, _nOpt = maybeToStrictMaybe protocolUpdateStakePoolTargetNum
, _a0 = maybeToStrictMaybe $ Ledger.boundRational =<<
protocolUpdatePoolPledgeInfluence
, _rho = noInlineMaybeToStrictMaybe $ Ledger.boundRational =<<
, _rho = maybeToStrictMaybe $ Ledger.boundRational =<<
protocolUpdateMonetaryExpansion
, _tau = noInlineMaybeToStrictMaybe $ Ledger.boundRational =<<
, _tau = maybeToStrictMaybe $ Ledger.boundRational =<<
protocolUpdateTreasuryCut
, _protocolVersion = uncurry Ledger.ProtVer <$>
noInlineMaybeToStrictMaybe protocolUpdateProtocolVersion
maybeToStrictMaybe protocolUpdateProtocolVersion
, _minPoolCost = toShelleyLovelace <$>
noInlineMaybeToStrictMaybe protocolUpdateMinPoolCost
maybeToStrictMaybe protocolUpdateMinPoolCost
, _costmdls = if Map.null protocolUpdateCostModels
then Ledger.SNothing
else either (const Ledger.SNothing) Ledger.SJust
(toAlonzoCostModels protocolUpdateCostModels)
, _prices = noInlineMaybeToStrictMaybe $
, _prices = maybeToStrictMaybe $
toAlonzoPrices =<< protocolUpdatePrices
, _maxTxExUnits = toAlonzoExUnits <$>
noInlineMaybeToStrictMaybe protocolUpdateMaxTxExUnits
maybeToStrictMaybe protocolUpdateMaxTxExUnits
, _maxBlockExUnits = toAlonzoExUnits <$>
noInlineMaybeToStrictMaybe protocolUpdateMaxBlockExUnits
, _maxValSize = noInlineMaybeToStrictMaybe protocolUpdateMaxValueSize
, _collateralPercentage = noInlineMaybeToStrictMaybe protocolUpdateCollateralPercent
, _maxCollateralInputs = noInlineMaybeToStrictMaybe protocolUpdateMaxCollateralInputs
maybeToStrictMaybe protocolUpdateMaxBlockExUnits
, _maxValSize = maybeToStrictMaybe protocolUpdateMaxValueSize
, _collateralPercentage = maybeToStrictMaybe protocolUpdateCollateralPercent
, _maxCollateralInputs = maybeToStrictMaybe protocolUpdateMaxCollateralInputs
, _coinsPerUTxOByte = toShelleyLovelace <$>
noInlineMaybeToStrictMaybe protocolUpdateUTxOCostPerByte
maybeToStrictMaybe protocolUpdateUTxOCostPerByte
}

-- ----------------------------------------------------------------------------
Expand Down Expand Up @@ -1876,3 +1875,4 @@ checkProtocolParameters sbe ProtocolParameters{..} =
then return ()
else Left . PParamsErrorMissingMinUTxoValue
$ AnyCardanoEra era

0 comments on commit 1bd0fc4

Please sign in to comment.