-
Notifications
You must be signed in to change notification settings - Fork 13
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
CI improve nightly GHA workflow #761
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a723cce
Improve nightly test workflow by separating binaries builds
sergejparity 79c9c70
Fix description
sergejparity bae53e0
Fix description
sergejparity 3a59317
cleanup
sergejparity 6eed02a
cleanup
sergejparity b02761d
change SMP rebuild schedule
sergejparity File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Prepare polkadot and staking-miner-playground binaries | ||
|
||
This action downloads the Polkadot and Staking miner binaries produced from workflows | ||
`build-polkadot-for-nightly.yml` and `build-staking-miner-playground-for-nightly.yml` and puts them into the `$PATH`. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Prepare polkadot and staking-miner-playground binaries | ||
description: Downloads and configures prebuilt Polkadot and Staking Miner Playground binaries | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Download polkadot binaries | ||
uses: dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d # v3.0.0 | ||
with: | ||
workflow: build-polkadot-for-nightly.yml | ||
name: nightly-polkadot-binary | ||
path: ./tmp | ||
|
||
- name: Download staking-miner-playground binary | ||
uses: dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d # v3.0.0 | ||
with: | ||
workflow: build-staking-miner-playground-for-nightly.yml | ||
name: staking-miner-playground-binary | ||
path: ./tmp | ||
|
||
- name: Setup permissions and move to path | ||
shell: bash | ||
run: | | ||
chmod u+x ./tmp/polkadot* ./tmp/staking-miner-playground | ||
./tmp/polkadot --version | ||
./tmp/staking-miner-playground --version | ||
mkdir -p ~/.local/bin | ||
mv ./tmp/polkadot* ~/.local/bin | ||
mv ./tmp/staking-miner-playground ~/.local/bin |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Build polkadot binary for nightly tests | ||
|
||
on: | ||
# Allow it to be manually ran to rebuild binary when needed: | ||
workflow_dispatch: {} | ||
# Run at 22pm every day for nightly builds. | ||
schedule: | ||
- cron: "0 22 * * *" | ||
|
||
jobs: | ||
tests: | ||
name: Build polkadot binary | ||
runs-on: ubuntu-latest | ||
container: paritytech/ci-unified:bullseye-1.74.0-2023-11-01-v20231204 | ||
steps: | ||
- name: checkout polkadot-sdk | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: paritytech/polkadot-sdk | ||
|
||
- name: Rust Cache | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
workspaces: | | ||
polkadot | ||
cache-on-failure: true | ||
|
||
- name: build polkadot binary | ||
run: | | ||
cargo build -p polkadot --release --features fast-runtime | ||
./target/release/polkadot --version | ||
|
||
- name: upload polkadot binary | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: nightly-polkadot-binary | ||
path: | | ||
./target/release/polkadot | ||
./target/release/polkadot-execute-worker | ||
./target/release/polkadot-prepare-worker | ||
retention-days: 2 | ||
if-no-files-found: error |
44 changes: 44 additions & 0 deletions
44
.github/workflows/build-staking-miner-playground-for-nightly.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Build staking miner playground binary for nightly tests | ||
|
||
on: | ||
# Run when changes to staking miner playground is made | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'staking-miner-playground/**' | ||
# Allow it to be manually ran to rebuild binary when needed: | ||
workflow_dispatch: {} | ||
# Run at 22pm every week on Sunday's for nightly builds. | ||
schedule: | ||
- cron: "0 22 1 * *" | ||
|
||
jobs: | ||
tests: | ||
name: Build staking-miner-playground | ||
runs-on: ubuntu-latest | ||
container: paritytech/ci-unified:bullseye-1.74.0-2023-11-01-v20231204 | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Rust Cache | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
workspaces: | | ||
staking-miner-playground | ||
cache-on-failure: true | ||
|
||
- name: build staking-miner-playground binary | ||
run: | | ||
cd staking-miner-playground | ||
cargo build --release --features test-trimming | ||
./target/release/staking-miner-playground --version | ||
|
||
- name: upload staking-miner-playground binary | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: staking-miner-playground-binary | ||
path: ./staking-miner-playground/target/release/staking-miner-playground | ||
retention-days: 31 | ||
if-no-files-found: error |
This file contains 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