|
| 1 | +name: Update Chainspecs |
| 2 | + |
| 3 | +concurrency: |
| 4 | + group: update-chainspec-${{ github.ref }} |
| 5 | + cancel-in-progress: true |
| 6 | + |
| 7 | +on: |
| 8 | + push: |
| 9 | + branches: [main, testnet, staging, staging-ready] |
| 10 | + |
| 11 | + workflow_dispatch: |
| 12 | + inputs: |
| 13 | + verbose: |
| 14 | + description: "Output more information when triggered manually" |
| 15 | + required: false |
| 16 | + default: "" |
| 17 | + |
| 18 | +env: |
| 19 | + CARGO_TERM_COLOR: always |
| 20 | + VERBOSE: ${{ github.events.input.verbose }} |
| 21 | + |
| 22 | +jobs: |
| 23 | + update-chainspecs: |
| 24 | + runs-on: SubtensorCI |
| 25 | + permissions: |
| 26 | + contents: write |
| 27 | + |
| 28 | + strategy: |
| 29 | + matrix: |
| 30 | + rust-branch: |
| 31 | + - nightly-2024-03-05 |
| 32 | + rust-target: |
| 33 | + - x86_64-unknown-linux-gnu |
| 34 | + os: |
| 35 | + - ubuntu-latest |
| 36 | + include: |
| 37 | + - os: ubuntu-latest |
| 38 | + env: |
| 39 | + RELEASE_NAME: development |
| 40 | + RUSTV: ${{ matrix.rust-branch }} |
| 41 | + RUST_BACKTRACE: full |
| 42 | + RUST_BIN_DIR: target/${{ matrix.rust-target }} |
| 43 | + TARGET: ${{ matrix.rust-target }} |
| 44 | + steps: |
| 45 | + - name: Check-out repository under $GITHUB_WORKSPACE |
| 46 | + uses: actions/checkout@v2 |
| 47 | + |
| 48 | + - name: Install dependencies |
| 49 | + run: | |
| 50 | + sudo apt-get update && |
| 51 | + sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler |
| 52 | +
|
| 53 | + - name: Install Rust ${{ matrix.rust-branch }} |
| 54 | + uses: actions-rs/[email protected] |
| 55 | + with: |
| 56 | + toolchain: ${{ matrix.rust-branch }} |
| 57 | + components: rustfmt, clippy |
| 58 | + profile: minimal |
| 59 | + |
| 60 | + - name: Utilize Shared Rust Cache |
| 61 | + |
| 62 | + with: |
| 63 | + key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }} |
| 64 | + |
| 65 | + - name: Build chainspecs |
| 66 | + run: ./scripts/build_all_chainspecs.sh |
| 67 | + |
| 68 | + - uses: stefanzweifel/git-auto-commit-action@v5 |
| 69 | + name: Commit any updated chainspecs |
| 70 | + with: |
| 71 | + commit_message: Update chainspecs |
0 commit comments