Skip to content

Commit

Permalink
Merge branch 'master' into pablo/randomness-snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
pLabarta authored Sep 27, 2024
2 parents d3d1e50 + 7fb1b17 commit 8f63aab
Show file tree
Hide file tree
Showing 206 changed files with 20,026 additions and 9,507 deletions.
3 changes: 3 additions & 0 deletions .github/workflow-templates/cargo-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ runs:
params="$params --features ${{ inputs.features }}"
fi
echo "cargo build $params"
cargo build $params --features lazy-loading
cp target/release/moonbeam target/release/lazy-loading
cargo build $params
- name: Display binary comments
shell: bash
Expand All @@ -74,3 +76,4 @@ runs:
run: |
mkdir -p build
cp target/release/moonbeam build/moonbeam;
cp target/release/lazy-loading build/lazy-loading;
13 changes: 7 additions & 6 deletions .github/workflow-templates/dev-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ inputs:
runs:
using: "composite"
steps:
- uses: pnpm/action-setup@v3
- uses: pnpm/action-setup@v4
with:
version: 8.6.12
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20.10.0
Expand All @@ -33,15 +33,16 @@ runs:
run: |
#### Preparing the legacy types
cd moonbeam-types-bundle
npm ci
npm run build
pnpm i
pnpm build
#### Preparing the typescript api
cd ../typescript-api
npm ci
pnpm i
pnpm build
cd ../test
pnpm i ../typescript-api
pnpm add ../typescript-api
- name: "Install and run dev test"
shell: bash
Expand Down
82 changes: 71 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ jobs:
chmod +x bin/ec-linux-amd64
- name: Check files
# Prettier and editorconfig-checker have different ideas about indentation
run: /tmp/bin/ec-linux-amd64 --exclude "(typescript-api\/src\/moon(?:base|beam|river)\/interfaces\/.*\.ts)|(test\/contracts\/lib\/.*)" -disable-indent-size
run: /tmp/bin/ec-linux-amd64 --exclude "(typescript-api\/)|(test\/contracts\/lib\/.*)" -disable-indent-size

check-prettier:
name: "Check with Prettier"
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
- name: Use pnpm
uses: pnpm/action-setup@v4
with:
version: 8.6.12
version: 9
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -594,7 +594,7 @@ jobs:
(github.event_name == 'push' && github.ref == 'refs/heads/master')
runs-on:
labels: bare-metal
needs: ["set-tags", "build"]
needs: ["set-tags", "build", "dev-test"]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -607,7 +607,7 @@ jobs:
- name: Use pnpm
uses: pnpm/action-setup@v4
with:
version: 8.6.12
version: 9
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -633,12 +633,13 @@ jobs:
#### Preparing the repository
cd moonbeam-types-bundle
npm ci
npm run build
pnpm i
pnpm build
#### Preparing the typescript api
cd ../typescript-api
npm ci
pnpm i
pnpm build
- name: Running Tracing Tests
env:
DEBUG_COLOURS: "1"
Expand Down Expand Up @@ -700,10 +701,68 @@ jobs:
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.licenses=${{ github.event.repository.license.spdx_id }}
lazy-loading-tests:
runs-on:
labels: bare-metal
needs: ["set-tags", "build", "typescript-tracing-tests"]
strategy:
fail-fast: false
max-parallel: 1
matrix:
chain: ["moonbeam"]
env:
GH_WORKFLOW_MATRIX_CHAIN: ${{ matrix.chain }}
DEBUG_COLORS: 1
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ needs.set-tags.outputs.git_ref }}
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20.10.0
- name: Create local folders
run: |
mkdir -p target/release/wbuild/${{ matrix.chain }}-runtime/
mkdir -p test/tmp
- name: "Download branch built runtime"
uses: actions/download-artifact@v4
with:
name: runtimes
path: target/release/wbuild/${{ matrix.chain }}-runtime/
- name: "Download branch built node"
uses: actions/download-artifact@v4
with:
name: moonbeam
path: target/release
- name: "Run lazy loading tests"
run: |
cd test
pnpm install
chmod uog+x ../target/release/lazy-loading
pnpm moonwall test lazy_loading_${{ matrix.chain }}
- name: Zip and Upload Node Logs on Failure
if: failure()
run: |
TIMESTAMP=$(date +%Y%m%d%H%M%S)
export NODE_LOGS_ZIP="node_logs_$TIMESTAMP.zip"
MOST_RECENT_ZOMBIE_DIR=$(ls -td /tmp/zombie-* | head -n 1)
find $MOST_RECENT_ZOMBIE_DIR -maxdepth 1 -type f -name '*.log' -exec zip -r $NODE_LOGS_ZIP {} \;
echo "NODE_LOGS_ZIP=${NODE_LOGS_ZIP}" >> $GITHUB_ENV
- uses: actions/upload-artifact@v4
if: failure()
with:
name: failed-node-logs
path: ${{ env.NODE_LOGS_ZIP }}

