name: Build Misc on: push: branches: - main pull_request: types: [opened, synchronize, reopened, ready_for_review] merge_group: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true permissions: contents: read jobs: isdraft: uses: ./.github/workflows/reusable-isdraft.yml preflight: needs: isdraft uses: ./.github/workflows/reusable-preflight.yml build-runtimes-polkavm: timeout-minutes: 75 needs: [preflight] runs-on: ${{ needs.preflight.outputs.RUNNER }} container: image: ${{ needs.preflight.outputs.IMAGE }} steps: - name: Checkout uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Clean cargo cache to free disk space run: | cargo clean 2>/dev/null || true rm -rf ~/.cargo/registry/cache 2>/dev/null || true rm -rf ~/.cargo/git/db 2>/dev/null || true - name: Check Rust run: | rustup show rustup +nightly show - name: Build env: BIZINIKIWI_RUNTIME_TARGET: riscv id: required run: cargo check -p pez-minimal-template-runtime -p zagros-runtime -p pezkuwichain-runtime -p pezkuwi-test-runtime - name: Stop all workflows if failed if: ${{ failure() && steps.required.conclusion == 'failure' && !github.event.pull_request.head.repo.fork }} uses: ./.github/actions/workflow-stopper with: app-id: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_ID }} app-key: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_KEY }} # As part of our test fixtures we build the revive-uapi crate always with the `unstable-hostfn` feature. # To make sure that it won't break for users downstream which are not setting this feature # It doesn't need to produce working code so we just use a similar enough RISC-V target check-revive-stable-uapi-polkavm: timeout-minutes: 30 needs: [preflight] runs-on: ${{ needs.preflight.outputs.RUNNER }} container: image: ${{ needs.preflight.outputs.IMAGE }} steps: - name: Checkout uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Check Rust run: | rustup show rustup +nightly show - name: Build id: required run: cargo +nightly check -p pezpallet-revive-uapi --no-default-features --target riscv64imac-unknown-none-elf -Zbuild-std=core - name: Stop all workflows if failed if: ${{ failure() && steps.required.conclusion == 'failure' && !github.event.pull_request.head.repo.fork }} uses: ./.github/actions/workflow-stopper with: app-id: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_ID }} app-key: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_KEY }} build-pez-subkey: timeout-minutes: 20 needs: [preflight] runs-on: ${{ needs.preflight.outputs.RUNNER }} container: image: ${{ needs.preflight.outputs.IMAGE }} steps: - name: Checkout uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Check Rust run: | rustup show rustup +nightly show - name: Build env: SKIP_WASM_BUILD: 1 id: required run: | cd ./bizinikiwi/bin/utils/pez-subkey cargo build --locked --release - name: Stop all workflows if failed if: ${{ failure() && steps.required.conclusion == 'failure' && !github.event.pull_request.head.repo.fork }} uses: ./.github/actions/workflow-stopper with: app-id: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_ID }} app-key: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_KEY }} confirm-required-build-mipezsc-jobs-passed: runs-on: ubuntu-latest name: All build misc jobs passed # If any new job gets added, be sure to add it to this array needs: [build-runtimes-polkavm, build-pez-subkey] if: always() && !cancelled() steps: - run: | tee resultfile <<< '${{ toJSON(needs) }}' FAILURES=$(cat resultfile | grep '"result": "failure"' | 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