Temporary tx-generator & genesis hacks to be able to start a cluster … #22828
This file contains hidden or 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: Check mainnet configuration | |
| on: | |
| push: | |
| merge_group: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Install Nix | |
| uses: cachix/install-nix-action@v27 | |
| with: | |
| # Use last stable nixos channel and the same nix as in channel: | |
| nix_path: nixpkgs=channel:nixos-24.05 | |
| github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
| extra_nix_config: | | |
| access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
| experimental-features = nix-command flakes | |
| allow-import-from-derivation = true | |
| substituters = https://cache.nixos.org https://cache.iog.io | |
| trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= | |
| - uses: actions/checkout@v4 | |
| - name: Refresh cardano-node mainnet configuration | |
| run: | | |
| nix build --no-update-lock-file .#hydraJobs.cardano-deployment | |
| - name: Check if configuration from nix is a superset of in-repo configuration | |
| run: | | |
| set -uo pipefail | |
| test_files=( | |
| 'mainnet-alonzo-genesis.json' | |
| 'mainnet-byron-genesis.json' | |
| 'mainnet-checkpoints.json' | |
| 'mainnet-config-bp.json' | |
| 'mainnet-config-bp-legacy.json' | |
| 'mainnet-config.json' | |
| 'mainnet-config-legacy.json' | |
| 'mainnet-peer-snapshot.json' | |
| 'mainnet-shelley-genesis.json' | |
| 'mainnet-topology.json' | |
| ) | |
| for f in "${test_files[@]}"; do | |
| nix_file="result/$f" | |
| repo_file="configuration/cardano/$f" | |
| if ! jq -e --slurpfile nix "$nix_file" --slurpfile repo "$repo_file" -n '$repo | reduce keys[] as $k (true; . and $repo[$k] == $nix[$k])' &>/dev/null ; then | |
| echo "Nix file $nix_file does not have all the same top-level entries as the file from repository $repo_file" | |
| diff "$nix_file" "$repo_file" | |
| exit 1 | |
| fi | |
| done |