-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #346 from opentensor/sam-revamp-deployment
new development/deployment/release process
- Loading branch information
Showing
10 changed files
with
402 additions
and
16 deletions.
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] | ||
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.