-
Notifications
You must be signed in to change notification settings - Fork 157
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
new development/deployment/release process #346
Merged
Merged
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
6efd94b
add check-labels action
sam0x17 cada696
add label-triggers action
sam0x17 135c809
bump CI
sam0x17 9253416
split devnet and testnet label checking into their own actions
sam0x17 f261b89
typo
sam0x17 9a2a776
spec-version sub-crate scaffold
sam0x17 36409e2
remove from workspace to avoid version conflicts for now
sam0x17 1ab3f47
never mind
sam0x17 ebcda57
WIP
sam0x17 7b3347e
try fake deploy
sam0x17 7c12332
force it to show up
sam0x17 ce23465
blah blah specify toolchain yes yes
sam0x17 39d4520
use new output style
sam0x17 b7baa91
try single line
sam0x17 25f5f71
fix
sam0x17 6f464e3
try again
sam0x17 2f2df2e
tweak again
sam0x17 9eaebf9
remove trigger
sam0x17 de29985
another
sam0x17 c3a0448
try on ubuntu-latest
sam0x17 36ab313
never mind
sam0x17 e6b95cc
show ping pong
sam0x17 b97eb5b
wait 30 seconds
sam0x17 66acdda
try test.chain.opentensor.ai instead
sam0x17 8dbdd71
try with subxt
sam0x17 f832c68
fix
sam0x17 7c258e7
try with new substrate-spec-version crate
sam0x17 af1bc4e
live spec version working :tada: :tada:
sam0x17 71525d9
perform full build / make use of spec version
sam0x17 c92def2
simplified rust toolchain setup
sam0x17 0f50a7f
remove concurrency settings
sam0x17 1fbbcf6
Merge remote-tracking branch 'origin/main' into sam-revamp-deployment
sam0x17 8cf0126
fix using outdated version of checkout action
sam0x17 664b1be
real spec version check
sam0x17 df27f60
clear out old migrations
sam0x17 e7c479d
fix warnings
sam0x17 d307066
proper spec version check
sam0x17 5a02594
fix
sam0x17 1e8ad85
whoops
sam0x17 ed611e3
formatting correct now
sam0x17 2ce1333
use not-greater-than symbol
sam0x17 bff1f63
fix labels
sam0x17 753064a
add check-testnet
sam0x17 7bcfe49
add finney check
sam0x17 cc60878
tweaks
sam0x17 0faea6d
WIP
sam0x17 749ce24
labels and pull request lifecycle
sam0x17 05c297e
tweak
sam0x17 3c0c885
done
sam0x17 3415696
Merge remote-tracking branch 'origin/main' into sam-revamp-deployment
sam0x17 a9bbc88
tweak branches
sam0x17 e294b20
fix typos
sam0x17 5e061dd
update SOP period for testnet
sam0x17 4e319c5
Merge remote-tracking branch 'origin/main' into sam-revamp-deployment
sam0x17 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,39 @@ | ||
name: Devnet Deploy Check | ||
|
||
on: | ||
pull_request: | ||
branches: [devnet] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
check-spec-version: | ||
name: Check spec_version bump | ||
runs-on: SubtensorCI | ||
steps: | ||
- name: Dependencies | ||
run: | | ||
sudo apt-get update && | ||
sudo apt-get install -y curl clang curl libssl-dev llvm \ | ||
libudev-dev protobuf-compiler | ||
|
||
- name: Set up Rust Toolchain | ||
run: curl https://sh.rustup.rs -sSf | sh -s -- -y | ||
|
||
- name: Install substrate-spec-version | ||
run: cargo install substrate-spec-version | ||
|
||
- name: Check-out repository under $GITHUB_WORKSPACE | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check that spec_version has been bumped | ||
run: | | ||
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version wss://dev.chain.opentensor.ai:443 | tr -d '\n') | ||
echo "network spec_version: $spec_version" | ||
: ${spec_version:?bad spec version} | ||
local_spec_version=$(cargo run -p node-subtensor-runtime --bin spec_version | tr -d '\n') | ||
echo "local spec_version: $local_spec_version" | ||
echo "network spec_version: $spec_version" | ||
if (( $(echo "$local_spec_version <= $spec_version" | bc -l) )); then echo "$local_spec_version ≯ $spec_version ❌"; exit 1; fi | ||
echo "$local_spec_version > $spec_version ✅" |
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,39 @@ | ||
name: Finney Deploy Check | ||
|
||
on: | ||
pull_request: | ||
branches: [finney] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
check-spec-version: | ||
name: Check spec_version bump | ||
runs-on: SubtensorCI | ||
steps: | ||
- name: Dependencies | ||
run: | | ||
sudo apt-get update && | ||
sudo apt-get install -y curl clang curl libssl-dev llvm \ | ||
libudev-dev protobuf-compiler | ||
|
||
- name: Set up Rust Toolchain | ||
run: curl https://sh.rustup.rs -sSf | sh -s -- -y | ||
|
||
- name: Install substrate-spec-version | ||
run: cargo install substrate-spec-version | ||
|
||
- name: Check-out repository under $GITHUB_WORKSPACE | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check that spec_version has been bumped | ||
run: | | ||
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version wss://entrypoint-finney.opentensor.ai:443 | tr -d '\n') | ||
echo "network spec_version: $spec_version" | ||
: ${spec_version:?bad spec version} | ||
local_spec_version=$(cargo run -p node-subtensor-runtime --bin spec_version | tr -d '\n') | ||
echo "local spec_version: $local_spec_version" | ||
echo "network spec_version: $spec_version" | ||
if (( $(echo "$local_spec_version <= $spec_version" | bc -l) )); then echo "$local_spec_version ≯ $spec_version ❌"; exit 1; fi | ||
echo "$local_spec_version > $spec_version ✅" |
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 |
---|---|---|
|
@@ -5,16 +5,10 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
on: | ||
## Run automatically for all PRs against main, regardless of what the changes are | ||
## to be safe and so we can more easily force re-run the CI when github is being | ||
## weird by using a blank commit | ||
push: | ||
branches: [main, development, staging] | ||
branches: [main, devnet-ready, devnet, testnet, finney] | ||
|
||
## | ||
# Run automatically for PRs against default/main branch if Rust files change | ||
pull_request: | ||
branches: [main, development, staging] | ||
|
||
## Allow running workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
@@ -56,7 +50,7 @@ jobs: | |
TARGET: ${{ matrix.rust-target }} | ||
steps: | ||
- name: Check-out repository under $GITHUB_WORKSPACE | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: sudo apt-get update && sudo apt-get install -y build-essential | ||
|
@@ -98,7 +92,7 @@ jobs: | |
TARGET: ${{ matrix.rust-target }} | ||
steps: | ||
- name: Check-out repository under $GITHUB_WORKSPACE | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
|
@@ -147,7 +141,7 @@ jobs: | |
TARGET: ${{ matrix.rust-target }} | ||
steps: | ||
- name: Check-out repository under $GITHUB_WORKSPACE | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
|
@@ -196,7 +190,7 @@ jobs: | |
TARGET: ${{ matrix.rust-target }} | ||
steps: | ||
- name: Check-out repository under $GITHUB_WORKSPACE | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
|
@@ -245,7 +239,7 @@ jobs: | |
TARGET: ${{ matrix.rust-target }} | ||
steps: | ||
- name: Check-out repository under $GITHUB_WORKSPACE | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
|
@@ -292,7 +286,7 @@ jobs: | |
run: cargo install --locked -q zepter && zepter --version | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Dont clone historic commits. | ||
|
||
|
@@ -304,7 +298,7 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run Try Runtime Checks | ||
uses: "paritytech/[email protected]" | ||
|
@@ -324,7 +318,7 @@ jobs: | |
# runs-on: ubuntu-22.04 | ||
# steps: | ||
# - name: Checkout sources | ||
# uses: actions/checkout@v3 | ||
# uses: actions/checkout@v4 | ||
# | ||
# - name: Run Try Runtime Checks | ||
# uses: "paritytech/[email protected]" | ||
|
@@ -339,7 +333,7 @@ jobs: | |
# runs-on: ubuntu-22.04 | ||
# steps: | ||
# - name: Checkout sources | ||
# uses: actions/checkout@v3 | ||
# uses: actions/checkout@v4 | ||
# | ||
# - name: Run Try Runtime Checks | ||
# uses: "paritytech/[email protected]" | ||
|
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,39 @@ | ||
name: Testnet Deploy Check | ||
|
||
on: | ||
pull_request: | ||
branches: [testnet] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
check-spec-version: | ||
name: Check spec_version bump | ||
runs-on: SubtensorCI | ||
steps: | ||
- name: Dependencies | ||
run: | | ||
sudo apt-get update && | ||
sudo apt-get install -y curl clang curl libssl-dev llvm \ | ||
libudev-dev protobuf-compiler | ||
|
||
- name: Set up Rust Toolchain | ||
run: curl https://sh.rustup.rs -sSf | sh -s -- -y | ||
|
||
- name: Install substrate-spec-version | ||
run: cargo install substrate-spec-version | ||
|
||
- name: Check-out repository under $GITHUB_WORKSPACE | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check that spec_version has been bumped | ||
run: | | ||
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version wss://test.finney.opentensor.ai:443 | tr -d '\n') | ||
echo "network spec_version: $spec_version" | ||
: ${spec_version:?bad spec version} | ||
local_spec_version=$(cargo run -p node-subtensor-runtime --bin spec_version | tr -d '\n') | ||
echo "local spec_version: $local_spec_version" | ||
echo "network spec_version: $spec_version" | ||
if (( $(echo "$local_spec_version <= $spec_version" | bc -l) )); then echo "$local_spec_version ≯ $spec_version ❌"; exit 1; fi | ||
echo "$local_spec_version > $spec_version ✅" |
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,18 @@ | ||
name: Tested on Devnet | ||
on: | ||
pull_request: | ||
types: [opened, labeled, unlabeled, synchronize] | ||
jobs: | ||
check-labels: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- uses: mheap/github-action-required-labels@v5 | ||
with: | ||
mode: minimum | ||
count: 1 | ||
labels: | | ||
devnet-pass | ||
devnet-skip |
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,25 @@ | ||
name: Label Triggers | ||
on: | ||
pull_request: | ||
types: | ||
- labeled | ||
|
||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
jobs: | ||
comment_on_breaking_change: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check if 'breaking change' label is added | ||
if: github.event.label.name == 'breaking-change' | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: '@opentensor/cerebrum / @opentensor/gyrus / @opentensor/cortex breaking change detected! Please prepare accordingly!' | ||
}) |
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,18 @@ | ||
name: Tested on Testnet | ||
on: | ||
pull_request: | ||
types: [opened, labeled, unlabeled, synchronize] | ||
sam0x17 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
jobs: | ||
check-labels: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- uses: mheap/github-action-required-labels@v5 | ||
with: | ||
mode: minimum | ||
count: 1 | ||
labels: | | ||
testnet-pass | ||
testnet-skip |
Oops, something went wrong.
Oops, something went wrong.
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.
Have we resolved permissioning issues with these alerts?
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.
I doubt it, @garrett-opentensor will need to make sure each of those groups has permissions to receive notifications in github