|
| 1 | +# Running commands |
| 2 | + |
| 3 | +Command bot has been migrated, it is no longer a comment parser and now it is a GitHub action that works as a [`workflow_dispatch`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch) event. |
| 4 | + |
| 5 | +## How to run an action |
| 6 | + |
| 7 | +To run an action, you need to go to the [_actions tab_](https://github.com/paritytech/polkadot-sdk/actions) and pick the one you desire to run. |
| 8 | + |
| 9 | +The current available command actions are: |
| 10 | + |
| 11 | +- [Command FMT](https://github.com/paritytech/polkadot-sdk/actions/workflows/command-fmt.yml) |
| 12 | +- [Command Update UI](https://github.com/paritytech/polkadot-sdk/actions/workflows/command-update-ui.yml) |
| 13 | +- [Command Bench](https://github.com/paritytech/polkadot-sdk/actions/workflows/command-bench.yml) |
| 14 | +- [Command Bench All](https://github.com/paritytech/polkadot-sdk/actions/workflows/command-bench-all.yml) |
| 15 | +- [Command Bench Overhead](https://github.com/paritytech/polkadot-sdk/actions/workflows/command-bench-overhead.yml) |
| 16 | + |
| 17 | +You need to select the action, and click on the dropdown that says: `Run workflow`. It is located in the upper right. |
| 18 | + |
| 19 | +If this dropdown is not visible, you may not have permission to run the action. Contact IT for help. |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | +Each command will have the same two required values, but it could have more. |
| 24 | + |
| 25 | +GitHub's official documentation: [Manually running a workflow](https://docs.github.com/en/actions/using-workflows/manually-running-a-workflow) |
| 26 | + |
| 27 | +### Number of the Pull Request |
| 28 | + |
| 29 | +The number of the pull request. Required so the action can fetch the correct branch and comment if it fails. |
| 30 | + |
| 31 | +## Action configurations |
| 32 | + |
| 33 | +### Bench |
| 34 | + |
| 35 | +Runs `benchmark pallet` or `benchmark overhead` against your PR and commits back updated weights. |
| 36 | + |
| 37 | +Posible combinations based on the `benchmark` dropdown. |
| 38 | + |
| 39 | +- `substrate-pallet`: Pallet Benchmark for Substrate for specific pallet |
| 40 | + - Requires `Subcommand` to be `pallet` |
| 41 | + - Requires `Runtime` to be `dev` |
| 42 | + - Requires field `Pallet` to have an input that applies to `^([a-z_]+)([:]{2}[a-z_]+)?$` |
| 43 | + - Requires `Target Directory` to be `substrate` |
| 44 | +- `polkadot-pallet`: Pallet Benchmark for Polkadot for specific pallet |
| 45 | + - Requires `Subcommand` to be one of the following: |
| 46 | + - `pallet` |
| 47 | + - `xcm` |
| 48 | + - Requires `Runtime` to be one of the following: |
| 49 | + - `rococo` |
| 50 | + - `westend` |
| 51 | + - Requires field `Pallet` to have an input that applies to `^([a-z_]+)([:]{2}[a-z_]+)?$` |
| 52 | + - Requires `Target Directory` to be `polkadot` |
| 53 | +- `cumulus-assets`: Pallet Benchmark for Cumulus assets |
| 54 | + - Requires `Subcommand` to be one of the following: |
| 55 | + - `pallet` |
| 56 | + - `xcm` |
| 57 | + - Requires `Runtime` to be one of the following: |
| 58 | + - `asset-hub-westend` |
| 59 | + - `asset-hub-rococo` |
| 60 | + - Requires field `Pallet` to have an input that applies to `^([a-z_]+)([:]{2}[a-z_]+)?$` |
| 61 | + - Requires `Runtime Dir` to be `assets` |
| 62 | + - Requires `Target Directory` to be `cumulus` |
| 63 | +- `cumulus-collectives`: Pallet Benchmark for Cumulus collectives |
| 64 | + - Requires `Subcommand` to be one of the following: |
| 65 | + - `pallet` |
| 66 | + - `xcm` |
| 67 | + - Requires `Runtime` to be `collectives-westend` |
| 68 | + - Requires field `Pallet` to have an input that applies to `^([a-z_]+)([:]{2}[a-z_]+)?$` |
| 69 | + - Requires `Runtime Dir` to be `collectives` |
| 70 | + - Requires `Target Directory` to be `cumulus` |
| 71 | +- `cumulus-coretime`: Pallet Benchmark for Cumulus coretime |
| 72 | + - Requires `Subcommand` to be one of the following: |
| 73 | + - `pallet` |
| 74 | + - `xcm` |
| 75 | + - Requires `Runtime` to be one of the following: |
| 76 | + - `coretime-rococo` |
| 77 | + - `coretime-westend` |
| 78 | + - Requires field `Pallet` to have an input that applies to `^([a-z_]+)([:]{2}[a-z_]+)?$` |
| 79 | + - Requires `Runtime Dir` to be `coretime` |
| 80 | + - Requires `Target Directory` to be `cumulus` |
| 81 | +- `cumulus-bridge-hubs`: Pallet Benchmark for Cumulus bridge-hubs |
| 82 | + - Requires `Subcommand` to be one of the following: |
| 83 | + - `pallet` |
| 84 | + - `xcm` |
| 85 | + - Requires `Runtime` to be one of the following: |
| 86 | + - `bridge-hub-rococo` |
| 87 | + - `bridge-hub-westend` |
| 88 | + - Requires field `Pallet` to have an input that applies to `^([a-z_]+)([:]{2}[a-z_]+)?$` |
| 89 | + - Requires `Runtime Dir` to be `bridge-hub` |
| 90 | + - Requires `Target Directory` to be `cumulus` |
| 91 | +- `cumulus-contracts`: Pallet Benchmark for Cumulus contracts |
| 92 | + - Requires `Subcommand` to be one of the following: |
| 93 | + - `pallet` |
| 94 | + - `xcm` |
| 95 | + - Requires `Runtime` to be one `contracts-rococo` |
| 96 | + - Requires field `Pallet` to have an input that applies to `^([a-z_]+)([:]{2}[a-z_]+)?$` |
| 97 | + - Requires `Runtime Dir` to be `contracts` |
| 98 | + - Requires `Target Directory` to be `cumulus` |
| 99 | +- `cumulus-glutton`: Pallet Benchmark for Cumulus glutton |
| 100 | + - Requires `Subcommand` to be `pallet` |
| 101 | + - Requires `Runtime` to be one of the following: |
| 102 | + - `glutton-westend` |
| 103 | + - `glutton-westend-dev-1300` |
| 104 | + - Requires field `Pallet` to have an input that applies to `^([a-z_]+)([:]{2}[a-z_]+)?$` |
| 105 | + - Requires `Runtime Dir` to be `glutton` |
| 106 | + - Requires `Target Directory` to be `cumulus` |
| 107 | +- `cumulus-starters`: Pallet Benchmark for Cumulus starters |
| 108 | + - Requires `Subcommand` to be one of the following: |
| 109 | + - `pallet` |
| 110 | + - `xcm` |
| 111 | + - Requires `Runtime` to be one of the following: |
| 112 | + - `seedling` |
| 113 | + - `shell` |
| 114 | + - Requires field `Pallet` to have an input that applies to `^([a-z_]+)([:]{2}[a-z_]+)?$` |
| 115 | + - Requires `Runtime Dir` to be `starters` |
| 116 | + - Requires `Target Directory` to be `cumulus` |
| 117 | +- `cumulus-people`: Pallet Benchmark for Cumulus people |
| 118 | + - Requires `Subcommand` to be one of the following: |
| 119 | + - `pallet` |
| 120 | + - `xcm` |
| 121 | + - Requires `Runtime` to be one of the following: |
| 122 | + - `people-westend` |
| 123 | + - `people-rococo` |
| 124 | + - Requires field `Pallet` to have an input that applies to `^([a-z_]+)([:]{2}[a-z_]+)?$` |
| 125 | + - Requires `Runtime Dir` to be `people` |
| 126 | + - Requires `Target Directory` to be `cumulus` |
| 127 | +- `cumulus-testing`: Pallet Benchmark for Cumulus testing |
| 128 | + - Requires `Subcommand` to be one of the following: |
| 129 | + - `pallet` |
| 130 | + - `xcm` |
| 131 | + - Requires `Runtime` to be one of the following: |
| 132 | + - `penpal` |
| 133 | + - `rococo-parachain` |
| 134 | + - Requires field `Pallet` to have an input that applies to `^([a-z_]+)([:]{2}[a-z_]+)?$` |
| 135 | + - Requires `Runtime Dir` to be `testing` |
| 136 | + - Requires `Target Directory` to be `cumulus` |
| 137 | + |
| 138 | +### Bench-all |
| 139 | + |
| 140 | +This is a wrapper to run `bench` for all pallets. |
| 141 | + |
| 142 | +Posible combinations based on the `benchmark` dropdown. |
| 143 | + |
| 144 | +- `pallet`: Benchmark for Substrate/Polkadot/Cumulus/Trappist for specific pallet |
| 145 | + - Requires field `Pallet` to have an input that applies to `^([a-z_]+)([:]{2}[a-z_]+)?$` |
| 146 | +- `substrate`: Pallet + Overhead + Machine Benchmark for Substrate for all pallets |
| 147 | + - Requires `Target Directory` to be `substrate` |
| 148 | +- `polkadot`: Pallet + Overhead Benchmark for Polkadot |
| 149 | + - Requires `Runtime` to be one of the following: |
| 150 | + - `rococo` |
| 151 | + - `westend` |
| 152 | + - Requires `Target Directory` to be `polkadot` |
| 153 | +- `cumulus`: Pallet Benchmark for Cumulus |
| 154 | + - Requires `Runtime` to be one of the following: |
| 155 | + - `rococo` |
| 156 | + - `westend` |
| 157 | + - `asset-hub-kusama` |
| 158 | + - `asset-hub-polkadot` |
| 159 | + - `asset-hub-rococo` |
| 160 | + - `asset-hub-westend` |
| 161 | + - `bridge-hub-kusama` |
| 162 | + - `bridge-hub-polkadot` |
| 163 | + - `bridge-hub-rococo` |
| 164 | + - `bridge-hub-westend` |
| 165 | + - `collectives-polkadot` |
| 166 | + - `collectives-westend` |
| 167 | + - `coretime-rococo` |
| 168 | + - `coretime-westend` |
| 169 | + - `contracts-rococo` |
| 170 | + - `glutton-kusama` |
| 171 | + - `glutton-westend` |
| 172 | + - `people-rococo` |
| 173 | + - `people-westend` |
| 174 | + - Requires `Target Directory` to be `cumulus` |
| 175 | + |
| 176 | +### Bench-overhead |
| 177 | + |
| 178 | +Run benchmarks overhead and commit back results to PR. |
| 179 | + |
| 180 | +Posible combinations based on the `benchmark` dropdown. |
| 181 | + |
| 182 | +- `default`: Runs `benchmark overhead` and commits back to PR the updated `extrinsic_weights.rs` files |
| 183 | + - Requires `Runtime` to be one of the following: |
| 184 | + - `rococo` |
| 185 | + - `westend` |
| 186 | + - Requires `Target directory` to be `polkadot` |
| 187 | +- `substrate`: Runs `benchmark overhead` and commits back to PR the updated `extrinsic_weights.rs` files |
| 188 | + - Requires `Target directory` to be `substrate` |
| 189 | +- `cumulus`: Runs `benchmark overhead` and commits back to PR the updated `extrinsic_weights.rs` files |
| 190 | + - Requires `Runtime` to be one of the following: |
| 191 | + - `asset-hub-rococo` |
| 192 | + - `asset-hub-westend` |
| 193 | + - Requires `Target directory` to be `cumulus` |
| 194 | + |
| 195 | +## How to modify an action |
| 196 | + |
| 197 | +If you want to modify an action and test it, you can do by simply pushing your changes and then selecting your branch in the `Use worflow from` option. |
| 198 | + |
| 199 | +This will use a file from a specified branch. |
0 commit comments