Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into HEAD
Browse files Browse the repository at this point in the history
This merges `origin/main` into the tip of the vm rewrite
  • Loading branch information
tzakian committed Dec 11, 2024
2 parents 6223718 + 3262677 commit 5cba4a5
Show file tree
Hide file tree
Showing 3,968 changed files with 319,992 additions and 98,666 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ status-level = "skip"
# Do not cancel the test run on the first failure.
fail-fast = false
# Retry failing tests in order to not block builds on flaky tests
retries = 5
retries = 3
# Timeout tests after 4 minutes
slow-timeout = { period = "60s", terminate-after = 5 }

Expand Down
14 changes: 12 additions & 2 deletions .github/actions/diffs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,19 @@ outputs:
isMoveAutoFormatter:
description: True when changes happened in MoveAutoFormatter code
value: "${{ steps.diff.outputs.isMoveAutoFormatter }}"
isMoveAnalyzerTraceAdapter:
description: True when changes happened in Trace Adapter
value: "${{ steps.diff.outputs.isMoveAnalyzerTraceAdapter }}"
isExamples:
description: True when changes happened in examples/ directory
value: "${{ steps.diff.outputs.isExamples }}"

runs:
using: composite
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1
- name: Detect Changes
uses: dorny/paths-filter@v2.10.2
uses: dorny/paths-filter@v3
id: diff
with:
filters: |
Expand All @@ -38,7 +44,7 @@ runs:
- 'external-crates/**'
- 'narwhal/**'
- 'sui-execution/**'
- '.github/workflows/codecov.yml'
- '.github/workflows/cargo-llvm-cov.yml'
- '.github/workflows/rust.yml'
- '.github/workflows/external.yml'
- 'Cargo.lock'
Expand Down Expand Up @@ -76,3 +82,7 @@ runs:
- 'sui-execution/**'
isMoveAutoFormatter:
- 'external-crates/move/crates/move-analyzer/prettier-plugin/**'
isMoveAnalyzerTraceAdapter:
- 'external-crates/move/crates/move-analyzer/trace-adapter/**'
isExamples:
- 'examples/**'
12 changes: 8 additions & 4 deletions .github/actions/ts-e2e/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,15 @@ runs:

- name: cargo build
if: env.s3_file_exist == '' # if empty, we have not built and uploaded this binary to s3 yet
run: |
cargo build --bin sui --features indexer
run: cargo build --bin sui
shell: bash

- name: Dowload from S3
if: env.s3_file_exist != '' # only download if the s3 file exists
working-directory: ./target/debug
run: |
mkdir -p $PWD/target/debug
wget -O target/debug/sui https://sui-releases.s3.us-east-1.amazonaws.com/${{ github.sha }}/debug/sui-pg
wget -O target/debug/sui https://sui-releases.s3.us-east-1.amazonaws.com/${{ github.sha }}/debug/sui
chmod +x $PWD/target/debug/sui
shell: bash

Expand All @@ -62,5 +61,10 @@ runs:
shell: bash

- name: Run TS SDK e2e tests
run: pnpm dlx concurrently --kill-others --success command-1 "$E2E_RUN_LOCAL_NET_CMD" 'pnpm --filter @mysten/sui --filter @mysten/graphql-transport test:e2e'
run: pnpm dlx concurrently --kill-others --success command-1 "$E2E_RUN_LOCAL_NET_CMD" 'pnpm --filter @mysten/sui test:e2e'
shell: bash

- name: Run TS SDK GraphQL compatibility e2e tests
if: (!contains(fromJSON('["testnet", "devnet"]'), inputs.ref))
run: pnpm dlx concurrently --kill-others --success command-1 "$E2E_RUN_LOCAL_NET_CMD" 'pnpm --filter @mysten/graphql-transport test:e2e'
shell: bash
4 changes: 3 additions & 1 deletion .github/workflows/bridge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,11 @@ jobs:
working-directory: bridge/evm
run: |
forge soldeer update
- name: Add postgres to PATH
run: echo "/usr/lib/postgresql/14/bin" >> $GITHUB_PATH
- name: cargo test
run: |
cargo nextest run --profile ci -E 'package(sui-bridge)'
cargo nextest run --profile ci -E 'package(sui-bridge) | package(sui-bridge-indexer)'
# Ensure there are no uncommitted changes in the repo after running tests
- run: scripts/changed-files.sh
shell: bash
Expand Down
51 changes: 13 additions & 38 deletions .github/workflows/cargo-llvm-cov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,23 @@ jobs:
with:
ref: ${{ github.event.inputs.sui_repo_ref || github.ref }}

