Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Commit

Permalink
Pushing Move on aptos upstream
Browse files Browse the repository at this point in the history
This PR contains commits from aptos-core over the last 9 months and brings the aptos-main branch up-to-date to get ready for forking.

The Cargo.toml has been updated to contain workspace dependencies as now used by the Move code.
  • Loading branch information
wrwg committed May 1, 2024
1 parent bd63378 commit bee3bf9
Show file tree
Hide file tree
Showing 10 changed files with 2,283 additions and 1,993 deletions.
1 change: 1 addition & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ xclippy = [
"-Aclippy::enum-variant-names",
"-Aclippy::result-large-err",
"-Aclippy::mutable-key-type",
"-Aclippy::map-identity",
]

[target.x86_64-pc-windows-msvc]
Expand Down
1 change: 0 additions & 1 deletion .github/actions/build-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,5 @@ runs:
- id: rust-environment
shell: bash
run: |
echo 'RUST_BACKTRACE=1' | tee -a $GITHUB_ENV
echo 'DIEM_DUMP_LOGS=1' | tee -a $GITHUB_ENV
echo 'CARGO_INCREMENTAL=0' | tee -a $GITHUB_ENV
250 changes: 58 additions & 192 deletions .github/workflows/ci-pre-land.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,64 +70,64 @@ jobs:
run: cargo test --workspace --profile ci
- uses: ./.github/actions/build-teardown

hardhat-tests:
runs-on: ubuntu-latest
timeout-minutes: 30
needs: prepare
env:
# Default is 2mb which is not enough for Move compiler in debug mode, so we up it to 16mB
RUST_MIN_STACK: 16000000
# if: ${{ needs.prepare.outputs.test-rust == 'true' }}
steps:
- uses: actions/checkout@v2.4.0
- uses: ./.github/actions/build-setup
- uses: Swatinem/rust-cache@c5ed9ba6b7e1bb8aff90d43acd2f0af4990fa57c
- name: compile and install move-cli
run: "cargo install --features evm-backend --path language/tools/move-cli"
- name: set up hardhat-move
working-directory: language/evm/hardhat-move
run: "npm install"
- name: compile hardhat-move
working-directory: language/evm/hardhat-move
run: "npm run build"
- name: set up hardhat
working-directory: language/evm/hardhat-examples
run: "./setup.sh"
- name: run hardhat tests
working-directory: language/evm/hardhat-examples
run: "npx hardhat test"
# TODO: reenable this once we figure a way to keep package-lock.json stable.
# - uses: ./.github/actions/build-teardown

move-cli-tests-evm:
runs-on: ubuntu-latest
timeout-minutes: 30
needs: prepare
env:
# Default is 2mb which is not enough for Move compiler in debug mode, so we up it to 16mB
RUST_MIN_STACK: 16000000
steps:
- uses: actions/checkout@v2.4.0
- uses: ./.github/actions/build-setup
- uses: Swatinem/rust-cache@c5ed9ba6b7e1bb8aff90d43acd2f0af4990fa57c
- name: run EVM-based move cli tests
run: "echo skipped"
#run: "cargo test --features evm-backend -p move-cli --test build_testsuite_evm --test move_unit_tests_evm" TODO: reenable

move-unit-test-framework-tests-evm:
runs-on: ubuntu-latest
timeout-minutes: 30
needs: prepare
env:
# Default is 2mb which is not enough for Move compiler in debug mode, so we up it to 16mB
RUST_MIN_STACK: 16000000
steps:
- uses: actions/checkout@v2.4.0
- uses: ./.github/actions/build-setup
- uses: Swatinem/rust-cache@c5ed9ba6b7e1bb8aff90d43acd2f0af4990fa57c
- name: run EVM-based move unit test framework tests
run: "echo skipped"
# run: "cargo test --features evm-backend -p move-unit-test --test move_unit_test_testsuite" TODO: reenable
# hardhat-tests:
# runs-on: ubuntu-latest
# timeout-minutes: 30
# needs: prepare
# env:
# # Default is 2mb which is not enough for Move compiler in debug mode, so we up it to 16mB
# RUST_MIN_STACK: 16000000
# # if: ${{ needs.prepare.outputs.test-rust == 'true' }}
# steps:
# - uses: actions/checkout@v2.4.0
# - uses: ./.github/actions/build-setup
# - uses: Swatinem/rust-cache@c5ed9ba6b7e1bb8aff90d43acd2f0af4990fa57c
# - name: compile and install move-cli
# run: "cargo install --features evm-backend --path language/tools/move-cli"
# - name: set up hardhat-move
# working-directory: language/evm/hardhat-move
# run: "npm install"
# - name: compile hardhat-move
# working-directory: language/evm/hardhat-move
# run: "npm run build"
# - name: set up hardhat
# working-directory: language/evm/hardhat-examples
# run: "./setup.sh"
# - name: run hardhat tests
# working-directory: language/evm/hardhat-examples
# run: "npx hardhat test"
# # TODO: reenable this once we figure a way to keep package-lock.json stable.
# # - uses: ./.github/actions/build-teardown

# move-cli-tests-evm:
# runs-on: ubuntu-latest
# timeout-minutes: 30
# needs: prepare
# env:
# # Default is 2mb which is not enough for Move compiler in debug mode, so we up it to 16mB
# RUST_MIN_STACK: 16000000
# steps:
# - uses: actions/checkout@v2.4.0
# - uses: ./.github/actions/build-setup
# - uses: Swatinem/rust-cache@c5ed9ba6b7e1bb8aff90d43acd2f0af4990fa57c
# - name: run EVM-based move cli tests
# run: "echo skipped"
# #run: "cargo test --features evm-backend -p move-cli --test build_testsuite_evm --test move_unit_tests_evm" TODO: reenable

