feat(webrtc): derive DTLS certificate deterministically from node key #16366
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-runtime-compatibility | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| merge_group: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: {} | |
| jobs: | |
| isdraft: | |
| uses: ./.github/workflows/reusable-isdraft.yml | |
| preflight: | |
| needs: isdraft | |
| uses: ./.github/workflows/reusable-preflight.yml | |
| check-runtime-compatibility: | |
| runs-on: ${{ needs.preflight.outputs.RUNNER }} | |
| if: ${{ needs.preflight.outputs.changes_rust }} | |
| timeout-minutes: 30 | |
| needs: [preflight] | |
| container: | |
| image: ${{ needs.preflight.outputs.IMAGE }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| network: | |
| [ | |
| westend, | |
| asset-hub-westend, | |
| bridge-hub-westend, | |
| collectives-westend, | |
| coretime-westend, | |
| people-westend, | |
| ] | |
| include: | |
| - network: westend | |
| package: westend-runtime | |
| wasm: westend_runtime.compact.compressed.wasm | |
| uri: "wss://try-runtime-westend.polkadot.io:443" | |
| - network: asset-hub-westend | |
| package: asset-hub-westend-runtime | |
| wasm: asset_hub_westend_runtime.compact.compressed.wasm | |
| uri: "wss://westend-asset-hub-rpc.polkadot.io:443" | |
| - network: bridge-hub-westend | |
| package: bridge-hub-westend-runtime | |
| wasm: bridge_hub_westend_runtime.compact.compressed.wasm | |
| uri: "wss://westend-bridge-hub-rpc.polkadot.io:443" | |
| - network: collectives-westend | |
| package: collectives-westend-runtime | |
| wasm: collectives_westend_runtime.compact.compressed.wasm | |
| uri: "wss://westend-collectives-rpc.polkadot.io:443" | |
| - network: coretime-westend | |
| package: coretime-westend-runtime | |
| wasm: coretime_westend_runtime.compact.compressed.wasm | |
| uri: "wss://westend-coretime-rpc.polkadot.io:443" | |
| - network: people-westend | |
| package: people-westend-runtime | |
| wasm: people_westend_runtime.compact.compressed.wasm | |
| uri: "wss://westend-people-rpc.polkadot.io:443" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Build Runtime | |
| id: build-runtime | |
| run: | | |
| echo "---------- Building ${{ matrix.package }} runtime with on-chain-release-build ----------" | |
| forklift cargo build --release --locked -p ${{ matrix.package }} --features on-chain-release-build -q | |
| - name: Setup Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: "24.x" | |
| registry-url: "https://npm.pkg.github.com" | |
| - name: Check Runtime Compatibility | |
| id: check-compatibility | |
| run: | | |
| echo "---------- Checking runtime compatibility for ${{ matrix.network }} ----------" | |
| set +e | |
| # check-runtime hangs indefinitely if the RPC node is unreachable. | |
| timeout 120 npx @polkadot-api/check-runtime@latest problems ${{ matrix.uri }} --wasm ./target/release/wbuild/${{ matrix.package }}/${{ matrix.wasm }} | |
| EXIT_CODE=$? | |
| set -e | |
| # When the time limit is reached, timeout returns exit code 124 | |
| if [ $EXIT_CODE -eq 124 ]; then | |
| echo "::error::Timed out connecting to ${{ matrix.uri }} for ${{ matrix.network }}" | |
| fi | |
| exit $EXIT_CODE | |
| - name: Stop all workflows if failed | |
| if: ${{ failure() && (steps.build-runtime.conclusion == 'failure' || steps.check-compatibility.conclusion == 'failure') }} | |
| uses: ./.github/actions/workflow-stopper | |
| with: | |
| app-id: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_ID }} | |
| app-key: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_KEY }} | |
| # name of this job must be unique across all workflows | |
| # otherwise GitHub will mark all these jobs as required | |
| confirm-runtime-compatibility-checks-passed: | |
| runs-on: ubuntu-latest | |
| name: All runtime compatibility checks passed | |
| needs: [check-runtime-compatibility] | |
| if: always() && !cancelled() | |
| steps: | |
| - run: | | |
| tee resultfile <<< '${{ toJSON(needs) }}' | |
| FAILURES=$(cat resultfile | grep -E '"result": "(failure|cancelled)"' | wc -l) | |
| if [ $FAILURES -gt 0 ]; then | |
| echo "### At least one required job failed ❌" >> $GITHUB_STEP_SUMMARY | |
| exit 1 | |
| else | |
| echo '### Good job! All the required jobs passed 🚀' >> $GITHUB_STEP_SUMMARY | |
| fi |