Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add publish-check-compile workflow #6556

Merged
merged 6 commits into from
Dec 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/publish-check-compile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Check publish build

on:
push:
branches:
- master
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

jobs:
preflight:
uses: ./.github/workflows/reusable-preflight.yml

check-publish:
timeout-minutes: 90
needs: [preflight]
runs-on: ${{ needs.preflight.outputs.RUNNER }}
container:
image: ${{ needs.preflight.outputs.IMAGE }}
steps:
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7

- name: Rust Cache
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
with:
cache-on-failure: true

- name: install parity-publish
run: cargo install [email protected] --locked -q

- name: parity-publish update plan
run: parity-publish --color always plan --skip-check --prdoc prdoc/

- name: parity-publish apply plan
run: parity-publish --color always apply --registry

- name: parity-publish check compile
run: |
packages="$(parity-publish apply --print)"

if [ -n "$packages" ]; then
cargo --color always check $(printf -- '-p %s ' $packages)
fi
Loading