# move-unit-test-framework-tests-evm:
# runs-on: ubuntu-latest
# timeout-minutes: 30
# needs: prepare
# env:
# # Default is 2mb which is not enough for Move compiler in debug mode, so we up it to 16mB
# RUST_MIN_STACK: 16000000
# steps:
# - uses: actions/checkout@v2.4.0
# - uses: ./.github/actions/build-setup
# - uses: Swatinem/rust-cache@c5ed9ba6b7e1bb8aff90d43acd2f0af4990fa57c
# - name: run EVM-based move unit test framework tests
# run: "echo skipped"
# # run: "cargo test --features evm-backend -p move-unit-test --test move_unit_test_testsuite" TODO: reenable

diem-framework-build-all-packages:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -174,126 +174,6 @@ jobs:
run: "echo skipped"
# run: "language/documentation/examples/diem-framework/prove_all.sh" TODO: reenable

# Disable benchmarks for now
# Compile (but don't run) the benchmarks, to insulate against bit rot
# build-benchmarks:
# runs-on: ubuntu-latest
# timeout-minutes: 30
# needs: prepare
# if: ${{ needs.prepare.outputs.test-rust == 'true' }}
# steps:
# - uses: actions/checkout@v2.4.0
# - uses: ./.github/actions/build-setup
# - uses: actions/cache@v2.1.6
# with:
# path: "/opt/cargo/git\n/opt/cargo/registry\n/opt/cargo/.package-cache"
# key: crates-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
# restore-keys: "crates-${{ runner.os }}"
# - name: build benchmarks
# run: cargo x bench --no-run
# - uses: ./.github/actions/build-teardown
#
# perf-benchmarks:
# name: run-perf-benchmarks
# runs-on: ubuntu-latest
# timeout-minutes: 30
# needs:
# - prepare
# - build-benchmarks
# env:
# CRITERION_HOME: /tmp/benches
# steps:
# - uses: actions/checkout@v2.4.0
# - uses: actions/cache@v2.1.6
# with:
# path: "/opt/cargo/git\n/opt/cargo/registry\n/opt/cargo/.package-cache"
# key: crates-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
# restore-keys: "crates-${{ runner.os }}"
# - name: Download the previous baseline
# continue-on-error: true
# uses: actions/download-artifact@v2
# with:
# name: bench-baseline
# - name: Run performance benchamrks
# run: |
# # Replace this with a cargo x bench
# cargo bench --package language-benchmarks
# - name: Archive criterion results
# uses: actions/upload-artifact@v2
# with:
# name: bench-baseline
# retention-days: 5
# path: |
# /tmp/benches

test-move-analyzer-vscode-extension:
name: Test VS Code extension for move-analyzer
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-11, windows-2022]
runs-on: ${{ matrix.os }}
needs:
- prepare
steps:
- uses: actions/checkout@v2.4.0
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
- name: Install lld
uses: knicknic/os-specific-run@v1.0.3
with:
linux: sudo apt-get -y install lld
- name: Use Node.js 14
uses: actions/setup-node@v2.4.0
with:
node-version: "14"
- name: Install NPM dependencies
working-directory: language/move-analyzer/editors/code
run: npm install
- name: Build the extension
working-directory: language/move-analyzer/editors/code
run: npm run pretest
- name: Test the extension
# VS Code tests require display output. This action simulates such a
# display, using Xvfb. (It's roughly equivalent to prefixing the 'run'
# commands below with `xvfb-run <command>`.) Without a simulated display
# such as this one, the tests would fail with the error message:
# "Unable to open X display."
uses: GabrielBB/xvfb-action@v1.5
with:
working-directory: language/move-analyzer/editors/code
run: npm run test

release-move-analyzer-vscode-extension:
name: Release VS Code extension for move-analyzer
runs-on: ubuntu-20.04
needs:
- prepare
steps:
- uses: actions/checkout@v2.4.0
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
- name: Install lld
run: sudo apt-get -y install lld
- name: Use Node.js 14
uses: actions/setup-node@v2.4.0
with:
node-version: "14"
- name: Install NPM dependencies
working-directory: language/move-analyzer/editors/code
run: npm install
- name: Build the extension
working-directory: language/move-analyzer/editors/code
run: npm run pretest
- name: Package the extension
working-directory: language/move-analyzer/editors/code
run: npm run package
- name: Upload VS Code extension
uses: actions/upload-artifact@v2
with:
name: move-analyzer-vscode-extension
path: language/move-analyzer/editors/code/move-analyzer.vsix

check-for-broken-links:
name: Check for broken links in files
runs-on: ubuntu-latest
Expand All @@ -313,17 +193,3 @@ jobs:
# # Don't look in git or target dirs. Don't check png, bib, tex, js, or shell files
# # We allow links to be redirects, allow duplicates, and we also allow Too Many Requests (429) errors
# find . -not \( -path "./.git*" -prune \) -not \( -path "./target" -prune \) -type f -not -name "*.png" -not -name "*.ai" -not -name "*.jpg" -not -name "*.svg" -not -name "*.sh" -not -name "*.bib" -not -name "*.tex" -not -name "*.js" -not -name "package-lock.json" | while read arg; do awesome_bot --allow-redirect --allow-dupe --allow 429 --skip-save-results $arg; done

build-move-cli-docker-image:
name: Build Docker image for the Move CLI
runs-on: ubuntu-latest
needs:
- prepare
steps:
- uses: actions/checkout@v2.4.0
- name: Build Dockerfile
run: "docker build -t move/cli -f docker/move-cli/Dockerfile ."
- name: Build BasicCoin Move module
run: |
cd ./language/documentation/tutorial/step_1/BasicCoin
docker run -v `pwd`:/project move/cli build
Loading

0 comments on commit bee3bf9

Please sign in to comment.