- uses: bmwill/rust-cache@v1

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Install nextest
uses: taiki-e/install-action@nextest

- uses: taiki-e/install-action@protoc
- name: Add postgres to PATH
run: echo "/usr/lib/postgresql/14/bin" >> $GITHUB_PATH

- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 256

- name: Run code coverage for nextest
run: RUSTFLAGS="-C debuginfo=0" SUI_SKIP_SIMTESTS=1 cargo llvm-cov --ignore-run-fail --lcov --output-path lcov.info nextest -vv -E '!package(sui-bridge)'
run: RUSTFLAGS="-C debuginfo=0" SUI_SKIP_SIMTESTS=1 cargo llvm-cov --ignore-run-fail --lcov --output-path lcov.info nextest -vv -E '!package(sui-bridge) and !package(sui-bridge-indexer)'

- name: Upload report to Codecov for nextest
uses: codecov/codecov-action@e0b68c6749509c5f83f984dd99a76a1c1a231044 # pin v4.0.1
Expand Down Expand Up @@ -149,7 +151,7 @@ jobs:
echo "slack_id=$(echo ${slack_id} | tr -d '"')" >> $GITHUB_ENV
- name: Post to slack
uses: slackapi/slack-github-action@v1.24.0 # pin@v1.21.0
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # pin@v1.27.0
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SUI_SHA: ${{ env.sui_sha }}
Expand All @@ -160,36 +162,9 @@ jobs:
ONCALL_NAME: ${{ env.oncall_name }}
with:
channel-id: 'code-coverage'
payload: |
{
"text": "*${{ github.workflow }}* workflow status: `${{ env.WORKFLOW_CONCLUSION }}`",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*${{ github.workflow }}* workflow status: `${{ env.WORKFLOW_CONCLUSION }}`"
}
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Sui commit: <https://github.com/MystenLabs/sui/commit/${{ env.SUI_SHA }}|${{ env.SUI_SHA }}>\nSui branch: `${{ env.SUI_BRANCH_NAME }}`\nRun: <${{ env.GH_JOB_LINK }}|${{ github.run_id }}>"
}
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "<@${{ env.SLACK_ID }}>, current `${{ env.ONCALL_NAME }}` oncall, you are notified to look over the code coverage <https://app.codecov.io/github/MystenLabs/sui/tree/${{ env.SUI_BRANCH_NAME_URL }}|report> for the `${{ env.SUI_BRANCH_NAME }}` branch in Sui repo, to manually check if there are coverage regressions."
}
}
]
}
slack-message: |
*${{ github.workflow }}* workflow status: `${{ env.WORKFLOW_CONCLUSION }}`
Sui commit: <https://github.com/MystenLabs/sui/commit/${{ env.SUI_SHA }}|${{ env.SUI_SHA }}>
Sui branch: `${{ env.SUI_BRANCH_NAME }}`
Run: <${{ env.GH_JOB_LINK }}|${{ github.run_id }}>
<@${{ env.SLACK_ID }}>, current `${{ env.ONCALL_NAME }}` oncall, please look over the code coverage <https://app.codecov.io/github/MystenLabs/sui/tree/${{ env.SUI_BRANCH_NAME_URL }}|report> for the `${{ env.SUI_BRANCH_NAME }}` branch in Sui repo, to manually check if there are coverage regressions.
2 changes: 1 addition & 1 deletion .github/workflows/changesets-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: |
echo "true" > missing-changeset.txt
- name: Upload missing changeset artifact
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # pin@v3
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@4.4.3
if: steps.has-changesets.outputs.any_changed != 'true' && steps.diff.outputs.hasChanges == 'true'
with:
name: missing-changeset
Expand Down
64 changes: 0 additions & 64 deletions .github/workflows/codecov.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,29 @@ jobs:
outputs:
isDoc: ${{ steps.diff.outputs.isDoc }}
isOldDoc: ${{ steps.diff.outputs.isOldDoc }}
isExamples: ${{ steps.diff.outputs.isExamples }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1
- name: Detect Changes
uses: './.github/actions/diffs'
id: diff

examples:
name: Notify Slack if examples directory changed
needs: diff
if: needs.diff.outputs.isExamples == 'true'
runs-on: [ubuntu-latest]

steps:
- name: Notify Slack of Examples Changes
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # [email protected]
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
with:
channel-id: 'tech-docs'
slack-message: |
An open PR modifies files in the `examples/` directory.
Please review it: <https://github.com/${{ github.repository }}/pull/${{ github.event.number }}|PR${{ github.event.number }}>
spelling:
name: Lint documentation
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # [email protected]
with:
version: 9.1.1
- run: cargo build --bin sui --features indexer --profile dev
- run: cargo build --bin sui --profile dev
- name: Install Nodejs
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # [email protected]
with:
Expand All @@ -70,8 +70,8 @@ jobs:
if: ${{ needs.diff.outputs.isTypescriptSDK == 'true' || needs.diff.outputs.isRust == 'true'}}
run: pnpm dlx concurrently --kill-others --success command-1 "$E2E_RUN_LOCAL_NET_CMD" 'pnpm --filter @mysten/sui test:e2e'

- name: Run RPC/GrpahQL comaptability e2e tests
if: ${{ needs.diff.outputs.isGraphQlTransport == 'true' || needs.diff.outputs.isRust == 'true'}}
- name: Run RPC/GraphQL compatibility e2e tests
if: ${{ needs.diff.outputs.isGraphQlTransport == 'true' || needs.diff.outputs.isRust == 'true' }}
run: pnpm dlx concurrently --kill-others --success command-1 "$E2E_RUN_LOCAL_NET_CMD" 'pnpm --filter @mysten/graphql-transport test:e2e'

# - name: Run Local net
Expand Down
91 changes: 91 additions & 0 deletions .github/workflows/ide-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: IDE Tests

on:
push:
branches: main
pull_request:
types: [ opened, synchronize, reopened, ready_for_review ]
workflow_dispatch:
inputs:
sui_repo_ref:
description: "Branch / commit to test"
type: string
required: false
default: ''

jobs:
diff:
runs-on: [ubuntu-latest]
outputs:
isMoveAutoFormatter: ${{ steps.diff.outputs.isMoveAutoFormatter }}
isMoveAnalyzerTraceAdapter: ${{ steps.diff.outputs.isMoveAnalyzerTraceAdapter }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1
- name: Detect Changes
uses: './.github/actions/diffs'
id: diff

move-auto-formatter-ci-test:
name: Move Auto-formatter Test
needs: diff
if: needs.diff.outputs.isMoveAutoFormatter == 'true'
runs-on: [ ubuntu-latest ]

steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1
with:
ref: ${{ github.event.inputs.sui_repo_ref || github.ref }}

- name: pnpm setup
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # [email protected]
with:
version: 9.1.1

- name: Setup Node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # [email protected]
with:
node-version: '20'
cache: 'pnpm'

- name: Install dependencies
working-directory: ./external-crates/move/crates/move-analyzer/prettier-plugin
run: npm install && npm i web-tree-sitter

- name: Run npm test
working-directory: ./external-crates/move/crates/move-analyzer/prettier-plugin
shell: bash
run: npm run test

move-analyzer-trace-adapter-ci-test:
name: Trace Adapter Test
needs: diff
if: needs.diff.outputs.isMoveAnalyzerTraceAdapter == 'true'
runs-on: [ ubuntu-latest ]

steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1
with:
ref: ${{ github.event.inputs.sui_repo_ref || github.ref }}

- name: pnpm setup
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # [email protected]
with:
version: 9.1.1

- name: Setup Node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # [email protected]
with:
node-version: '20'
cache: 'pnpm'

- name: Install dependencies
working-directory: ./external-crates/move/crates/move-analyzer/trace-adapter
shell: bash
run: npm install

- name: Run npm test
working-directory: ./external-crates/move/crates/move-analyzer/trace-adapter
shell: bash
run: npm run test
Loading

0 comments on commit 5cba4a5

Please sign in to comment.