forked from neo-project/neo
-
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.
- Loading branch information
Showing
3 changed files
with
120 additions
and
0 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,40 @@ | ||
name: Validate neo-node Compilation with Local neo | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout neo | ||
uses: actions/checkout@v2 | ||
with: | ||
path: ./neo | ||
|
||
- name: Checkout neo-node | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: neo-project/neo-node | ||
path: ./neo-node | ||
|
||
- name: Patch neo-node neo-cli.csproj to use local neo | ||
run: | | ||
# Path to neo-cli.csproj in neo-node | ||
csproj_path="./neo-node/neo-cli/neo-cli.csproj" | ||
# Remove the PackageReference to Neo | ||
sed -i '/<PackageReference Include="Neo"/d' $csproj_path | ||
# Add a ProjectReference to the local Neo project | ||
# Assuming the neo project's main .csproj is in its src/neo directory | ||
sed -i '/<\/ItemGroup>/i \ <ProjectReference Include="../../neo/src/Neo/Neo.csproj" />' $csproj_path | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '7.x' # Adjust according to the actual .NET Core version of neo-node | ||
|
||
- name: Restore and build neo-node | ||
run: | | ||
cd neo-node/neo-cli | ||
dotnet restore | ||
dotnet build |
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,43 @@ | ||
name: Validate neo-devpack-dotnet Compilation with Local neo | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout neo | ||
uses: actions/checkout@v2 | ||
with: | ||
path: ./neo | ||
|
||
- name: Checkout neo-devpack-dotnet | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: neo-project/neo-devpack-dotnet | ||
path: ./neo-devpack-dotnet | ||
|
||
- name: Patch neo-devpack-dotnet .csproj to use local neo | ||
run: | | ||
# Remove the PackageReference to Neo | ||
sed -i '/<PackageReference Include="Neo"/d' ./neo-devpack-dotnet/src/Neo.Compiler.CSharp/Neo.Compiler.CSharp.csproj | ||
# Add a ProjectReference to the local Neo project | ||
# Assuming the neo project's main .csproj is in its root directory | ||
sed -i '/<\/ItemGroup>/i \ <ProjectReference Include="../../../neo/src/Neo/Neo.csproj" />' ./neo-devpack-dotnet/src/Neo.Compiler.CSharp/Neo.Compiler.CSharp.csproj | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '7.x' # Adjust according to the actual .NET Core version of neo-devpack-dotnet | ||
|
||
- name: Restore and build neo-devpack-dotnet | ||
run: | | ||
cd neo-devpack-dotnet/ | ||
dotnet restore | ||
dotnet build | ||
- name: Test neo-devpack-dotnet | ||
run: | | ||
cd neo-devpack-dotnet | ||
dotnet test |
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,37 @@ | ||
name: Validate neo-modules Compilation with Local neo | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout neo | ||
uses: actions/checkout@v2 | ||
with: | ||
path: ./neo | ||
|
||
- name: Checkout neo-modules | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: neo-project/neo-modules | ||
path: ./neo-modules | ||
|
||
- name: Patch neo-modules Directory.Build.props to use local neo | ||
run: | | ||
props_path="./neo-modules/src/Directory.Build.props" | ||
sed -i '/<PackageReference Include="Neo"/d' $props_path | ||
sed -i '/<\/ItemGroup>/i \ <ProjectReference Include="../../../neo/src/Neo/Neo.csproj" />' $props_path | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '7.x' | ||
|
||
- name: Test neo-modules | ||
run: | | ||
sudo apt-get --assume-yes install libleveldb-dev libsnappy-dev libc6-dev | ||
cd neo-modules/ | ||
dotnet test | ||