Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into zkAuth-precompile-poc
Browse files Browse the repository at this point in the history
  • Loading branch information
Agusrodri committed Nov 4, 2024
2 parents aabb942 + 5dba038 commit 68ce1d2
Show file tree
Hide file tree
Showing 243 changed files with 22,884 additions and 22,248 deletions.
2 changes: 1 addition & 1 deletion .github/workflow-templates/dev-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ runs:
with:
node-version: 20.10.0
cache: "pnpm"
cache-dependency-path: test/pnpm-lock.yaml
cache-dependency-path: pnpm-lock.yaml

- name: Setup Moonbeam PolkadotJS types
shell: bash
Expand Down
53 changes: 49 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ jobs:
with:
node-version: 20.10.0
cache: "pnpm"
cache-dependency-path: test/pnpm-lock.yaml
cache-dependency-path: pnpm-lock.yaml
- name: Run Eslint check
run: |
cd test
Expand Down Expand Up @@ -500,7 +500,7 @@ jobs:
with:
ref: ${{ needs.set-tags.outputs.git_ref }}
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.5
uses: mozilla-actions/sccache-action@v0.0.6
- name: Setup Variables
shell: bash
run: |
Expand Down Expand Up @@ -613,7 +613,7 @@ jobs:
with:
node-version: 20.10.0
cache: "pnpm"
cache-dependency-path: test/pnpm-lock.yaml
cache-dependency-path: pnpm-lock.yaml
- run: |
mkdir -p target/release
- name: "Download branch built node"
Expand Down Expand Up @@ -739,6 +739,21 @@ jobs:
with:
name: moonbeam
path: target/release
- name: Setup Moonbeam PolkadotJS types
shell: bash
run: |
#### Preparing the legacy types
cd moonbeam-types-bundle
pnpm i
pnpm build
#### Preparing the typescript api
cd ../typescript-api
pnpm i
pnpm build
cd ../test
pnpm add ../typescript-api
- name: "Run lazy loading tests"
run: |
chmod uog+x target/release/moonbeam
Expand Down Expand Up @@ -782,7 +797,7 @@ jobs:
with:
node-version: 20.10.0
cache: "pnpm"
cache-dependency-path: test/pnpm-lock.yaml
cache-dependency-path: pnpm-lock.yaml
- name: Create local folders
run: |
mkdir -p target/release/wbuild/${{ matrix.chain }}-runtime/
Expand All @@ -792,6 +807,21 @@ jobs:
with:
name: runtimes
path: target/release/wbuild/${{ matrix.chain }}-runtime/
- name: Setup Moonbeam PolkadotJS types
shell: bash
run: |
#### Preparing the legacy types
cd moonbeam-types-bundle
pnpm i
pnpm build
#### Preparing the typescript api
cd ../typescript-api
pnpm i
pnpm build
cd ../test
pnpm add ../typescript-api
- name: "Install and run upgrade test"
run: |
cd test
Expand Down Expand Up @@ -854,6 +884,21 @@ jobs:
docker create --name moonbeam_container $DOCKER_TAG bash
docker cp moonbeam_container:moonbeam/moonbeam test/tmp/moonbeam_rt
docker rm -f moonbeam_container
- name: Setup Moonbeam PolkadotJS types
shell: bash
run: |
#### Preparing the legacy types
cd moonbeam-types-bundle
pnpm i
pnpm build
#### Preparing the typescript api
cd ../typescript-api
pnpm i
pnpm build
cd ../test
pnpm add ../typescript-api
- name: Prepare Chainspecs
run: |
cd test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
- name: Unit tests
run: |
# curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
# curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
# echo $PATH
cargo nextest run --release --workspace --features=evm-tracing
- name: "Run Moonwall Dev Tests"
Expand Down
51 changes: 18 additions & 33 deletions .github/workflows/publish-typescript-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ name: Publish Typescript API
on:
workflow_dispatch:
inputs:
sha:
description: full sha to build the npm package from
TargetSHA:
description: full sha of commit to publish ApiAugment from
required: true
DryRun:
description: Dry run mode
required: false
default: "false"

jobs:
publish-typescript-api:
Expand All @@ -13,43 +17,24 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.sha }}
- name: Use Node.js
ref: ${{ github.event.inputs.TargetSHA }}
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.10.0
- name: Build typescript API
- name: Build Typescript Augment API package
run: |
cd typescript-api
npm install
npm run build
pnpm i
pnpm build
- name: Publish typescript API
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: typescript-api/build/package.json

update-polkadot-js-for-tests-and-tools:
runs-on: ubuntu-latest
needs: ["publish-typescript-api"]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.sha }}
- name: Use pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.10.0
- name: Upgrade polkadotjs for tests
run: |
cd test
pnpm install @polkadot/api@latest
- name: Upgrade polkadotjs for tools
run: |
cd tools
npm install @polkadot/api@latest
package: typescript-api/package.json
dry-run: ${{ github.event.inputs.DryRun }}
2 changes: 1 addition & 1 deletion .github/workflows/subxt-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
name: runtime-diff-moonriver-${{ github.event.inputs.spec_version }}
path: runtime-diffs/moonriver
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v7
with:
base: master
branch: "runtime-diff-${{ github.event.inputs.spec_version }}"
Expand Down
34 changes: 20 additions & 14 deletions .github/workflows/upgrade-typescript-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,26 @@ on:
spec_version:
description: runtime spec version (ex. 1601)
required: true
dry_run:
description: Dry Run - do not create PR
required: false
type: boolean
default: false

jobs:
upgrading-typescript-api:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: runtime-${{ github.event.inputs.spec_version }}
- name: Retrieve moonbeam binary
run: |
DOCKER_TAG="moonbeamfoundation/moonbeam:runtime-${{ github.event.inputs.spec_version }}"
# Clear the dummy container if it wasn't properly cleaned up
docker rm -f dummy 2> /dev/null
docker create -ti --name dummy $DOCKER_TAG bash
mkdir -p build
docker cp dummy:/moonbeam/moonbeam build/moonbeam
docker rm -f dummy
docker rm -f rtRelease 2> /dev/null
docker create -ti --name rtRelease $DOCKER_TAG bash
mkdir -p target/release
docker cp rtRelease:/moonbeam/moonbeam target/release/moonbeam
docker rm -f rtRelease
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -31,26 +33,30 @@ jobs:
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false

- name: Upgrade polkadotjs for moonbeam-types-bundle
run: |
cd moonbeam-types-bundle
pnpm install
- name: Upgrade polkadotjs for typescript-api
run: |
cd typescript-api
pnpm install
pnpm run build
- name: regenerate typescript api with new runtime metadata
run: |
cd typescript-api
./scripts/runtime-upgrade.sh ${{ github.event.inputs.spec_version }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
if: ${{ !inputs.dry_run }}
uses: peter-evans/create-pull-request@v7
with:
base: master
branch: "typescript-api-${{ github.event.inputs.spec_version }}"
commit-message: typescript API v0.${{ github.event.inputs.spec_version }}.0
draft: true

title: "Upgrade typescript API for runtime-${{ github.event.inputs.spec_version }}"
reviewers: "moonsong-coredev"
labels: "B0-silent,D2-notlive"
- name: Display changes (Dry Run)
if: ${{ inputs.dry_run }}
run: |
git diff
echo "Dry run completed. Changes were not committed or pushed."
Loading

0 comments on commit 68ce1d2

Please sign in to comment.