Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
bac6147
polkadot-sdk: v1.9.0 -> 1.13.0
FlorianFranzen Jun 11, 2024
cf27cb7
docker: avoid shorthand syntax
FlorianFranzen Jun 18, 2024
29b50a1
substrate: enable metadata hash extension
FlorianFranzen Jun 18, 2024
ebaa535
cargo: use global workspace defaults
FlorianFranzen Jun 19, 2024
88102b8
cargo: use global workspace dependencies
FlorianFranzen Jun 19, 2024
7477e0b
fmt: cosmetic formatting
FlorianFranzen Jun 19, 2024
ad28d72
runtime: return to srtool compliance
FlorianFranzen Jun 19, 2024
8a4d2ac
clippy: fix tests and clippy
FlorianFranzen Jun 19, 2024
3608001
polkadot-sdk: extend umbrella to runtime
FlorianFranzen Jun 19, 2024
600a9de
pallets: cleanup deps and umbrella
FlorianFranzen Jun 19, 2024
22a102c
docker: separate by environment
FlorianFranzen Jun 19, 2024
b9b6426
features: fast-runtime -> development
FlorianFranzen Jun 20, 2024
65cdbda
staging: update bootkeys and add service accounts
FlorianFranzen Jun 20, 2024
5240afd
tc-subxt: add support for multiple metadata
FlorianFranzen Jun 20, 2024
3cee982
inherent: remove storage proofs
FlorianFranzen Jun 21, 2024
23a33b6
Add build matrix for dev and testnet metadata
penumbra23 Jun 20, 2024
1fa5712
ci: build all feature varients
FlorianFranzen Jun 22, 2024
d213a50
ci: build chronicle and tester as well
FlorianFranzen Jun 22, 2024
462eb1c
runtime: export metadata during build
FlorianFranzen Jun 22, 2024
113a839
ci: use wasm-builder metadata
FlorianFranzen Jun 22, 2024
e4de448
ss58: extend with inofficial testnet assignment
FlorianFranzen Jun 22, 2024
74e337e
cargo: explicitly define default feature
FlorianFranzen Jun 22, 2024
842da1d
ci: cancel old job on update
FlorianFranzen Jun 22, 2024
f18a9aa
ci: use action instead of scripting
FlorianFranzen Jun 23, 2024
31b2c95
Add checkout to PR branch before committing
penumbra23 Jun 23, 2024
bd6b680
Move to self-hosted-timechain runner
penumbra23 Jun 23, 2024
43972db
Add setup step for caching and rustup
penumbra23 Jun 23, 2024
c309d0e
Remove sccache from timechain workflow
penumbra23 Jun 24, 2024
cf3c61e
ci: update cache action
FlorianFranzen Jun 24, 2024
65cf8b1
Continue CI if metadata artifacts don't exist
penumbra23 Jun 24, 2024
d641231
Revert "chain-spec: remove protocol id (#906)"
FlorianFranzen Jun 25, 2024
01c5c1c
Checkout using gh cli
penumbra23 Jun 26, 2024
724fbe3
tc-subxt: allow selection of metadata at runtime
FlorianFranzen Jun 25, 2024
f66f2b5
primitives: fix mangled headers
FlorianFranzen Jun 26, 2024
c8c8c62
clippy: fix remaining errors
FlorianFranzen Jun 26, 2024
befc90e
docker: minor cosmetic update
FlorianFranzen Jun 26, 2024
939399c
ci: split and cleanup timechain build jobs
FlorianFranzen Jun 26, 2024
ccea66f
tc-subxt: Automated metadata update
Jun 27, 2024
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
65 changes: 65 additions & 0 deletions .github/workflows/build-chronicle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Compile chronicle

