diff --git a/.github/workflows/binary-zip.yml b/.github/workflows/binary-zip.yml index 0f8d6a2ae..6adde44f9 100644 --- a/.github/workflows/binary-zip.yml +++ b/.github/workflows/binary-zip.yml @@ -1,6 +1,7 @@ name: Build zip with all artifacts on: + workflow_dispatch: inputs: partner_chains_smart_contracts_sha: @@ -163,21 +164,21 @@ jobs: token: ${{ secrets.ACTIONS_PAT }} ref: ${{ github.event.inputs.partner_chains_smart_contracts_sha }} path: partner-chains-smart-contracts - + - name: Build run: nix build ./partner-chains-smart-contracts#sidechain-release-bundle - + - name: Prepare Artifact run: | mkdir -p partner-chains-smart-contracts-artifact cp result/* partner-chains-smart-contracts-artifact - + - name: Upload Directory as Artifact uses: actions/upload-artifact@v4 with: name: partner-chains-smart-contracts-artifact path: partner-chains-smart-contracts-artifact/ - + - name: Post-build Cleanup run: rm -rf partner-chains-smart-contracts-artifact @@ -189,31 +190,31 @@ jobs: curl -LO https://nodejs.org/dist/v20.12.2/node-v20.12.2-linux-x64.tar.xz tar -xf node-v20.12.2-linux-x64.tar.xz mv node-v20.12.2-linux-x64 nodejs-linux - + - name: Download Node.js binary for x86_64 macOS run: | curl -LO https://nodejs.org/dist/v20.12.2/node-v20.12.2-darwin-x64.tar.gz tar -xf node-v20.12.2-darwin-x64.tar.gz mv node-v20.12.2-darwin-x64 nodejs-macos-x86_64 - + - name: Download Node.js binary for ARM macOS run: | curl -LO https://nodejs.org/dist/v20.12.2/node-v20.12.2-darwin-arm64.tar.gz tar -xf node-v20.12.2-darwin-arm64.tar.gz mv node-v20.12.2-darwin-arm64 nodejs-macos-arm64 - + - name: Upload Node.js binary for Linux uses: actions/upload-artifact@v4 with: name: nodejs-linux path: nodejs-linux/ - + - name: Upload Node.js binary for x86_64 macOS uses: actions/upload-artifact@v4 with: name: nodejs-macos-x86_64 path: nodejs-macos-x86_64/ - + - name: Upload Node.js binary for ARM macOS uses: actions/upload-artifact@v4 with: @@ -228,7 +229,7 @@ jobs: uses: actions/download-artifact@v4 with: path: combined-artifacts/ - + - name: Unzip and Prepare Trustless Artifact run: | mkdir -p combined-artifacts/partner-chains-smart-contracts-artifact-dir @@ -238,7 +239,7 @@ jobs: mv combined-artifacts/partner-chains-smart-contracts-artifact-dir/node_modules combined-artifacts/ rm -rf combined-artifacts/partner-chains-smart-contracts-artifact-dir/release.zip rm -rf combined-artifacts/partner-chains-smart-contracts-artifact-dir - + - name: Create Linux ZIP run: | mkdir -p combined-artifacts/linux_x86_64-dir @@ -250,13 +251,13 @@ jobs: ls -la combined-artifacts/linux_x86_64-dir cd combined-artifacts/linux_x86_64-dir zip -r ../../linux_x86_64.zip . - + - name: Upload Linux ZIP uses: actions/upload-artifact@v4 with: name: linux_x86_64 path: linux_x86_64.zip - + - name: Create macOS x86_64 ZIP run: | mkdir -p combined-artifacts/macos_x86_64-dir @@ -268,13 +269,13 @@ jobs: ls -la combined-artifacts/macos_x86_64-dir cd combined-artifacts/macos_x86_64-dir zip -r ../../macos_x86_64.zip . - + - name: Upload macOS x86_64 ZIP uses: actions/upload-artifact@v4 with: name: macos_x86_64 path: macos_x86_64.zip - + - name: Create macOS ARM64 ZIP run: | mkdir -p combined-artifacts/macos_arm64-dir @@ -286,7 +287,7 @@ jobs: ls -la combined-artifacts/macos_arm64-dir cd combined-artifacts/macos_arm64-dir zip -r ../../macos_arm64.zip . - + - name: Upload macOS ARM64 ZIP uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/devnet-deploy.yml b/.github/workflows/devnet-deploy.yml index 15b8023bc..9fd0bb874 100644 --- a/.github/workflows/devnet-deploy.yml +++ b/.github/workflows/devnet-deploy.yml @@ -1,6 +1,7 @@ name: Deploy Devnet on: + workflow_dispatch: inputs: terms1: @@ -45,7 +46,7 @@ jobs: exit 1 fi echo "All terms and conditions accepted." - + - name: Confirm Inputs and Evaluate Conditions id: evaluate-conditions run: | @@ -56,19 +57,19 @@ jobs: echo "wipe: ${{ github.event.inputs.wipe }}" echo "rolling: ${{ github.event.inputs.rolling }}" echo "Evaluating Deployment Type..." - + if [[ "${{ github.event.inputs.wipe }}" == 'true' ]]; then echo "wipe=true" >> $GITHUB_ENV else echo "wipe=false" >> $GITHUB_ENV fi - + if [[ "${{ github.event.inputs.rolling }}" == 'true' ]]; then echo "rolling=true" >> $GITHUB_ENV else echo "rolling=false" >> $GITHUB_ENV fi - + if [[ "${{ github.event.inputs.wipe }}" == 'true' && "${{ github.event.inputs.chain-spec-secret-name }}" != '' && "${{ github.event.inputs.substrate-node-image }}" != '' ]]; then echo "deployment_type=1" >> $GITHUB_ENV echo "Step: Deploy with chain-spec and image override will be run" @@ -138,7 +139,7 @@ jobs: kubectl delete pvc henry-claim-substrate-node-data -n sc echo "Waiting for all PVCs to delete..." kubectl wait --for=delete pvc/alice-claim-substrate-node-data pvc/bob-claim-substrate-node-data pvc/charlie-claim-substrate-node-data pvc/dave-claim-substrate-node-data pvc/eve-claim-substrate-node-data pvc/ferdie-claim-substrate-node-data pvc/greg-claim-substrate-node-data pvc/henry-claim-substrate-node-data -n sc --timeout=120s - + - name: Deploy with chain-spec and image override if: env.deployment_type == 1 run: | @@ -151,7 +152,7 @@ jobs: helm upgrade --install ferdie . -f values/chains/devnet.yaml -f values/nodes/devnet/ferdie.yaml --set images.substrateNode="${{ github.event.inputs.substrate-node-image }}" --set chain.chainspec_secretName="${{ github.event.inputs.chain-spec-secret-name }}" helm upgrade --install greg . -f values/chains/devnet.yaml -f values/nodes/devnet/greg.yaml --set images.substrateNode="${{ github.event.inputs.substrate-node-image }}" --set chain.chainspec_secretName="${{ github.event.inputs.chain-spec-secret-name }}" helm upgrade --install henry . -f values/chains/devnet.yaml -f values/nodes/devnet/henry.yaml --set images.substrateNode="${{ github.event.inputs.substrate-node-image }}" --set chain.chainspec_secretName="${{ github.event.inputs.chain-spec-secret-name }}" - + - name: Deploy with image override if: env.deployment_type == 2 run: | @@ -164,7 +165,7 @@ jobs: helm upgrade --install ferdie . -f values/chains/devnet.yaml -f values/nodes/devnet/ferdie.yaml --set images.substrateNode="${{ github.event.inputs.substrate-node-image }}" helm upgrade --install greg . -f values/chains/devnet.yaml -f values/nodes/devnet/greg.yaml --set images.substrateNode="${{ github.event.inputs.substrate-node-image }}" helm upgrade --install henry . -f values/chains/devnet.yaml -f values/nodes/devnet/henry.yaml --set images.substrateNode="${{ github.event.inputs.substrate-node-image }}" - + - name: Deploy from master with no value overrides if: env.deployment_type == 3 run: | @@ -182,25 +183,25 @@ jobs: run: | echo "Waiting for Alice..." kubectl wait --for=condition=ready pod alice -n sc --timeout=300s - + echo "Waiting for Bob..." kubectl wait --for=condition=ready pod bob -n sc --timeout=300s - + echo "Waiting for Charlie..." kubectl wait --for=condition=ready pod charlie -n sc --timeout=300s - + echo "Waiting for Dave..." kubectl wait --for=condition=ready pod dave -n sc --timeout=300s - + echo "Waiting for Eve..." kubectl wait --for=condition=ready pod eve -n sc --timeout=300s - + echo "Waiting for Ferdie..." kubectl wait --for=condition=ready pod ferdie -n sc --timeout=300s - + echo "Waiting for Greg..." kubectl wait --for=condition=ready pod greg -n sc --timeout=300s - + echo "Waiting for Henry..." kubectl wait --for=condition=ready pod henry -n sc --timeout=300s @@ -208,25 +209,25 @@ jobs: run: | echo "Checking Alice..." kubectl get pod alice -n sc -o jsonpath="{.status.containerStatuses[*].ready}" - + echo "Checking Bob..." kubectl get pod bob -n sc -o jsonpath="{.status.containerStatuses[*].ready}" - + echo "Checking Charlie..." kubectl get pod charlie -n sc -o jsonpath="{.status.containerStatuses[*].ready}" - + echo "Checking Dave..." kubectl get pod dave -n sc -o jsonpath="{.status.containerStatuses[*].ready}" - + echo "Checking Eve..." kubectl get pod eve -n sc -o jsonpath="{.status.containerStatuses[*].ready}" - + echo "Checking Ferdie..." kubectl get pod ferdie -n sc -o jsonpath="{.status.containerStatuses[*].ready}" - + echo "Checking Greg..." kubectl get pod greg -n sc -o jsonpath="{.status.containerStatuses[*].ready}" - + echo "Checking Henry..." kubectl get pod henry -n sc -o jsonpath="{.status.containerStatuses[*].ready}" diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index caadec92f..1b1bcc3ed 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -1,6 +1,7 @@ name: e2e tests on: + workflow_call: inputs: node-host: diff --git a/.github/workflows/earthly.yml b/.github/workflows/earthly.yml index aab44cfc1..464ecef8f 100644 --- a/.github/workflows/earthly.yml +++ b/.github/workflows/earthly.yml @@ -36,7 +36,7 @@ jobs: with: ssh_key: ${{ secrets.SUBSTRATE_REPO_SSH_KEY }} config_tar: ${{ secrets.EARTHLY_TAR }} - + - name: Build With Benchmarking Features Enabled if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci-off') && (github.ref_name == 'master' || inputs.upload == 'true') }} env: @@ -88,7 +88,7 @@ jobs: done docker stop weight_generation docker rm weight_generation - + - name: Upload Weights if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci-off') && (github.ref_name == 'master' || inputs.upload == 'true') }} continue-on-error: true @@ -96,7 +96,7 @@ jobs: with: name: weights path: weights/ - + - name: Overwrite Weights in Runtime Directory continue-on-error: true if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci-off') && (github.ref_name == 'master' || inputs.upload == 'true') }} diff --git a/.github/workflows/ghcr.yml b/.github/workflows/ghcr.yml index 9b5979f71..6aa69b61c 100644 --- a/.github/workflows/ghcr.yml +++ b/.github/workflows/ghcr.yml @@ -1,6 +1,7 @@ name: Build and Publish to GHCR Public Repository on: + workflow_dispatch: inputs: commit_sha: diff --git a/.github/workflows/partner-chains-node-binary-host.yml b/.github/workflows/partner-chains-node-binary-host.yml index 5cd972eea..b6e9acaf2 100644 --- a/.github/workflows/partner-chains-node-binary-host.yml +++ b/.github/workflows/partner-chains-node-binary-host.yml @@ -1,6 +1,7 @@ name: Build partner-chains-node and partner-chains-cli and push to binary-host on: + workflow_dispatch: inputs: push_to_binary_host: diff --git a/.github/workflows/publish-doc.yml b/.github/workflows/publish-doc.yml index dc2ece417..2ab7fb521 100644 --- a/.github/workflows/publish-doc.yml +++ b/.github/workflows/publish-doc.yml @@ -1,6 +1,7 @@ name: Publish Documentation on: + push: branches: - master diff --git a/.github/workflows/sidechain-main-cli-binary-host.yml b/.github/workflows/sidechain-main-cli-binary-host.yml index 3e29da823..566b4ae4e 100644 --- a/.github/workflows/sidechain-main-cli-binary-host.yml +++ b/.github/workflows/sidechain-main-cli-binary-host.yml @@ -26,12 +26,12 @@ jobs: - name: Build run: nix build ./partner-chains-smart-contracts#sidechain-release-bundle - + - name: Prepare Artifact run: | mkdir -p partner-chains-smart-contracts-artifact cp result/* partner-chains-smart-contracts-artifact - + - name: Upload Directory as Artifact uses: actions/upload-artifact@v4 with: @@ -80,7 +80,7 @@ jobs: chmod +x ./kubectl sudo mv ./kubectl /usr/local/bin/kubectl sudo apt update && sudo apt install -y awscli - + - name: Configure kubectl run: | echo "${{ secrets.kubeconfig_base64 }}" | base64 --decode > ${{ runner.temp }}/kubeconfig.yaml @@ -93,8 +93,8 @@ jobs: uses: actions/download-artifact@v4 with: name: unzipped - path: artifact/unzipped - + path: artifact/unzipped + - name: Create SHA directory on binary-host run: | kubectl exec binary-host -c binary-host -n sc -- mkdir -p /tools/sidechain-main-cli/${{ github.event.inputs.commit_sha }} diff --git a/.github/workflows/staging-deploy.yml b/.github/workflows/staging-deploy.yml index 6f1442021..b17abe311 100644 --- a/.github/workflows/staging-deploy.yml +++ b/.github/workflows/staging-deploy.yml @@ -1,6 +1,7 @@ name: Deploy Staging on: + workflow_dispatch: inputs: terms1: @@ -45,7 +46,7 @@ jobs: exit 1 fi echo "All terms and conditions accepted." - + - name: Confirm Inputs and Evaluate Conditions id: evaluate-conditions run: | @@ -56,19 +57,19 @@ jobs: echo "wipe: ${{ github.event.inputs.wipe }}" echo "rolling: ${{ github.event.inputs.rolling }}" echo "Evaluating Deployment Type..." - + if [[ "${{ github.event.inputs.wipe }}" == 'true' ]]; then echo "wipe=true" >> $GITHUB_ENV else echo "wipe=false" >> $GITHUB_ENV fi - + if [[ "${{ github.event.inputs.rolling }}" == 'true' ]]; then echo "rolling=true" >> $GITHUB_ENV else echo "rolling=false" >> $GITHUB_ENV fi - + if [[ "${{ github.event.inputs.wipe }}" == 'true' && "${{ github.event.inputs.chain-spec-secret-name }}" != '' && "${{ github.event.inputs.substrate-node-image }}" != '' ]]; then echo "deployment_type=1" >> $GITHUB_ENV echo "Step: Deploy with chain-spec and image override will be run" @@ -136,7 +137,7 @@ jobs: kubectl delete pvc validator-7-claim-substrate-node-data -n staging echo "Waiting for PVCs to delete..." kubectl wait --for=delete pvc/validator-1-claim-substrate-node-data pvc/validator-2-claim-substrate-node-data pvc/validator-3-claim-substrate-node-data pvc/validator-4-claim-substrate-node-data pvc/validator-5-claim-substrate-node-data pvc/validator-6-claim-substrate-node-data pvc/validator-7-claim-substrate-node-data -n staging --timeout=120s - + - name: Deploy with chain-spec and image override if: env.deployment_type == 1 run: | @@ -148,7 +149,7 @@ jobs: helm upgrade --install validator-5 . -f values/chains/staging.yaml -f values/nodes/staging/validator/validator-5 --set images.substrateNode="${{ github.event.inputs.substrate-node-image }}" --set chain.chainspec_secretName="${{ github.event.inputs.chain-spec-secret-name }}" helm upgrade --install validator-6 . -f values/chains/staging.yaml -f values/nodes/staging/validator/validator-6 --set images.substrateNode="${{ github.event.inputs.substrate-node-image }}" --set chain.chainspec_secretName="${{ github.event.inputs.chain-spec-secret-name }}" helm upgrade --install validator-7 . -f values/chains/staging.yaml -f values/nodes/staging/validator/validator-7 --set images.substrateNode="${{ github.event.inputs.substrate-node-image }}" --set chain.chainspec_secretName="${{ github.event.inputs.chain-spec-secret-name }}" - + - name: Deploy with image override if: env.deployment_type == 2 run: | @@ -160,7 +161,7 @@ jobs: helm upgrade --install validator-5 . -f values/chains/staging.yaml -f values/nodes/staging/validator/validator-5 --set images.substrateNode="${{ github.event.inputs.substrate-node-image }}" helm upgrade --install validator-6 . -f values/chains/staging.yaml -f values/nodes/staging/validator/validator-6 --set images.substrateNode="${{ github.event.inputs.substrate-node-image }}" helm upgrade --install validator-7 . -f values/chains/staging.yaml -f values/nodes/staging/validator/validator-7 --set images.substrateNode="${{ github.event.inputs.substrate-node-image }}" - + - name: Deploy from master with no value overrides if: env.deployment_type == 3 run: |