Skip to content

Commit

Permalink
Merge pull request #5165 from Joystream/petra
Browse files Browse the repository at this point in the history
Petra runtime release
  • Loading branch information
mnaamani authored Jun 17, 2024
2 parents fca2800 + 4fcb2e6 commit dabaa45
Show file tree
Hide file tree
Showing 66 changed files with 6,264 additions and 3,696 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/joystream-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: python setuptools
run: brew install python-setuptools
- name: checks
run: |
yarn install --frozen-lockfile --network-timeout 120000
Expand Down
62 changes: 32 additions & 30 deletions .github/workflows/joystream-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ jobs:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: checks
run: |
yarn install --frozen-lockfile
yarn workspace @joystream/types build
- name: npm pack test
run: |
cd types
npm pack | tail -1 | xargs tar xzf
cd package && npm install
node ./lib/cjs/index.js
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: checks
run: |
yarn install --frozen-lockfile
yarn workspace @joystream/types build
- name: npm pack test
run: |
cd types
npm pack | tail -1 | xargs tar xzf
cd package && npm install
node ./lib/cjs/index.js
types_checks_osx:
name: MacOS Checks
Expand All @@ -32,18 +32,20 @@ jobs:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: checks
run: |
yarn install --frozen-lockfile --network-timeout 120000
yarn workspace @joystream/types build
- name: npm pack test
run: |
cd types
npm pack | tail -1 | xargs tar xzf
cd package && npm install
node ./lib/cjs/index.js
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: python setuptools
run: brew install python-setuptools
- name: checks
run: |
yarn install --frozen-lockfile --network-timeout 120000
yarn workspace @joystream/types build
- name: npm pack test
run: |
cd types
npm pack | tail -1 | xargs tar xzf
cd package && npm install
node ./lib/cjs/index.js
38 changes: 20 additions & 18 deletions .github/workflows/lint-typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ jobs:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: lint
run: |
yarn build
yarn lint
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: lint
run: |
yarn build
yarn lint
lint_osx:
name: MacOS Checks
Expand All @@ -26,12 +26,14 @@ jobs:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: lint
run: |
yarn build
yarn lint
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: python setuptools
run: brew install python-setuptools
- name: lint
run: |
yarn build
yarn lint
50 changes: 26 additions & 24 deletions .github/workflows/query-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ jobs:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: checks
run: |
yarn install --frozen-lockfile
yarn workspace @joystream/types build
yarn workspace @joystream/metadata-protobuf build
yarn workspace @joystream/js build
yarn workspace query-node-root build
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: checks
run: |
yarn install --frozen-lockfile
yarn workspace @joystream/types build
yarn workspace @joystream/metadata-protobuf build
yarn workspace @joystream/js build
yarn workspace query-node-root build
query_node_build_osx:
name: MacOS Checks
Expand All @@ -29,15 +29,17 @@ jobs:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: checks
run: |
yarn install --frozen-lockfile --network-timeout 120000
yarn workspace @joystream/types build
yarn workspace @joystream/metadata-protobuf build
yarn workspace @joystream/js build
yarn workspace query-node-root build
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: python setuptools
run: brew install python-setuptools
- name: checks
run: |
yarn install --frozen-lockfile --network-timeout 120000
yarn workspace @joystream/types build
yarn workspace @joystream/metadata-protobuf build
yarn workspace @joystream/js build
yarn workspace query-node-root build
117 changes: 22 additions & 95 deletions .github/workflows/run-network-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: checks
run: |
yarn build
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: checks
run: |
yarn build
tests_build_osx:
name: MacOS Checks
Expand All @@ -30,14 +30,16 @@ jobs:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: checks
run: |
yarn build
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: python setuptools
run: brew install python-setuptools
- name: checks
run: |
yarn build
build_images:
name: Build joystream/node
Expand All @@ -54,8 +56,8 @@ jobs:
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'

Expand Down Expand Up @@ -159,8 +161,8 @@ jobs:
- scenario: 'setupNewChainMultiStorage'
no_storage: 'true'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Get artifacts
Expand All @@ -181,78 +183,3 @@ jobs:
export RUNTIME=${{ needs.build_images.outputs.runtime }}
export NO_STORAGE=${{ matrix.no_storage }}
tests/network-tests/run-tests.sh ${{ matrix.scenario }}
runtime_upgrade:
name: Runtime Upgrade from production runtime
needs: build_images
runs-on: ubuntu-latest
# Disabling until we find a workaround
# as it is no longer practical to start the node
# while importing huge state from production network in genesis block.
# if: github.ref != 'refs/heads/master'
if: false
steps:
# Checkout master branch
- name: check out master repo
uses: actions/checkout@v3
with:
repository: Joystream/joystream
ref: master

- name: pull base runtime image
id: pull_base_image
env:
RUNTIME_PROFILE: 'TESTING'
run: |
export RUNTIME=`scripts/runtime-code-shasum.sh`
echo "::set-output name=shasum::${RUNTIME}"
docker pull joystream/node:$RUNTIME
docker images
# Get new runtime built for this workflow (target runtime)
# tagged in local repo as joystream/node:latest
- name: Get artifacts
uses: actions/download-artifact@v3
with:
name: ${{ needs.build_images.outputs.use_artifact }}
- name: Install artifacts
run: |
docker load --input joystream-node-docker-image.tar.gz
docker images
# Checkout workflow's branch/tag/commit
- name: checkout workflow branch
uses: actions/checkout@v3

# Look only for changes that would indicate possible change in runtime version
# This is not the best way to check. Ideally the script "run-runtime-upgrade-tests.sh" should
# look for the change of `spec_version`, and exit gracefully.
- name: Check for runtime version change
uses: technote-space/get-diff-action@v3
with:
PREFIX_FILTER: |
runtime
runtime-modules
SUFFIX_FILTER: |
.rs
- name: setup node
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Install packages and dependencies
if: env.GIT_DIFF
run: |
yarn build
- name: Ensure tests are runnable
if: env.GIT_DIFF
run: yarn workspace network-tests build
- name: Execute network tests
if: env.GIT_DIFF
env:
TARGET_RUNTIME: ${{ needs.build_images.outputs.runtime }}
RUNTIME: ${{ steps.pull_base_image.outputs.shasum }}
run: |
export HOME=${PWD}
mkdir -p ${HOME}/.local/share/joystream-cli
yarn joystream-cli api:setUri ws://localhost:9944
tests/network-tests/run-runtime-upgrade-tests.sh
Loading

0 comments on commit dabaa45

Please sign in to comment.