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

Update JS Packages #2249

Merged
merged 3 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 11 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -512,10 +512,9 @@ jobs:
name: Compare Metadata
Copy link
Collaborator Author

@wilwade wilwade Jan 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to test this locally?

  1. Download two release dev images to a folder and name them frequency.amd64 and frequency-ref.amd64 and make sure they are in your current folder.
  2. docker network create net-1153
  3. docker pull jacogr/polkadot-js-tools:0.61.2
docker run --platform=linux/amd64 --rm --net=net-1153 \
            -v `pwd`:/app \
            --name test-node \
            ubuntu:24.04 \
              /bin/sh -c "chmod +x /app/frequency.amd64 && /app/frequency.amd64 \
              --chain=dev \
              --rpc-external \
              --rpc-cors=all \
              --rpc-methods=Unsafe \
              --no-telemetry \
              --no-prometheus \
              --reserved-only \
              --no-hardware-benchmarks \
              --tmp \
              -- \
              --no-telemetry \
              --reserved-only"
docker run --platform=linux/amd64 --rm --net=net-1153 \
            -v `pwd`:/app \
            --name ref-node \
            ubuntu:24.04 \
              /bin/sh -c "chmod +x /app/frequency-ref.amd64 && /app/frequency-ref.amd64 \
              --chain=dev \
              --rpc-external \
              --rpc-cors=all \
              --rpc-methods=Unsafe \
              --no-telemetry \
              --no-prometheus \
              --reserved-only \
              --no-hardware-benchmarks \
              --tmp \
              -- \
              --no-telemetry \
              --reserved-only"
  1. docker run --platform=linux/amd64 --net=net-1153 jacogr/polkadot-js-tools:0.61.2 metadata ws://ref-node:9944 ws://test-node:9944

runs-on: ubuntu-22.04
env:
NETWORK: mainnet
BIN_DIR: target/release
BIN_FILENAME: frequency.amd64
TEST_BIN_FILENAME: frequency.amd64
BIN_FILENAME: frequency-dev.amd64
TEST_BIN_FILENAME: frequency-dev.amd64
TEST_DOWNLOAD_DIR: download-test
REF_BIN_FILENAME: frequency-ref.amd64
REF_DOWNLOAD_DIR: download-ref
Expand All @@ -524,7 +523,7 @@ jobs:
steps:
- name: Set Env Vars
run: |
echo "OUTPUT_FILENAME=metadata-compare-$NETWORK.txt" >> $GITHUB_ENV
echo "OUTPUT_FILENAME=metadata-compare.txt" >> $GITHUB_ENV
- name: Check Out Repo
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -571,7 +570,7 @@ jobs:
--name test-node \
ubuntu:24.04 \
/bin/sh -c "chmod +x /app/${{env.TEST_BIN_FILENAME}} && /app/${{env.TEST_BIN_FILENAME}} \
--chain=frequency \
--chain=dev \
--rpc-external \
--rpc-cors=all \
--rpc-methods=Unsafe \
Expand All @@ -581,6 +580,7 @@ jobs:
--no-hardware-benchmarks \
--tmp \
-- \
--no-telemetry \
--reserved-only"
- name: Start Reference Node
working-directory: ${{env.BIN_DIR}}
Expand All @@ -590,7 +590,7 @@ jobs:
--name ref-node \
ubuntu:24.04 \
/bin/sh -c "chmod +x /app/${{env.REF_BIN_FILENAME}} && /app/${{env.REF_BIN_FILENAME}} \
--chain=frequency \
--chain=dev \
--rpc-external \
--rpc-cors=all \
--rpc-methods=Unsafe \
Expand All @@ -600,6 +600,7 @@ jobs:
--no-hardware-benchmarks \
--tmp \
-- \
--no-telemetry \
--reserved-only"
- name: Prepare Output
working-directory: ${{env.OUTPUT_DIR}}
Expand All @@ -614,7 +615,7 @@ jobs:
- name: Compare Metadata
timeout-minutes: 10
run: |
CMD="docker run --pull always --net=net-${{env.RELEASE_BRANCH_NAME}} jacogr/polkadot-js-tools:0.59.1 metadata ws://ref-node:9944 ws://test-node:9944"
CMD="docker run --pull always --net=net-${{env.RELEASE_BRANCH_NAME}} jacogr/polkadot-js-tools:0.61.2 metadata ws://ref-node:9944 ws://test-node:9944"
echo -e "Running:\n$CMD"
$CMD >> ${{env.OUTPUT_DIR}}/${{env.OUTPUT_FILENAME}}
cat ${{env.OUTPUT_DIR}}/${{env.OUTPUT_FILENAME}} | egrep -n -i ''
Expand Down Expand Up @@ -786,7 +787,7 @@ jobs:
"${RUNTIME_INFO_MAINNET}" \
"${RUNTIME_INFO_PASEO}" \
"${IS_FULL_RELEASE}" \
"/tmp/metadata-compare-mainnet.txt" \
"/tmp/metadata-compare.txt" \
> release-notes.md
- name: Publish Release Candidate on GitHub
if: steps.is-full-release.outputs.is-full-release != 'true'
Expand All @@ -798,7 +799,7 @@ jobs:
tag_name: ${{env.NEW_RELEASE_TAG}}
files: |
/tmp/frequency*.*
/tmp/metadata-compare-*
/tmp/metadata-compare*
/tmp/polkadot-api-types-json/json/types.json
- name: Publish Full Release on GitHub
if: steps.is-full-release.outputs.is-full-release == 'true'
Expand All @@ -808,7 +809,7 @@ jobs:
tag_name: ${{env.NEW_RELEASE_TAG}}
files: |
/tmp/frequency*.*
/tmp/metadata-compare-*
/tmp/metadata-compare*
/tmp/polkadot-api-types-json/json/types.json
- name: Get Latest Commit
id: get-latest-commit
Expand Down
Loading
Loading