on:
pull_request:
paths-ignore:
- 'contracts/**'
- 'docker/**'
- 'docs/**'
- 'node/**'
- 'infra/**'
- 'js/**'
- 'scripts/**'
- 'tester/**'
- 'utils/**'
- '**/*.md'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-chronicle:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
profile:
- production
- testnet
steps:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y musl-tools protobuf-compiler
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install rust toolchain
run : rustup show
- name: Setup and cache sccache
uses: visvirial/[email protected]
with:
cache-key: sccache-chronicle-${{ matrix.profile }}
- name: Cache cargo registry and index
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-cache-chronicle-${{ hashFiles('Cargo.lock') }}
restore-keys: cargo-cache-chronicle-
- name: Cache cargo build output
uses: actions/cache@v4
with:
path: target
key: cargo-build-chronicle-${{ matrix.profile }}-${{ hashFiles('Cargo.lock') }}
restore-keys: cargo-build-chronicle-${{ matrix.profile }}-
- name: Build chronicle
run: cargo build --package chronicle --profile ${{ matrix.profile }}
- name: Upload chronicle
uses: actions/upload-artifact@v4
with:
name: chronicle.${{ matrix.profile }}
if-no-files-found: error
path: target/${{ matrix.profile }}/chronicle
79 changes: 79 additions & 0 deletions .github/workflows/build-node.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Compile node

on:
pull_request:
paths-ignore:
- 'chronicle/**'
- 'contracts/**'
- 'docker/**'
- 'docs/**'
- 'infra/**'
- 'js/**'
- 'lib/**'
- 'scripts/**'
- 'tc-subxt/**'
- 'tester/**'
- 'tss/**'
- 'utils/**'
- '**/*.md'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
setup:
runs-on: [ self-hosted-timechain ]
steps:
- name: Install rust toolchain
run : rustup show
- name: Checkout sources
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
submodules: recursive
- name: Cache cargo registry and index
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-cache-timechain-${{ hashFiles('Cargo.lock') }}
restore-keys: cargo-cache-timechain-

build-node:
runs-on: [ self-hosted-timechain ]
needs: [ setup ]
strategy:
fail-fast: false
matrix:
include:
- profile: production
features: default
- profile: testnet
features: default
- profile: testnet
features: development
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
submodules: recursive
- name: Cache cargo build output
uses: actions/cache@v4
with:
path: target
key: cargo-build-timenode-${{ matrix.profile }}-${{ hashFiles('Cargo.lock') }}
restore-keys: cargo-build-timenode-${{ matrix.profile }}-
- name: Build timechain node
env:
SKIP_WASM_BUILD: true
run: cargo build --package timechain-node --profile ${{ matrix.profile }} --features ${{ matrix.features }}
- name: Upload timechain node
uses: actions/upload-artifact@v4
with:
name: timenode.${{ matrix.profile }}.${{ matrix.features }}
if-no-files-found: error
path: target/${{ matrix.profile }}/timechain-node
159 changes: 113 additions & 46 deletions .github/workflows/build-runtime.yaml
Original file line number Diff line number Diff line change
@@ -1,55 +1,122 @@
name: Build runtime artifacts
name: Compile runtimes

on:
push:
branches:
- "ci/runtime/**"
pull_request:
paths-ignore:
- 'chronicle/**'
- 'contracts/**'
- 'docker/**'
- 'docs/**'
- 'infra/**'
- 'js/**'
- 'lib/**'
- 'scripts/**'
- 'tc-subxt/**'
- 'tester/**'
- 'tss/**'
- 'utils/**'
- '**/*.md'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
set-tags:
name: Get & set tags
runs-on: ubuntu-latest
outputs:
commit_hash: ${{ steps.get-sha.outputs.sha }}
commit_hash8: ${{ steps.get-sha.outputs.sha8 }}
setup:
runs-on: [ self-hosted-timechain ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get SHA
id: get-sha
run: |
sha=$(git log -1 --format='%H')
echo "sha=$sha" >> $GITHUB_OUTPUT
echo "sha8=$(git log -1 --format='%H' | cut -c1-8)" >> $GITHUB_OUTPUT
echo "SHA commit:" $sha
- name: Install rust toolchain
run : rustup show
- name: Checkout sources
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
submodules: recursive
- name: Cache cargo registry and index
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-cache-timechain-${{ hashFiles('Cargo.lock') }}
restore-keys: cargo-cache-timechain-

build-runtime:
name: Build runtimes
needs: ["set-tags"]
runs-on: ubuntu-latest
runs-on: [ self-hosted-timechain ]
needs: [ setup ]
strategy:
fail-fast: false
matrix:
include:
- package: timechain-runtime
features: default
crate: timechain_runtime
- package: timechain-runtime
features: development
crate: timechain_runtime
steps:
- name: Fetch latest code
uses: actions/checkout@v3

- name: Build timechain runtime
id: srtool_build
uses: chevdor/[email protected]
with:
image: analoglabs/srtool
tag: 1.75.0
chain: timechain
runtime_dir: "runtime"
- name: Checkout sources
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
submodules: recursive
- name: Cache cargo build output
uses: actions/cache@v4
with:
path: target
key: cargo-build-${{ matrix.package }}-${{ matrix.features }}-${{ hashFiles('Cargo.lock') }}
restore-keys: cargo-build-${{ matrix.package }}-${{ matrix.features }}-
- name: Build timechain runtime
run: cargo build --package ${{ matrix.package }} --profile release --features ${{ matrix.features }}
- name: Upload timechain runtime
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.package }}.${{ matrix.features }}.wasm
if-no-files-found: error
path: target/release/wbuild/${{ matrix.package }}/${{ matrix.crate }}.compact.compressed.wasm
- name: Upload timechain metadata
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.package }}.${{ matrix.features }}.scale
if-no-files-found: error
path: target/release/wbuild/${{ matrix.package }}/${{ matrix.crate }}.metadata.scale

