Skip to content
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

docs: Try gh pages for autogenerated docs #683

Closed
wants to merge 38 commits into from
Closed
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
c1a8bc8
ci: enable cache
ggera Jun 13, 2024
0786a36
ci: speedup pipeline with needs
ggera Jun 14, 2024
10bb9be
ci: test try-runtime with github actions
ggera Jun 14, 2024
2d1d7ed
ci: Add self-hosted runner
ggera Jun 20, 2024
c492ccc
ci: run jobs in container
ggera Jun 20, 2024
8c24d38
fix: github action
ggera Jun 20, 2024
e6738b6
ci: use DinD
ggera Jun 20, 2024
d1e1adb
ci: try-runtime gh action
ggera Jun 27, 2024
506a2f0
ci: upgrade caching version
ggera Jun 27, 2024
3681ced
ci: integration tests
ggera Jun 27, 2024
c35236e
ci: add tests gh action
ggera Jun 27, 2024
5b42fff
ci: srtool build
ggera Jun 28, 2024
42348a9
ci: tirgger on workflow_dispatch
ggera Jul 1, 2024
4c0ba3e
ci: use default cargo location
ggera Jul 1, 2024
225b872
Merge branch 'develop' of github.com:KILTprotocol/mashnet-node into c…
ggera Jul 18, 2024
dd91860
ci: address PR comments
ggera Jul 24, 2024
60be123
Merge branch 'develop' into ci-cache
ggera Jul 24, 2024
37b5ce1
Merge branch 'develop' of github.com:KILTprotocol/mashnet-node into c…
ggera Jul 24, 2024
95d1402
Merge branch 'ci-cache' of github.com:KILTprotocol/mashnet-node into …
ggera Jul 24, 2024
7377a4e
ci: prevent cancel-in-progress
ggera Jul 24, 2024
d453946
chore: merge develop
ggera Jul 29, 2024
3faf1d4
chore: resolve PR comments
ggera Jul 29, 2024
f15cbfd
Merge branch 'develop' of github.com:KILTprotocol/mashnet-node into c…
ggera Jul 30, 2024
a27face
chore: merge develop
ggera Jul 30, 2024
3c0bab3
ci-skip-rust
ggera Jul 30, 2024
7982893
chore: test skip
ggera Jul 30, 2024
a04f9ae
Merge branch 'develop' of github.com:KILTprotocol/mashnet-node into c…
ggera Jul 30, 2024
39a6191
chore: test ci-skip-rust
ggera Jul 30, 2024
7eb9671
ci-skip-rust;ci-skip-integration-tests
ggera Jul 30, 2024
1f87ef7
ci-skip-rust;ci-skip-integration-tests
ggera Jul 30, 2024
6a14c76
chore: test maximise build space
ggera Aug 1, 2024
eecdd08
ci-skip-integration-tests
ggera Aug 1, 2024
d5f972a
ci-skip-rust;ci-skip-integration-tests
ggera Aug 1, 2024
b925762
ci-skip-rust;ci-skip-integration-tests
ggera Aug 1, 2024
874802f
ci-skip-rust;ci-skip-integration-tests
ggera Aug 1, 2024
74a39ef
ci-skip-rust;ci-skip-integration-tests
ggera Aug 1, 2024
285186c
Try gh pages
ChrisChinchilla Aug 1, 2024
0860eac
Merge branch 'ci-cache' into chrisward/pp-readme-gh
ChrisChinchilla Aug 1, 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
24 changes: 24 additions & 0 deletions .github/workflows/check-clippy-all-features.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Clippy check --all-features
on:
push:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
RUSTFLAGS: "-Dwarnings"

jobs:
clippy_check:
runs-on: ubuntu-24.04
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
remove-android: 'true'
remove-dotnet: 'true'
temp-reserve-mb: 'true'
- uses: actions/checkout@v4
- name: Run Clippy
run: SKIP_WASM_BUILD=1 cargo clippy --all-targets --all-features --locked --quiet
25 changes: 25 additions & 0 deletions .github/workflows/check-clippy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Clippy check
on:
push:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
RUSTFLAGS: "-Dwarnings"

jobs:
clippy_check:
runs-on: ubuntu-24.04
if: ${{ !contains(github.event.head_commit.message, '[ci-skip-rust]') }}
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
remove-android: 'true'
remove-dotnet: 'true'
temp-reserve-mb: 'true'
- uses: actions/checkout@v4
- name: Run Clippy
run: SKIP_WASM_BUILD=1 cargo clippy --all-targets --all-features --locked --quiet
22 changes: 22 additions & 0 deletions .github/workflows/check-fmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Check fmt

on:
pull_request:
types: [opened, synchronize, reopened, edited]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
check-fmt:
runs-on: ubuntu-latest
container:
image: paritytech/ci-unified:bullseye-1.74.0
if: ${{ !contains(github.event.head_commit.message, 'ci-skip-rust') }}
steps:
- uses: actions/checkout@v4
- name: Run cargo fmt
run: cargo fmt -- --check
- name: Run taplo
run: taplo fmt --check
25 changes: 25 additions & 0 deletions .github/workflows/docpublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build and Deploy API docs

on:
release:
types: [published]
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: ubuntu-latest
container:
image: paritytech/ci-unified:bullseye-1.74.0
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install and Build
run: RUSTDOCFLAGS='-D warnings' cargo doc --all-features --no-deps --locked


- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs/api # The folder the action should deploy to.
35 changes: 35 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Integration tests