chopsticks-upgrade-test:
runs-on:
labels: bare-metal
needs: ["set-tags", "build"]
needs: ["set-tags", "build", "typescript-tracing-tests"]
strategy:
fail-fast: false
matrix:
Expand All @@ -718,7 +777,7 @@ jobs:
ref: ${{ needs.set-tags.outputs.git_ref }}
- uses: pnpm/action-setup@v4
with:
version: 8
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20.10.0
Expand Down Expand Up @@ -750,9 +809,10 @@ jobs:
zombie_upgrade_test:
runs-on:
labels: bare-metal
needs: ["set-tags", "build"]
needs: ["set-tags", "build", "typescript-tracing-tests"]
strategy:
fail-fast: false
max-parallel: 1
matrix:
## TODO: add moonriver here when it is ready
chain: ["moonbase", "moonbeam"]
Expand All @@ -767,7 +827,7 @@ jobs:
ref: ${{ needs.set-tags.outputs.git_ref }}
- uses: pnpm/action-setup@v4
with:
version: 8
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20.10.0
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/check-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Check benchmarks

on:
workflow_dispatch:
on:
schedule:
- cron: "0 5 * * 0" # Runs every Sunday at 5:00 AM UTC
- cron: "0 5 * * 3" # Runs every Wednesday at 5:00 AM UTC

jobs:
set-tags:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- id: get-version
run: |
RUST_VERSION=$(cat rust-toolchain | grep channel | grep --only-matching --perl-regexp "(\d+\.){2}\d+(-nightly)?")
echo "::set-output name=rust_version::$RUST_VERSION"
echo "rust_version=$RUST_VERSION" >> $GITHUB_OUTPUT
build-srtool-runtimes:
needs: ["setup-scripts", "read-rust-version"]
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
GH_WORKFLOW_MATRIX_CHAIN: ${{ matrix.chain }}
GH_WORKFLOW_MATRIX_SRTOOL_IMAGE: ${{ matrix.srtool_image }}
GH_WORKFLOW_MATRIX_SRTOOL_IMAGE_TAG: ${{ matrix.srtool_image_tag }}
RUNTIME_BUILD_OPTS: "--features on-chain-release-build"
RUNTIME_BUILD_OPTS: "--features=on-chain-release-build"
RUNTIME_BUILD_PROFILE: "production"
run: |
# Ensure we have permissions to write to the runtime folder target for the docker user
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-typescript-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Use pnpm
uses: pnpm/action-setup@v4
with:
version: 8.6.12
version: 9
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/upgrade-typescript-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,16 @@ jobs:
- name: Use pnpm
uses: pnpm/action-setup@v4
with:
version: 8
version: 9
- name: Upgrade polkadotjs for moonbeam-types-bundle
run: |
cd moonbeam-types-bundle
npm install @polkadot/api@latest
pnpm install
- name: Upgrade polkadotjs for typescript-api
run: |
cd typescript-api
npm install @polkadot/api@latest
npm install @polkadot/typegen@latest
npm run build
pnpm install
pnpm run build
- name: regenerate typescript api with new runtime metadata
run: |
cd typescript-api
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"editor.formatOnSave": true,
"editor.rulers": [100],
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
Expand Down
Loading

0 comments on commit 8f63aab

Please sign in to comment.