- name: Srtool summary
run: |
echo '${{ steps.srtool_build.outputs.json }}' | jq . > timechain-srtool-digest.json
cat timechain-srtool-digest.json
echo "Runtime location: ${{ steps.srtool_build.outputs.wasm_compressed }}"

- name: Upload timechain runtime artifacts
uses: actions/upload-artifact@v3
with:
name: timechain-runtime
path: |
${{ steps.srtool_build.outputs.wasm_compressed }}
timechain-srtool-digest.json
update-metadata:
runs-on: [ self-hosted-timechain ]
needs: [ build-runtime ]
if: ${{ always() }}
continue-on-error: true
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Download and update Testnet Metadata
id: download-testnet-default-metadata
uses: actions/download-artifact@v4
continue-on-error: true
with:
name: timechain-runtime.default.scale
- name: Download and Testnet Metadata
if: steps.download-testnet-default-metadata.outcome == 'success'
run: mv timechain_runtime.metadata.scale config/subxt/testnet.default.scale
- name: Download Development Metadata
id: download-testnet-development-metadata
uses: actions/download-artifact@v4
continue-on-error: true
with:
name: timechain-runtime.development.scale
- name: Update Development Metadata
if: steps.download-testnet-development-metadata.outcome == 'success'
run: mv timechain_runtime.metadata.scale config/subxt/testnet.development.scale
- name: Commit any changes to the metadata
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if ! git diff --quiet; then
git config user.email "[email protected]"
git config user.name "Metadata Update Bot"
git commit -am "tc-subxt: Automated metadata update"
git push
fi
56 changes: 56 additions & 0 deletions .github/workflows/build-srtool-runtime.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build runtime artifacts

on:
push:
branches:
- "ci/runtime/**"

jobs:
set-tags:
name: Get & set tags
runs-on: ubuntu-latest
outputs:
commit_hash: ${{ steps.get-sha.outputs.sha }}
commit_hash8: ${{ steps.get-sha.outputs.sha8 }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get SHA
id: get-sha
run: |
sha=$(git log -1 --format='%H')
echo "sha=$sha" >> $GITHUB_OUTPUT
echo "sha8=$(git log -1 --format='%H' | cut -c1-8)" >> $GITHUB_OUTPUT
echo "SHA commit:" $sha

build-runtime:
name: Build runtimes
needs: ["set-tags"]
runs-on: ubuntu-latest
steps:
- name: Fetch latest code
uses: actions/checkout@v3

- name: Build timechain runtime
id: srtool_build
uses: chevdor/[email protected]
with:
image: analoglabs/srtool
tag: 1.75.0
chain: timechain
runtime_dir: "runtime"

- name: Srtool summary
run: |
echo '${{ steps.srtool_build.outputs.json }}' | jq . > timechain-srtool-digest.json
cat timechain-srtool-digest.json
echo "Runtime location: ${{ steps.srtool_build.outputs.wasm_compressed }}"

- name: Upload timechain runtime artifacts
uses: actions/upload-artifact@v4
with:
name: timechain-runtime
if-no-files-found: error
path: |
${{ steps.srtool_build.outputs.wasm_compressed }}
timechain-srtool-digest.json
Loading