forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/mainnet' into update
- Loading branch information
Showing
895 changed files
with
48,335 additions
and
17,843 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# This file contains settings for `cargo hakari`. | ||
# See https://docs.rs/cargo-hakari/latest/cargo_hakari/config for a full list of options. | ||
|
||
# Right now we're only using hakari in a sort of hybrid manually managed mode | ||
# to enforce that rocksdb is built only a single time in the workspace | ||
hakari-package = "typed-store-workspace-hack" | ||
|
||
# Format version for hakari's output. Version 4 requires cargo-hakari 0.9.22 or above. | ||
dep-format-version = "4" | ||
|
||
# Setting workspace.resolver = "2" in the root Cargo.toml is HIGHLY recommended. | ||
# Hakari works much better with the new feature resolver. | ||
# For more about the new feature resolver, see: | ||
# https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#cargos-new-feature-resolver | ||
resolver = "2" | ||
|
||
# Add triples corresponding to platforms commonly used by developers here. | ||
# https://doc.rust-lang.org/rustc/platform-support.html | ||
platforms = [ | ||
"x86_64-unknown-linux-gnu", | ||
"x86_64-apple-darwin", | ||
# "x86_64-pc-windows-msvc", | ||
] | ||
|
||
# Write out exact versions rather than a semver range. (Defaults to false.) | ||
# exact-versions = true | ||
output-single-feature = true | ||
unify-target-host = "unify-if-both" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Create Sui Release with Release Notes | ||
|
||
concurrency: ${{ github.workflow }}-${{ inputs.release_tag }} | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_tag: | ||
description: 'Sui Release Tag' | ||
type: string | ||
required: true | ||
previous_branch: | ||
description: 'Previous Release Branch (Ex: releases/sui-vX.XX.X-release)' | ||
type: string | ||
required: true | ||
current_branch: | ||
description: 'Current Release Branch (Ex: releases/sui-vX.XX.X-release)' | ||
type: string | ||
required: true | ||
|
||
env: | ||
RELEASE_NOTES_FILE: "./release_notes.txt" | ||
|
||
jobs: | ||
get-release-notes: | ||
name: Get Release Notes for ${{ inputs.release_tag }} release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Get commits for branches | ||
shell: bash | ||
working-directory: ./ | ||
run: | | ||
echo "previous_commit=$(curl https://api.github.com/repos/MystenLabs/sui/commits/${{ inputs.previous_branch }} | jq .sha)" >> $GITHUB_ENV | ||
echo "current_commit=$(curl https://api.github.com/repos/MystenLabs/sui/commits/${{ inputs.current_branch }} | jq .sha)" >> $GITHUB_ENV | ||
- name: Checkout main | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1 | ||
with: | ||
fetch-depth: 0 | ||
ref: main | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # [email protected] | ||
with: | ||
python-version: 3.10.10 | ||
|
||
- name: Generate Release Notes | ||
shell: bash | ||
working-directory: ./ | ||
run: | | ||
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} python ./scripts/release_notes.py generate ${{ env.previous_commit }} ${{ env.current_commit }} | tee -a ${{ env.RELEASE_NOTES_FILE }} | ||
echo "---" >> ${{ env.RELEASE_NOTES_FILE }} | ||
echo "#### Full Log: https://github.com/MystenLabs/sui/commits/${{ inputs.release_tag }}" >> ${{ env.RELEASE_NOTES_FILE }} | ||
if [[ ${{ inputs.release_tag }} == devnet* ]]; then | ||
echo "pre_release=true" >> $GITHUB_ENV | ||
else | ||
echo "pre_release=false" >> $GITHUB_ENV | ||
fi | ||
- name: Create Release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
with: | ||
tag_name: ${{ inputs.release_tag }} | ||
release_name: ${{ inputs.release_tag }} | ||
body_path: ${{ env.RELEASE_NOTES_FILE }} | ||
draft: false | ||
prerelease: ${{ env.pre_release }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
name: Attach Sui binaries to a release | ||
run-name: Attach Sui binaries to a ${{ inputs.sui_tag }} release | ||
|
||
on: | ||
release: | ||
types: [ published ] | ||
types: [ published, prereleased ] | ||
workflow_dispatch: | ||
inputs: | ||
sui_tag: | ||
|
@@ -43,10 +44,10 @@ jobs: | |
matrix: | ||
os: | ||
[ | ||
ubuntu-ghcloud, # ubuntu-x86_64 | ||
windows-ghcloud, # windows-x86_64 | ||
# ubuntu-ghcloud, # ubuntu-x86_64 | ||
# windows-ghcloud, # windows-x86_64 | ||
macos-latest-xl, # macos-x86_64 | ||
macos-latest-xlarge # macos-arm64 | ||
# macos-latest-xlarge # macos-arm64 | ||
] | ||
fail-fast: false | ||
runs-on: ${{ matrix.os }} | ||
|
@@ -94,7 +95,7 @@ jobs: | |
continue-on-error: true | ||
shell: bash | ||
run: | | ||
echo "s3_archive_exist=$(curl -Is https://sui-releases.s3.us-east-1.amazonaws.com/releases/sui-${{ env.sui_tag }}-${{ env.os_type }}.tgz | head -n 1 | grep '200 OK')" >> $GITHUB_ENV | ||
# echo "s3_archive_exist=$(curl -Is https://sui-releases.s3.us-east-1.amazonaws.com/releases/sui-${{ env.sui_tag }}-${{ env.os_type }}.tgz | head -n 1 | grep '200 OK')" >> $GITHUB_ENV | ||
- name: Download archive, if it exists | ||
if: ${{ env.s3_archive_exist != '' }} | ||
|
@@ -112,13 +113,6 @@ jobs: | |
if: ${{ matrix.os == 'windows-ghcloud' && env.s3_archive_exist == '' }} | ||
uses: taiki-e/install-action@33022ba120c3f523d134bbbee12278fc11a3df1a # pin@nextest | ||
|
||
- name: Setup protoc (Windows) | ||
if: ${{ matrix.os == 'windows-ghcloud' && env.s3_archive_exist == '' }} | ||
uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # [email protected] | ||
# this avoids rate-limiting | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install postgres (Windows) | ||
if: ${{ matrix.os == 'windows-ghcloud' && env.s3_archive_exist == '' }} | ||
shell: bash | ||
|
@@ -130,7 +124,7 @@ jobs: | |
echo "PG_DATABASE_URL=postgres://postgres:root@localhost/" >> $GITHUB_ENV | ||
echo "PG_EXAMPLE_DATABASE_URL=postgres://postgres:root@localhost/diesel_example" >> $GITHUB_ENV | ||
- name: Install postgres (Mac arm64) | ||
- name: Install postgres (MacOS arm64) | ||
if: ${{ matrix.os == 'macos-latest-xlarge' && env.gcloud_archive_exist == '' }} | ||
shell: bash | ||
env: | ||
|
@@ -141,6 +135,19 @@ jobs: | |
run: | | ||
brew install postgresql | ||
- name: Remove unused apps (MacOS platform) | ||
if: ${{ startsWith(matrix.os, 'macos') && env.gcloud_archive_exist == '' }} | ||
continue-on-error: true | ||
shell: bash | ||
run: | | ||
# MacOS arm64 runner only has 14GB avaialble, which is too small for our builds, so removing unused softwared. | ||
df -hI /dev/disk3s1s1 | ||
sudo rm -rf /Applications/Xcode*.app | ||
sudo rm -rf ~/Library/Developer/Xcode/DerivedData | ||
sudo rm -rf ~/Library/Developer/CoreSimulator/Caches/* | ||
sudo rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport/* | ||
df -hI /dev/disk3s1s1 | ||
- name: Cargo build for ${{ matrix.os }} platform | ||
if: ${{ env.s3_archive_exist == '' }} | ||
shell: bash | ||
|
@@ -169,8 +176,7 @@ jobs: | |
[[ ${{ env.sui_tag }} == *"testnet"* ]] && aws s3 cp ./tmp/sui-${{ env.sui_tag }}-${{ env.os_type }}.tgz s3://sui-releases/releases/sui-${{ env.sui_tag }}-${{ env.os_type }}.tgz || true | ||
- name: Publish Windows sui binary to Chocolatey | ||
if: ${{ matrix.os == 'windows-ghcloud' && contains( env.sui_tag, 'testnet') }} | ||
continue-on-error: true | ||
if: ${{ matrix.os == 'windows-ghcloud' && contains(env.sui_tag, 'testnet') }} | ||
shell: bash | ||
run: | | ||
choco install checksum | ||
|
@@ -179,9 +185,9 @@ jobs: | |
cat <<EOF >>VERIFICATION.txt | ||
Sui Binary verification steps | ||
1. Go to https://github.com/MystenLabs/sui/releases/download/${{ env.sui_tag }}/sui-${{ env.sui_tag }}-windows-x86_64.tgz | ||
2. Extract sui-windows-x86_64.exe | ||
3. checksum.exe -t sha256 sui-windows-x86_64.exe: ${sui_sha} | ||
1. Download https://github.com/MystenLabs/sui/releases/download/${{ env.sui_tag }}/sui-${{ env.sui_tag }}-windows-x86_64.tgz | ||
2. Extract sui.exe | ||
3. Verify binary: checksum.exe -t sha256 sui.exe: ${sui_sha} | ||
File 'LICENSE.txt' is obtained from: https://github.com/MystenLabs/sui/blob/main/LICENSE | ||
EOF | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,8 +43,6 @@ env: | |
RUSTUP_MAX_RETRIES: 10 | ||
# Don't emit giant backtraces in the CI logs. | ||
RUST_BACKTRACE: short | ||
# Some integration tests can produce too much INFO logs that are infeasible to be printed on failure. | ||
RUST_LOG: error | ||
# RUSTFLAGS: -D warnings | ||
RUSTDOCFLAGS: -D warnings | ||
|
||
|
@@ -202,10 +200,6 @@ jobs: | |
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1 | ||
- uses: taiki-e/install-action@nextest | ||
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # [email protected] | ||
# this avoids rate-limiting | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install postgres (Windows) | ||
shell: bash | ||
|
@@ -262,7 +256,7 @@ jobs: | |
- uses: taiki-e/install-action@nextest | ||
- name: Run move tests | ||
run: | | ||
cargo nextest run -p sui-framework-tests -- unit_tests:: | ||
cargo nextest run -p sui-framework-tests --test move_tests | ||
# # Disabled | ||
# rosetta-validation: | ||
|
@@ -345,10 +339,6 @@ jobs: | |
if: needs.diff.outputs.isRust == 'true' | ||
runs-on: [ ubuntu-ghcloud ] | ||
steps: | ||
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # [email protected] | ||
# this avoids rate-limiting | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1 | ||
- run: rustup component add clippy | ||
# TODO(bradh): debug and re-enable this; the caching is breaking the clippy build | ||
|
@@ -385,7 +375,8 @@ jobs: | |
runs-on: [ ubuntu-latest ] | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1 | ||
- uses: mystenlabs/cargo-deny-action@main | ||
- uses: taiki-e/install-action@cargo-deny | ||
- run: cargo deny check | ||
|
||
sui-excution-cut: | ||
name: cutting a new execution layer | ||
|
Oops, something went wrong.