on:
push:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
integration-tests:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, 'ci-skip-integration-tests') }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js environment
run: |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
echo 'export NVM_DIR="$HOME/.nvm"' >> $HOME/.bashrc
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $HOME/.bashrc
eval "$(cat $HOME/.bashrc | tail -n +10)"
nvm install
nvm use
yarn --immutable
working-directory: ./integration-tests/chopsticks

- name: Lint & Test
run: |
yarn ts-check
yarn lint
yarn test:CI
working-directory: ./integration-tests/chopsticks

84 changes: 84 additions & 0 deletions .github/workflows/srtool-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Srtool build

on:
release:
types: [published]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
SUBWASM_VERSION: v0.20.0

jobs:
build-wasm:
runs-on: ubuntu-latest

strategy:
matrix:
runtime: [peregrine, spiritnet]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Srtool build
id: srtool_build
uses: chevdor/srtool-actions@v0.9.2
env:
PARACHAIN_PALLET_ID: "0x50"
AUTHORIZE_UPGRADE_PREFIX: "0x02"
AUTHORIZE_UPGRADE_CHECK_VERSION: "true"
with:
chain: ${{ matrix.runtime }}
runtime_dir: runtimes/${{ matrix.runtime }}

- name: Summary
run: |
echo '${{ steps.srtool_build.outputs.json }}' | jq > ${{ matrix.runtime }}-srtool-digest.json
cat ${{ matrix.runtime }}-srtool-digest.json
echo "Compact Runtime: ${{ steps.srtool_build.outputs.wasm }}"
echo "Compressed Runtime: ${{ steps.srtool_build.outputs.wasm_compressed }}"

- name: Install subwasm
run: |
wget https://github.com/chevdor/subwasm/releases/download/${{ env.SUBWASM_VERSION }}/subwasm_linux_amd64_${{ env.SUBWASM_VERSION }}.deb
sudo dpkg -i subwasm_linux_amd64_${{ env.SUBWASM_VERSION }}.deb
subwasm --version

- name: Show Runtime information
shell: bash
run: |
subwasm info ${{ steps.srtool_build.outputs.wasm }}
subwasm info ${{ steps.srtool_build.outputs.wasm_compressed }}
subwasm --json info ${{ steps.srtool_build.outputs.wasm }} > ${{ matrix.runtime }}-info.json
subwasm --json info ${{ steps.srtool_build.outputs.wasm_compressed }} > ${{ matrix.runtime }}-compressed-info.json

- name: Extract the metadata
shell: bash
run: |
subwasm meta ${{ steps.srtool_build.outputs.wasm }}
subwasm --json meta ${{ steps.srtool_build.outputs.wasm }} > ${{ matrix.runtime }}-metadata.json

- name: Check the metadata diff
shell: bash
run: |
subwasm get -o ${{ matrix.runtime }}-live.wasm wss://${{ matrix.runtime }}.kilt.io
subwasm diff --no-color ${{ matrix.runtime }}-live.wasm ${{ steps.srtool_build.outputs.wasm }} || \
echo "Subwasm call failed, check the logs. This is likely because ${{ matrix.runtime }} is not known by subwasm" | \
tee ${{ matrix.chain }}-diff.txt

- name: Archive Subwasm results
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: ${{ matrix.runtime }}-runtime
path: |
${{ matrix.runtime }}-info.json
${{ matrix.runtime }}-compressed-info.json
${{ matrix.runtime }}-metadata.json
${{ matrix.runtime }}-diff.txt
${{ steps.srtool_build.outputs.wasm }}
${{ steps.srtool_build.outputs.wasm_compressed }}
${{ matrix.runtime }}-srtool-digest.json

51 changes: 51 additions & 0 deletions .github/workflows/try-runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Try-runtime

on:
push:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
TRY_RUNTIME_CLI_VERSION_TAG: v0.7.0
CARGO_HOME: ./.cargo

jobs:
test-try-runtime:
strategy:
matrix:
runtime: [peregrine, spiritnet]
runs-on: ubuntu-latest
container:
image: paritytech/ci-unified:bullseye-1.74.0

if: ${{ !contains(github.event.head_commit.message, 'ci-skip-rust') }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up caching for Cargo
uses: actions/cache@v4
with:
path: ${{ secrets.CARGO_CACHE_PATH }}
key: cargo-try-runtime-${{ matrix.runtime }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-try-runtime-${{ matrix.runtime }}-

- name: Run try-runtime
run: |
echo "Running ${{ matrix.runtime }} runtime migration check"

echo "---------- Downloading try-runtime CLI ----------"
curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/${{ env.TRY_RUNTIME_CLI_VERSION_TAG }}/try-runtime-x86_64-unknown-linux-musl -o try-runtime
chmod +x ./try-runtime
echo "Using try-runtime-cli version:"
./try-runtime --version

echo "---------- Building ${{ matrix.runtime }} runtime ----------"
cargo build --release --locked -p ${{ matrix.runtime }}-runtime --features try-runtime

echo "---------- Executing on-runtime-upgrade for ${{ matrix.runtime }} ----------"
./try-runtime --runtime ./target/release/wbuild/${{ matrix.runtime }}-runtime/${{ matrix.runtime }}_runtime.compact.compressed.wasm \
on-runtime-upgrade --disable-spec-version-check --checks=all ${{ matrix.subcommand_extra_args }} live --uri wss://${{ matrix.runtime }}.kilt.io
Loading
Loading