[**Part-1] Add github Release Workflow#3308
Conversation
| run: | | ||
| gh extension install actions/gh-actions-cache | ||
|
|
||
| echo "Fetching list of cache key" |
There was a problem hiding this comment.
maybe this can be a script that is called here
There was a problem hiding this comment.
what would the extension be for the file? Type of shell to use? Bash?
There was a problem hiding this comment.
Bourne Again Shell looks good.
|
@cschuchardt88 what is the blocker of this pr? |
vncoelho
left a comment
There was a problem hiding this comment.
I think you could comment the lines about cache and etc.
| --self-contained true \ | ||
| --output ${{ env.OUTPUT_PATH }}/${{ matrix.runtime }} \ | ||
| --verbosity normal \ | ||
| -p:VersionPrefix=${{ env.APP_VERSION }} \ |
There was a problem hiding this comment.
Too much parameter? Like those are not necessary?
There was a problem hiding this comment.
I think that a README or comments are necessary, there are several details
There was a problem hiding this comment.
These are all the settings i found to work.
name: Release (neo-cli)
# Trigger the workflow on a release event when a new release is published
on:
release:
types: [published]
# Define environment variables
env:
DOTNET_VERSION: 8.0.x
CONFIGURATION: Release
DIST_PATH: /tmp/dist
OUTPUT_PATH: /tmp/out
jobs:
build-leveldb:
name: Build leveldb (windows-latest)
runs-on: windows-latest
strategy:
matrix:
arch: [x64, arm64]
steps:
# Step to lookup cache for the LevelDB build distribution
- name: Lookup Cache Distribution
id: cache-leveldb
uses: actions/cache@v4
with:
path: ./leveldb/build/Release/*
key: leveldb-windows-${{ matrix.arch }}
enableCrossOsArchive: true
lookup-only: true
# Conditionally checkout LevelDB repository if cache is not found
- if: ${{ steps.cache-leveldb.outputs.cache-hit != 'true' }}
name: Checkout Repository Code (leveldb)
uses: actions/checkout@v4
with:
repository: google/leveldb
path: leveldb
submodules: true
fetch-depth: 0
# Conditionally setup MSBuild if cache is not found
- if: ${{ steps.cache-leveldb.outputs.cache-hit != 'true' }}
name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
# Conditionally setup LevelDB build directory if cache is not found
- if: ${{ steps.cache-leveldb.outputs.cache-hit != 'true' }}
name: Setup LevelDb
working-directory: ./leveldb
run: mkdir -p ./build/Release
# Conditionally create build files for LevelDB if cache is not found
- if: ${{ steps.cache-leveldb.outputs.cache-hit != 'true' }}
name: Create Build Files (win-${{ matrix.arch }})
working-directory: ./leveldb/build
run: cmake -DBUILD_SHARED_LIBS=ON -A ${{ matrix.arch }} ..
# Conditionally build LevelDB using MSBuild if cache is not found
- if: ${{ steps.cache-leveldb.outputs.cache-hit != 'true' }}
name: Build (MSBuild)
working-directory: ./leveldb/build
run: msbuild ./leveldb.sln /p:Configuration=Release
# Conditionally cache the LevelDB distribution if it was built
- if: ${{ steps.cache-leveldb.outputs.cache-hit != 'true' }}
name: Cache Distribution
uses: actions/cache/save@v4
with:
path: ./leveldb/build/Release/*
key: leveldb-windows-${{ matrix.arch }}
enableCrossOsArchive: true
build-neo-cli:
needs: [build-leveldb]
name: Build & Publish TarBalls (${{ matrix.runtime }})
runs-on: ubuntu-latest
strategy:
matrix:
runtime: [linux-x64, linux-arm64, win-x64, win-arm64, osx-x64, osx-arm64]
steps:
# Step to set the application version from the release tag
- name: Set Application Version (Environment Variable)
run: |
APP_VERSION=$(echo '${{ github.event.release.tag_name }}' | cut -d 'v' -f 2)
echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV
# Checkout the neo-cli repository code
- name: Checkout Repository Code
uses: actions/checkout@v4
with:
fetch-depth: 0
# Setup .NET environment
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
# Publish the neo-cli project
- name: .NET Publish (neo-cli)
run: |
dotnet publish ./src/Neo.CLI \
--version-suffix ${{ matrix.runtime }} \ # Append runtime identifier to version
--framework net8.0 \ # Target .NET 8.0 framework
--configuration ${{ env.CONFIGURATION }} \ # Use Release configuration
--runtime ${{ matrix.runtime }} \ # Specify runtime identifier (e.g., win-x64, linux-arm64)
--self-contained true \ # Include the .NET runtime with the application
--output ${{ env.OUTPUT_PATH }}/${{ matrix.runtime }} \ # Output path for the published application
--verbosity normal \ # Normal verbosity level
-p:VersionPrefix=${{ env.APP_VERSION }} \ # Set the version prefix to the application version
-p:RuntimeIdentifier=${{ matrix.runtime }} \ # Set the runtime identifier property
-p:SelfContained=true \ # Ensure the application is self-contained
-p:IncludeNativeLibrariesForSelfExtract=false \ # Do not include native libraries for self-extraction
-p:PublishTrimmed=false \ # Do not trim unused code
-p:PublishSingleFile=true \ # Publish as a single file
-p:PublishReadyToRun=true \ # Enable ReadyToRun compilation
-p:EnableCompressionInSingleFile=true \ # Enable compression in the single file
-p:DebugType=embedded \ # Embed debug information
-p:ServerGarbageCollection=true # Enable server garbage collection
# Build the LevelDBStore plugin
- name: .NET Build (LevelDBStore)
run: |
dotnet build ./src/Plugins/LevelDBStore \
--version-suffix ${{ matrix.runtime }} \ # Append runtime identifier to version
--framework net8.0 \ # Target .NET 8.0 framework
--configuration ${{ env.CONFIGURATION }} \ # Use Release configuration
--output ${{ env.OUTPUT_PATH }}/${{ matrix.runtime }}/Plugins/LevelDBStore \ # Output path for the built plugin
--verbosity normal \ # Normal verbosity level
-p:VersionPrefix=${{ env.APP_VERSION }} # Set the version prefix to the application version
# Remove unnecessary files from the LevelDBStore plugin output
- name: Remove files (junk)
working-directory: ${{ env.OUTPUT_PATH }}/${{ matrix.runtime }}/Plugins/LevelDBStore
run: |
rm -v Neo*
rm -v *.pdb
rm -v *.xml
# Remove XML comment files from the neo-cli output
- name: Remove Xml Comment Files
working-directory: ${{ env.OUTPUT_PATH }}/${{ matrix.runtime }}
run: rm -v *.xml
# Get cached LevelDB distribution for Windows x64 if applicable
- if: ${{ startsWith(matrix.runtime, 'win-x64') }}
name: Get Distribution Caches (win-x64)
uses: actions/cache@v4
with:
path: ./leveldb/build/Release/*
key: leveldb-windows-x64
enableCrossOsArchive: true
fail-on-cache-miss: true
# Get cached LevelDB distribution for Windows arm64 if applicable
- if: ${{ startsWith(matrix.runtime, 'win-arm64') }}
name: Get Distribution Caches (win-arm64)
uses: actions/cache@v4
with:
path: ./leveldb/build/Release/*
key: leveldb-windows-arm64
enableCrossOsArchive: true
fail-on-cache-miss: true
# Copy LevelDB files to the output directory for Windows
- if: ${{ startsWith(matrix.runtime, 'win') }}
name: Copy Files (leveldb) (win)
run: cp -v ./leveldb/build/Release/leveldb.dll ${{ env.OUTPUT_PATH }}/${{ matrix.runtime }}/libleveldb.dll
# Create the distribution directory
- name: Create Distribution Directory
run: mkdir -p ${{ env.DIST_PATH }}
# Create a tarball file for Linux distributions
- name: Create Tarball File (linux)
if: ${{ startsWith(matrix.runtime, 'linux') }}
working-directory: ${{ env.OUTPUT_PATH }}/${{ matrix.runtime }}
run: tar -czvf ${{ env.DIST_PATH }}/neo-cli.v${{ env.APP_VERSION }}-${{ matrix.runtime }}.tar.gz .
# Create a tarball file for macOS distributions
- name: Create Tarball File (osx)
if: ${{ startsWith(matrix.runtime, 'osx') }}
working-directory: ${{ env.OUTPUT_PATH }}/${{ matrix.runtime }}
run: tar -cJf ${{ env.DIST_PATH }}/neo-cli.v${{ env.APP_VERSION }}-${{ matrix.runtime }}.tar.xz .
# Create a zip file for Windows distributions
- name: Create Zip File (win)
if: ${{ startsWith(matrix.runtime, 'win') }}
working-directory: ${{ env.OUTPUT_PATH }}/${{ matrix.runtime }}
run: zip ${{ env.DIST_PATH }}/neo-cli.v${{ env.APP_VERSION }}-${{ matrix.runtime }}.zip -r *
# Create checksum files for Linux distributions
- name: Create Checksum Files (linux)
if: ${{ startsWith(matrix.runtime, 'linux') }}
working-directory: ${{ env.DIST_PATH }}
env:
FILENAME: neo-cli.v${{ env.APP_VERSION }}-${{ matrix.runtime }}
run: |
sha256sum ${{ env.FILENAME }}.tar.gz > ${{ env.FILENAME }}.sha256
# Create checksum files for macOS distributions
- name: Create Checksum Files (osx)
if: ${{ startsWith(matrix.runtime, 'osx') }}
working-directory: ${{ env.DIST_PATH }}
env:
FILENAME: neo-cli.v${{ env.APP_VERSION }}-${{ matrix.runtime }}
run: |
sha256sum ${{ env.FILENAME }}.tar.xz > ${{ env.FILENAME }}.sha256
# Create checksum files for Windows distributions
- name: Create Checksum Files (win)
if: ${{ startsWith(matrix.runtime, 'win') }}
working-directory: ${{ env.DIST_PATH }}
env:
FILENAME: neo-cli.v${{ env.APP_VERSION }}-${{ matrix.runtime }}
run: |
sha256sum ${{ env.FILENAME }}.zip > ${{ env.FILENAME }}.sha256
# List the contents of the distribution and output directories
- name: Output/Distribution Directory Contents
run: |
ls -la ${{ env.DIST_PATH }}
ls -la ${{ env.OUTPUT_PATH }}/${{ matrix.runtime }}
# Upload tarball files for Linux distributions
- name: Upload Tarball File (linux)
if: ${{ startsWith(matrix.runtime, 'linux') }}
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.DIST_PATH }}/neo-cli.v${{ env.APP_VERSION }}-${{ matrix.runtime }}.tar.gz
asset_name: neo-cli.v${{ env.APP_VERSION }}-${{ matrix.runtime }}.tar.gz
asset_content_type: application/x-gtar
# Upload tarball files for macOS distributions
- name: Upload Tarball File (osx)
if: ${{ startsWith(matrix.runtime, 'osx') }}
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.DIST_PATH }}/neo-cli.v${{ env.APP_VERSION }}-${{ matrix.runtime }}.tar.xz
asset_name: neo-cli.v${{ env.APP_VERSION }}-${{ matrix.runtime }}.tar.xz
asset_content_type: application/x-gtar
# Upload zip files for Windows distributions
- name: Upload Zip File (win)
if: ${{ startsWith(matrix.runtime, 'win') }}
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.DIST_PATH }}/neo-cli.v${{ env.APP_VERSION }}-${{ matrix.runtime }}.zip
asset_name: neo-cli.v${{ env.APP_VERSION }}-${{ matrix.runtime }}.zip
asset_content_type: application/zip
# Upload checksum files for all distributions
- name: Upload Checksum File (all)
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.DIST_PATH }}/neo-cli.v${{ env.APP_VERSION }}-${{ matrix.runtime }}.sha256
asset_name: neo-cli.v${{ env.APP_VERSION }}-${{ matrix.runtime }}.sha256
asset_content_type: text/plain
cleanup:
needs: [build-neo-cli]
runs-on: ubuntu-latest
steps:
# Cleanup step to delete old caches
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
if [ "$cacheKey" != "leveldb-windows-x64" ] && [ "$cacheKey" != "leveldb-windows-arm64" ]
then
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
fi
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
BRANCH: ${{ github.ref }} |
|
@superboyiii can you test it? |
Can you retest this PR again. I updated to run |
| # Trigger the workflow on a release event when a new release is published | ||
| on: | ||
| release: | ||
| types: [published] |
There was a problem hiding this comment.
So how about the manually-triggered builds, don't we need them?
There was a problem hiding this comment.
What are you talking about this is automatic on a publish release
Sure |
|
This PR resolves issue #3357 on release. But not for locally development. So @superboyiii you dont need to update the |
|
@cschuchardt88 Tried osx arm-x64, it works smoothly. Already codesigned. |
Release.ymlgithub Release Workflow
|
LGTM, since this will only be used by NGD, so as long as it works for ngd as expected. |
Doesn't require |
@superboyiii |
|
* Remove comments in `nuget.yml` (#3359) * Fixed Typo in `nuget.yml` * reverted for path * Fix: `MemPool` null checks (#3367) * Fix null error * Add [MaybeNullWhen(false)] * Update MemoryPool.cs * plugins: remove expressions that are always true (#3393) * this expression is always true * Improve --------- Co-authored-by: Shargon <shargon@gmail.com> * [**Part-1] Add `github` Release Workflow (#3308) * Added `release.yml` * Fixed `release.yml` * Remove `VersionPrefix` * Added macos leveldb * Fixed * Remove comments on the command-line * Fixed `CodeSign` `neo-cli` * Added steps for `codesign` in `release.yml` --------- Co-authored-by: Jimmy <jinghui@wayne.edu> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * cli: Fix `plugins` command (#3394) * Fix plugin list * Update src/Neo.CLI/CLI/MainService.Plugins.cs --------- Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * Added blame logging for `dotnet test` (#3384) Co-authored-by: Jimmy <jinghui@wayne.edu> Co-authored-by: Shargon <shargon@gmail.com> * Fix download tips (#3395) * Added `release.yml` * Fixed `release.yml` * Remove `VersionPrefix` * Added macos leveldb * Fixed * Remove comments on the command-line * Fixed `CodeSign` `neo-cli` * Added steps for `codesign` in `release.yml` * Add downloading plugin tips * Change to ConsoleHelper * Move before first download --------- Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> Co-authored-by: Jimmy <jinghui@wayne.edu> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> Co-authored-by: Shargon <shargon@gmail.com> * `DeprecatedIn` for events (#3362) * DeprecatedIn for events * Added UT * Remove using --------- Co-authored-by: Jimmy <jinghui@wayne.edu> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * Fix crash when comparing ContractPermissionDescriptor (#3396) * Update ContractPermissionDescriptor.cs * Add UT --------- Co-authored-by: Fernando Diaz Toledano <shargon@gmail.com> Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * `[neo-cli]` Error Message and Warning - LevelDb (#3380) * Fixed warnings and error message for `libleveldb` missing * Update src/Neo.CLI/CLI/MainService.cs Co-authored-by: lingyido <lingyido@gmail.com> --------- Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: lingyido <lingyido@gmail.com> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * Fixed Props Pathing for `dotnet pack` with `nuget` (#3379) Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * Part-1 `Neo.IO` - move (#3387) Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * `[Fix]` Test Problems (#3398) * Fix Test crashes * disable Build servers * Fixed Building problem with tests * Fixed command line * Removed disable build servers --------- Co-authored-by: Shargon <shargon@gmail.com> * `[Typo]` Unit Tests - UT_ProtocolSettings.CreateHKSettings (#3383) * Typeo with `CreateHKSettings` * fix ut --------- Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * Bump System.Text.Json from 8.0.3 to 8.0.4 in /src/Neo.Json (#3416) Bumps System.Text.Json from 8.0.3 to 8.0.4. --- updated-dependencies: - dependency-name: System.Text.Json dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [Neo Plugin Store] Unit test (#3399) * test * fix snapshot issue and add tests * fix test * apply old snapshot * remove duplicate * Remove method --------- Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> Co-authored-by: Shargon <shargon@gmail.com> * `[Add]` Debug Output to `Expect` (#3407) * Added Debug to Expect * Update file paths --------- Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * Improve code coverage (#3354) * update * remove binary file * Add UT and fixed bug * Add UT and fixed bug * Add UT * Add UT * Add UT * Update src/Neo/SmartContract/Manifest/ContractManifest.cs Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> * Update src/Neo/SmartContract/Manifest/ContractManifest.cs Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> * Update src/Neo/SmartContract/Manifest/ContractManifest.cs Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> * Update Base58.cs * Update UT_Cryptography_Helper.cs * Update Base58.cs * update * Update ContractManifest.cs * Revert change that affect a syscall * Revert try * Remove using * Update src/Neo/SmartContract/Manifest/ContractManifest.cs Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> * Update src/Neo/SmartContract/Manifest/ContractAbi.cs Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> * Update src/Neo/SmartContract/Manifest/ContractManifest.cs Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> --------- Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> Co-authored-by: Jimmy <jinghui@wayne.edu> Co-authored-by: Fernando Diaz Toledano <shargon@gmail.com> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * [Neo Plugin UT] Rpcserver unit test on node (#3353) * try mock * not use mock * test * fix test * use neo testutils * complete rpcserver blockchain tests. * revert change to ByteArrayComparer * revert cache change * add more detail to comments * add more exception test cases * fix warning * Apply suggestions from code review * update TODO mark * add node rpc tests * fix build error * set the mempool to 5. * remove memory pool test. * fix tests * fix test issue * Update tests/Neo.UnitTests/TestUtils.Transaction.cs --------- Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * Fix release compilation (#3417) * Fix release * typo * Fixed Publish Step (#3411) Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * [Neo Core MemoryStore] MemoryStore Unit Tests. (#3404) * test * fix snapshot issue and add tests * fix test * apply old snapshot * memory snapshot tests * memory test * add more tests * make it more clear * revert storetest --------- Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> Co-authored-by: Shargon <shargon@gmail.com> * [Neo Core Storage] Implicit methods and tests (#3403) * implicit methods and tests * udpate --------- Co-authored-by: Shargon <shargon@gmail.com> * [Neo Core Store] Rename various snapshots. (#3406) * rename snapshot * Remove warning --------- Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * `[Move]` Part-2 Classes into Different Library - `Neo.IO` (#3388) * Part-1 `Neo.IO` - move * Part-2 * Added `BigInteger` to `Neo.Extensions` * Found more `BigInteger` * Added Tests * Update tests/Neo.Extensions.Tests/UT_BigIntegerExtensions.cs --------- Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: Jimmy <jinghui@wayne.edu> * Revert "Plugin unhandled exception (#3349)" (#3366) This reverts commit b2f060f. Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> * fix obsolete warning (#3428) * Neo.CLI: update MaxTraceableBlocks setting for NeoFS networks (#3424) We don't need long tails for NeoFS networks, 3 days is enough for now. It's checked that this change does not affect the network states. Port nspcc-dev/neo-go#3518. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * Upgrade `nuget` packages (#3421) Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * [Neo Core Fix]use strong randomness (#3432) * use strong randomness * Update src/Plugins/DBFTPlugin/Consensus/ConsensusContext.MakePayload.cs --------- Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * Fixed warning (#3430) Co-authored-by: Shargon <shargon@gmail.com> * [Neo Core UT] Fix ut and style (#3413) * fix ut and style * clean * update test * Update tests/Neo.UnitTests/IO/Caching/UT_DataCache.cs Co-authored-by: Hecate2 <hecate2@qq.com> --------- Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: Hecate2 <hecate2@qq.com> Co-authored-by: Hecate2 <2474101468@qq.com> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * [**Added**] Build `neo-cli` Docker Image (#3355) * Added `devcontrainer` test for `neo-cli` * Basic contrainer setup * Updated version of `checkout` action job's step. * Changed to `neo-cli` * Update `dockerfile` * Updated `PostCreateCommand` * Changed to `bookworm-slim` * Reverted to `Jammy` * Added `sudo` command for `PostCreateCommand` * Added permissions * Removed `screen` command * Added to `bin` and `PostCreateCommand` * Changed `devcontainer` files * Reverted builds * Added `neo` repo to devcontainer * Changed to docker-image for github registry * Fixed Bugs in `docker` support for `neo-cli` image * Added type `container` * Revert `.devcontainer` folder * format * Changed workflow to `docker` for `pkgs-delete.yml` since we use `v4` * Deleted `Dockerfile` from `src\Neo.CLI` * Revert "Deleted `Dockerfile` from `src\Neo.CLI`" This reverts commit b877de0. --------- Co-authored-by: Jimmy <jinghui@wayne.edu> * [Neo Core Doc]create a docs folder and move existing doc to it. (#3435) * create a docs folder and move existing doc to it. * move neocli config md * [**Part-1**] Added `ApplicationLogs` Unit Tests (#3346) * Added ApplicationLogs Tests * Fixed pathing and naming * Merged `Part-2` * Fixed Test for `Test_Put_Get_NotifyState_Storage` --------- Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: Jimmy <jinghui@wayne.edu> * add unit tests for json (#2993) * add unit tests for json * fix ut * add ut cases for JString. * add invalid jpath tests * behavior of jboolean is kinda weird. i have: Assert.AreEqual failed. Expected:<true>. Actual:<true>. * fix test error * add more test --------- Co-authored-by: Shargon <shargon@gmail.com> * [Neo Core VM] complete opcode comments (#3437) * complete opcode comments * Apply suggestions from code review * Update src/Neo.VM/OpCode.cs --------- Co-authored-by: Shargon <shargon@gmail.com> * [Neo Core] Obsolete applicationengine snapshot (#3436) * Obsolete applicationengine snapshot * fix UT names * fix executioncontextstate --------- Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * [Neo Plugin RpcServer UT]Plugin rpcserver wallet UTs (#3433) * wallet * fix util * add comments and fix ut * Update tests/Neo.Plugins.RpcServer.Tests/UT_RpcServer.Wallet.cs * remove comment --------- Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * `[Move]` Part-3 Classes into Different Library - `Neo.Extensions` (#3400) * Part-1 `Neo.IO` - move * Part-2 * Added `BigInteger` to `Neo.Extensions` * Found more `BigInteger` * Added `ByteArray` to `Neo.Extensions` * Added Tests * Added `tests` from `Part-2` --------- Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: Jimmy <jinghui@wayne.edu> * [`Optimization`] Parsing Smart Contract Script Analysis (#3420) * Fixed Parsing Smart Contract Script Analysis * Add more opcode outputs * Bug fixes * Move to ToString * Reorder using * Change ToString --------- Co-authored-by: Jimmy <jinghui@wayne.edu> Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com> Co-authored-by: Fernando Diaz Toledano <shargon@gmail.com> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * update benchmark system (#3442) Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * [rpc] Extend `getversion` RPC response with additional protocol settings (#3443) * getversion * Extend client --------- Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * [Neo Core Add] add char support (#3441) * add char support * Update src/Neo/VM/Helper.cs * add char unit test --------- Co-authored-by: Shargon <shargon@gmail.com> * Stopped `RecoveryLogs` store from being created when `IgnoreRecoveryLogs` is `true` (#3444) Co-authored-by: Shargon <shargon@gmail.com> * [Neo Core Bug] fix compound type reference issue (#3334) * fix compound type reference issue * fix warning * add benchmark * throw exception instead * Update benchmarks/Neo.VM.Benchmarks/Benchmarks.Types.cs * Update src/Neo.VM/Types/Map.cs * Apply suggestions from code review * Update src/Neo.VM/Types/Map.cs Co-authored-by: Shargon <shargon@gmail.com> * update accessibality. --------- Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * Fix plugin exception (#3426) * Revert "Revert "Plugin unhandled exception (#3349)" (#3366)" This reverts commit f307a31. * ensure leveldb is not used in multithread env * Revert "Revert "Plugin unhandled exception (#3349)" (#3366)" This reverts commit f307a31. * remove async. * Update src/Neo/Plugins/UnhandledExceptionPolicy.cs Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> * not use linq * Update src/Neo/Plugins/UnhandledExceptionPolicy.cs Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> * use ignore case * Update src/Plugins/TokensTracker/TokensTracker.cs * Update src/Neo/Plugins/Plugin.cs Co-authored-by: Shargon <shargon@gmail.com> --------- Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * [Neo Json Fix] Json null tests (#3450) * null operation * fix array --------- Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> * Update README.md (#3459) * Update RpcServer.Blockchain.cs (#3458) Co-authored-by: Jimmy <jinghui@wayne.edu> * Set `Password` to `SecureString` for Wallet (#3468) * Set `Password` to `SecureString` for Wallet information * Added `UnitTest` for `SecureStringExtensions` * Update tests/Neo.Extensions.Tests/UT_SecureStringExtensions.cs Co-authored-by: Shargon <shargon@gmail.com> * Update src/Neo.Extensions/SecureStringExtensions.cs --------- Co-authored-by: Shargon <shargon@gmail.com> * [Neo Plugin RPCServer] Rpc parameters. Part I (#3457) * rpc parameter parse * update blockchain related apis. * Update src/Plugins/RpcServer/RpcMethodWithParamsAttribute.cs * Delete src/Plugins/RpcServer/JsonPropertyNameAttribute.cs * udpate contract model * Update src/Plugins/RpcServer/Model/BlockHashOrIndex.cs * Apply suggestions from code review Remove comments * Update src/Plugins/RpcServer/RpcServer.cs * fix warnings * ensure it can load both true/false and 1/0 * optimize the pr and add unit tests * add more tests and check the safe max value and safe min value * remove format * remove unused * format * Apply suggestions from code review --------- Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * test RpcServer.Utilities, .SmartContract and .Wallet (#3461) * test RpcServer.Utilities * test invoke function and script * TestTraverseIterator * TestGetUnclaimedGas * RpcServerSettings.Default with { SessionEnabled = true } * test call with storage changes and events * use wallet in invokefunction * use invalid wallet * invoke without signer * all cases for TraverseIterator * traversing same session twice; not expired session * cover OnTimer * test deserializing complex signers * use Assert.ThrowsException * TestSendFrom and TestSendMany * apply code review with `nameof` * test cancel transaction * TestInvokeContractVerify * improve error message --------- Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * `[Move]` Part-4 Classes into Different Library - `Neo.Extensions` (#3408) * Part-1 `Neo.IO` - move * Part-2 * Added `BigInteger` to `Neo.Extensions` * Found more `BigInteger` * Added `ByteArray` to `Neo.Extensions` * Added `DateTime` Extensions to `Neo.Extensions` * Added `HashSetExtensions`, `HashSetExtensions2`, `IpAddressExtensions`, `AssemblyExtensions`, `StringExtensdions` Deleted `Helper.cs` file * Added Tests * Added `tests` from `Part-2` * Added `tests` for `PART-4` * Add `using Neo.Extensions` for unit tests * Change `HashSetExtensions2` to `HashSetExtensions` * Update tests/Neo.Extensions.Tests/UT_BigIntegerExtensions.cs * Update and rename StringExtensdions.cs to StringExtensdios.cs * Rename StringExtensdios.cs to StringExtensions.cs * `dotnet format` --------- Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: Jimmy <jinghui@wayne.edu> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * Add UT Neo.IO (#3466) * UT_KeyedCollectionSlim * Update UT_KeyedCollectionSlim.cs * Update UT_MemoryReader.cs * Update UT_MemoryReader.cs * improve error message when wrong wallet is opened (#3469) * improve error message when wrong wallet is opened * update tests * Update UT RpcServer (#3460) * Update UT_RpcServer.Blockchain.cs * Update UT_RpcServer.Blockchain.cs * update * fixed bug * format * update * Update NativeContractExtensions.cs * update * Remove conflicting files * update * format * [`fixes`] UInt160 Class (#3422) * Fixed `UInt160` and expanded class * Cleaned up code for `TryParse` * Fixed `TryParse` * Fixed small bug with `TryParse` * Change `UInt160.Zero` to `static readonly` * benchmark UInt160 * Fix benchmark * Fixed bugs and added features for `UInt160` class * Revert and just keep bug fixes * Made @shargon changes * Set `InvariantCultureIgnoreCase` back for `0x` and `0X` --------- Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: Jimmy <jinghui@wayne.edu> Co-authored-by: Jimmy <jimmy@r3e.network> * test GetApplicationLog (#3470) * test GetApplicationLog * filter execution type * Test_Commands; refactor * apply review suggestions --------- Co-authored-by: Shargon <shargon@gmail.com> * Add UT Neo.Extensions (#3467) * Add UT Neo.Extensions * resolve conflicts * Revert "resolve conflicts" This reverts commit 6d0a61b. * add edge case * update mod test --------- Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> Co-authored-by: Jimmy <jinghui@wayne.edu> Co-authored-by: Jimmy <jimmy@r3e.network> * Add some UT (#3476) * Update UT_Utility.cs * TestGetContractState * Update ConstantTimeUtility.cs (#3472) - Fix typo Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: Jimmy <jinghui@wayne.edu> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * Test OracleService (#3475) * trigger https oracle * make it internal * return Task.CompletedTask --------- Co-authored-by: Jimmy <jimmy@r3e.network> Co-authored-by: Jimmy <jinghui@wayne.edu> Co-authored-by: Shargon <shargon@gmail.com> * [Neo Plugin RPC] update rpc node methods signatures to use explicit parameter types. (#3479) * update rpc node methods signatures to use explicit parameter types. * fix attribute place --------- Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> Co-authored-by: Shargon <shargon@gmail.com> * Fixing errors in comments (#3483) * Update OpCode.cs * Update JumpTable.Compound.cs * Update OpCode.cs * parse nef file scripts (#3482) * parse nef file scripts * nef file path support --------- Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com> * [Neo VM Style] Throw exception for Integer that is larger than 32 bytes (#3486) * fix push integer * Update src/Neo.VM/ScriptBuilder.cs * Update tests/Neo.VM.Tests/UT_ScriptBuilder.cs * Update tests/Neo.VM.Tests/UT_ScriptBuilder.cs * Update RpcError.cs (#3498) * fix: concurrency conflict in HeaderCache.Count (#3501) * fix: concurrency conflict in HeaderCache.Count * Update tests/Neo.UnitTests/Ledger/UT_HeaderCache.cs * Update tests/Neo.UnitTests/Ledger/UT_HeaderCache.cs --------- Co-authored-by: Shargon <shargon@gmail.com> * [`Add`] Transaction Builder (#3477) * Added Builders with tests * Added SignerBuilder and started WitnessRuleBuilder * Added `WitnessConditionBuilder` with tests * Added more logic * Fixed `SignerBuilder` class * Code touch ups * Added more tests * Update src/Neo/Builders/TransactionBuilder.cs * Fixed `And` `Or` and `Not` conditions * Fixed Memory leak * Added error message for Witness scripts --------- Co-authored-by: Jimmy <jinghui@wayne.edu> Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * [`Fix`] Neo Plugins github nuget (#3493) * Fixed Delete packages for github * Automatic * added continue-on-error: true --------- Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> * `[Move]` Part-5 Classes into Different Library - `Neo.Extensions` (#3409) * Part-1 `Neo.IO` - move * Part-2 * Added `BigInteger` to `Neo.Extensions` * Found more `BigInteger` * Added `ByteArray` to `Neo.Extensions` * Added `DateTime` Extensions to `Neo.Extensions` * Added `HashSetExtensions`, `HashSetExtensions2`, `IpAddressExtensions`, `AssemblyExtensions`, `StringExtensdions` Deleted `Helper.cs` file * Added `ICollection`, `Memory`, `String`, `Unsafe` extensions * Adding `using` * dotnet format * Added Tests * Added `tests` from `Part-2` * Added `tests` for `PART-4` * Added `tests` for `PART-5` * Made changes and fixes * Fixes * Apply suggestions from code review * Update tests/Neo.Extensions.Tests/UT_StringExtensions.cs * @shagron review changes * formating * Moved `UnsafeData` tests to `UT_UnsafeData` * Formating --------- Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: Jimmy <jinghui@wayne.edu> * fix: always throw `DivideByZeroException ` when `BloomFilter` is empty (#3502) * fix: always throw divided by zero when BloomFilter is empty * fix: always throw divided by zero when BloomFilter is empty * fix: concurrency conflict in MemPool.TryRemoveUnVerified (#3500) * fix: concurrency conflict in MemPool.TryRemoveUnVerified * Remove method * Update src/Neo/Ledger/MemoryPool.cs * clean * Apply suggestions from code review * reformat --------- Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: Jimmy <jinghui@wayne.edu> * update rvcount error message (#3504) * Added `CreateStruct` & Fixed `CreateMap` (#3494) * Added `CreateStruct`, Fixed CreateMap * Added test and comments --------- Co-authored-by: Jimmy <jinghui@wayne.edu> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> Co-authored-by: Shargon <shargon@gmail.com> * benchmark convert (#3509) * OpCodes: extend MODMUL tests with negative base/multiplier/mod (#3513) Allows to avoid bugs like nspcc-dev/neo-go#3598. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru> Co-authored-by: Jimmy <jinghui@wayne.edu> * fix: sensitive data compare should use constant time compare to avoid timing attack (#3508) * fix: pass compare should use contant time compare to avoid timing attack * fix: pass compare should use contant time compare to avoid timing attack * Update src/Plugins/RpcServer/RpcServer.cs * Update src/Plugins/RpcServer/RpcServer.cs --------- Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: Jimmy <jinghui@wayne.edu> * Related to #3508 (comment) (#3516) Co-authored-by: Jimmy <jinghui@wayne.edu> * [Benchmark] this pr adds more pocs to benchmark (#3512) * this pr adds more pocs to benchmark * format --------- Co-authored-by: Fernando Diaz Toledano <shargon@gmail.com> * Bump System.Text.Json from 8.0.4 to 8.0.5 in /src/Neo.Json (#3519) Bumps [System.Text.Json](https://github.com/dotnet/runtime) from 8.0.4 to 8.0.5. - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](dotnet/runtime@v8.0.4...v8.0.5) --- updated-dependencies: - dependency-name: System.Text.Json dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> Co-authored-by: Shargon <shargon@gmail.com> * Circular reference error info in ToJson (#3522) Co-authored-by: Shargon <shargon@gmail.com> * [Benchmark] Benchmark OpCode and VM (#3514) * add opcode benchmark system * add opcode benchmark system * update to make the framework easier to work with. * Clean code * filescope namespace * remove uncomplet benchmark * add missing using --------- Co-authored-by: Fernando Diaz Toledano <shargon@gmail.com> * Move `ReferenceCounter` to an interface (#3524) * Reference counter V2 * Remove warning * Interface * Change to interface * Update * Remove V2 * [Neo VM] optimize newstruct (#3525) * optimize newstruct * use Array.Fill * Update src/Neo.VM/JumpTable/JumpTable.Compound.cs --------- Co-authored-by: Shargon <shargon@gmail.com> * fea: use canonical TryGet style in IReadOnlyStore (#3533) * Add references (#3529) Co-authored-by: Jimmy <jinghui@wayne.edu> * fix: concurrency conflict in NEP6Wallet.ToJson (#3527) * fix: concurrency conflict in NEP6Wallet.ToJson * Update also ChangePasssword * Reduce lock time --------- Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: Jimmy <jinghui@wayne.edu> * fix cref "OpCode.SUBSTR" in comment (#3542) * ApplicationEngine helper to get engine error info (#3541) * helper to get engine error info * cancel try * Update src/Neo/SmartContract/ApplicationEngine.Helper.cs Co-authored-by: Shargon <shargon@gmail.com> * standalone method to get exception stack trace and message * always return string --------- Co-authored-by: Jimmy <jinghui@wayne.edu> Co-authored-by: Shargon <shargon@gmail.com> * stack opcode example comments (#3546) * stack opcode example comments * move index into example --------- Co-authored-by: Jimmy <jinghui@wayne.edu> * Expose `GetInteropDescriptor` (#3545) * Expose GetInteropDescriptor * Update src/Neo/SmartContract/ApplicationEngine.cs --------- Co-authored-by: Jimmy <jinghui@wayne.edu> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru> Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: 陈志同 <bitcoin2077@outlook.com> Co-authored-by: Jimmy <jinghui@wayne.edu> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com> Co-authored-by: Owen <38493437+superboyiii@users.noreply.github.com> Co-authored-by: lingyido <lingyido@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com> Co-authored-by: Anna Shaleva <shaleva.ann@nspcc.ru> Co-authored-by: Hecate2 <hecate2@qq.com> Co-authored-by: Hecate2 <2474101468@qq.com> Co-authored-by: Jimmy <jimmy@r3e.network> Co-authored-by: Mirage Mouse <bk@sundialmirage.com> Co-authored-by: nan01ab <yjcc201374@outlook.com>

Change Log
release.ymlPathandPropertyfor*.csprojfiles #3306Self automated release for
neo-cli. Build windows version oflibleveldband adds to release ofneo-cli.HOW TO USE
STEP 1
STEP 2
STEP 3
STEP 4
STEP 5
Wait for job to complete.
Zip/Tarball File Contents
Release Page
Jobs
Type of change
How Has This Been Tested?
Locally and github
Checklist: