-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move BCTK LIB code into neo-express (#342)
* init * format * fix format * test workflow
- Loading branch information
1 parent
930bfea
commit b0bd037
Showing
105 changed files
with
10,994 additions
and
112 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Run Test | ||
|
||
on: | ||
workflow_call: | ||
|
||
env: | ||
CONFIGURATION: 'Release' | ||
DOTNET_VERSION: '7.0.x' | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-11, macos-12, ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022] | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: ${{ env.DOTNET_VERSION }} | ||
- name: Install RocksDB Dependencies | ||
if: ${{ runner.os == 'Linux'}} | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libsnappy-dev libc6-dev librocksdb-dev -y | ||
- name: Build and Test | ||
run: | | ||
dotnet restore | ||
dotnet build --configuration ${{ env.CONFIGURATION }} --no-restore --verbosity normal --BinaryLogger:./msbuild.${{ matrix.os }}.binlog | ||
dotnet test --configuration ${{ env.CONFIGURATION }} --no-build --verbosity normal --collect:"XPlat Code Coverage" | ||
- name: Upload Coverage | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage | ||
path: ./test/test.bctklib/TestResults/*/coverage.cobertura.xml | ||
- name: Upload Build Log | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: buildlog | ||
path: ./msbuild.${{ matrix.os }}.binlog | ||
report: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download Coverage Artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: coverage | ||
path: ./coverage | ||
- name: Code Coverage Report | ||
uses: irongut/[email protected] | ||
with: | ||
filename: ./coverage/**/coverage.cobertura.xml |
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,9 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup> | ||
<PackageReference Include="Nerdbank.GitVersioning"> | ||
<Version>3.5.119</Version> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.133" PrivateAssets="all" /> | ||
</ItemGroup> | ||
</Project> |
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 |
---|---|---|
@@ -1,46 +1,26 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<Authors>ngd enterprise</Authors> | ||
<Company>The Neo Project</Company> | ||
<Copyright>2015-2021 The Neo Project</Copyright> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<LangVersion>10</LangVersion> | ||
<Nullable>enable</Nullable> | ||
<PackageIcon>neo-logo-72.png</PackageIcon> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<PackageProjectUrl>https://github.com/neo-project/neo-express</PackageProjectUrl> | ||
<PackageTags>Neo;Blockchain;Smart Contract</PackageTags> | ||
<RepositoryType>git</RepositoryType> | ||
<RepositoryUrl>https://github.com/neo-project/neo-express.git</RepositoryUrl> | ||
<SymbolPackageFormat>snupkg</SymbolPackageFormat> | ||
<TargetFramework>net7.0</TargetFramework> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<BlockchainToolkitLibraryVersion>3.6.19</BlockchainToolkitLibraryVersion> | ||
<!-- <BlockchainToolkitLibraryVersion>local</BlockchainToolkitLibraryVersion> --> | ||
<BlockchainToolkitLibraryLocalPath>..\..\..\lib-bctk</BlockchainToolkitLibraryLocalPath> | ||
<NeoVersion>3.6.0</NeoVersion> | ||
<NeoMonorepoPath>..\..\..\..\official\3neo-monorepo</NeoMonorepoPath> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<None Include="../neo-logo-72.png" Pack="true" Visible="false" PackagePath=""/> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.0.1"/> | ||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/> | ||
</ItemGroup> | ||
<Choose> | ||
<When Condition=" '$(BlockchainToolkitLibraryVersion)' == 'local'"> | ||
<ItemGroup> | ||
<ProjectReference Include="$(BlockchainToolkitLibraryLocalPath)\src\bctklib\bctklib.csproj" /> | ||
</ItemGroup> | ||
</When> | ||
<Otherwise> | ||
<ItemGroup> | ||
<PackageReference Include="Neo.BlockchainToolkit.Library" Version="$(BlockchainToolkitLibraryVersion)" /> | ||
</ItemGroup> | ||
</Otherwise> | ||
</Choose> | ||
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" /> | ||
</Project> | ||
<PropertyGroup> | ||
<Authors>ngd enterprise</Authors> | ||
<Company>The Neo Project</Company> | ||
<Copyright>2015-2023 The Neo Project</Copyright> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<LangVersion>10</LangVersion> | ||
<Nullable>enable</Nullable> | ||
<PackageIcon>neo-logo-72.png</PackageIcon> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<PackageProjectUrl>https://github.com/neo-project/neo-express</PackageProjectUrl> | ||
<PackageTags>Neo;Blockchain;Smart Contract</PackageTags> | ||
<RepositoryType>git</RepositoryType> | ||
<RepositoryUrl>https://github.com/neo-project/neo-express.git</RepositoryUrl> | ||
<SymbolPackageFormat>snupkg</SymbolPackageFormat> | ||
<TargetFramework>net7.0</TargetFramework> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<NeoVersion>3.6.0</NeoVersion> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<None Include="../neo-logo-72.png" Pack="true" Visible="false" PackagePath=""/> | ||
</ItemGroup> | ||
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" /> | ||
</Project> |
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,40 @@ | ||
// Copyright (C) 2015-2023 The Neo Project. | ||
// | ||
// Constants.cs file belongs to neo-express project and is free | ||
// software distributed under the MIT software license, see the | ||
// accompanying file LICENSE in the main directory of the | ||
// repository or http://www.opensource.org/licenses/mit-license.php | ||
// for more details. | ||
// | ||
// Redistribution and use in source and binary forms with or without | ||
// modifications are permitted. | ||
|
||
namespace Neo.BlockchainToolkit | ||
{ | ||
public static class Constants | ||
{ | ||
public const string EXPRESS_EXTENSION = ".neo-express"; | ||
public const string DEFAULT_EXPRESS_FILENAME = "default" + EXPRESS_EXTENSION; | ||
public const string WORKNET_EXTENSION = ".neo-worknet"; | ||
public const string DEFAULT_WORKNET_FILENAME = "default" + WORKNET_EXTENSION; | ||
|
||
|
||
public static readonly IReadOnlyList<string> MAINNET_RPC_ENDPOINTS = new[] | ||
{ | ||
"http://seed1.neo.org:10332", | ||
"http://seed2.neo.org:10332", | ||
"http://seed3.neo.org:10332", | ||
"http://seed4.neo.org:10332", | ||
"http://seed5.neo.org:10332" | ||
}; | ||
|
||
public static readonly IReadOnlyList<string> TESTNET_RPC_ENDPOINTS = new[] | ||
{ | ||
"http://seed1t5.neo.org:20332", | ||
"http://seed2t5.neo.org:20332", | ||
"http://seed3t5.neo.org:20332", | ||
"http://seed4t5.neo.org:20332", | ||
"http://seed5t5.neo.org:20332" | ||
}; | ||
} | ||
} |
Oops, something went wrong.