Skip to content

Commit

Permalink
Overhaul project structure, add NuGet build capability and related wo…
Browse files Browse the repository at this point in the history
…rkflow.
  • Loading branch information
vddCore committed May 22, 2024
1 parent 965c93d commit 225c1d2
Show file tree
Hide file tree
Showing 20 changed files with 132 additions and 106 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/build-frontend-with-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build EVIL front-end with runtime

on:
push:
branches: [ "master", "dev" ]
branches: [ "master" ]
pull_request:
branches: [ "master" ]

Expand All @@ -15,9 +15,6 @@ jobs:

runs-on: ubuntu-latest

env:
Solution_Name: EVIL.sln

steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -40,7 +37,7 @@ jobs:
Configuration: ${{ matrix.configuration }}

- name: Run language tests
working-directory: VirtualMachine/Tests/Ceres.LanguageTests/bin/${{ matrix.configuration }}/net7.0
working-directory: VirtualMachine/Tests/EVIL.Ceres.LanguageTests/bin/${{ matrix.configuration }}/net7.0
run: ./Ceres.LanguageTests tests --fail-on-compiler-errors --fail-on-test-errors

- name: Publish to directory
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/build-nuget-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build EVIL front-end with runtime

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:
strategy:
matrix:
configuration: [Debug, Release]

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.x

- name: Restore solution
run: dotnet restore
env:
Configuration: ${{ matrix.configuration }}

- name: Build solution
run: dotnet build -c $Configuration
env:
Configuration: ${{ matrix.configuration }}

- name: Run language tests
working-directory: VirtualMachine/Tests/EVIL.Ceres.LanguageTests/bin/${{ matrix.configuration }}/net7.0
run: ./Ceres.LanguageTests tests --fail-on-compiler-errors --fail-on-test-errors

- name: Create NuGet packages
run: dotnet pack -o evil-nuget-latest

- name: Upload built artifact
uses: actions/[email protected]
with:
name: evil-nuget_${{ matrix.configuration }}-latest
path: evil-nuget-latest
if-no-files-found: error
retention-days: 90
9 changes: 5 additions & 4 deletions Core/EVIL.CommonTypes/EVIL.CommonTypes.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Nullable>enable</Nullable>

<Version>1.0.0</Version>

<IsPackable>false</IsPackable>
</PropertyGroup>

</Project>
25 changes: 12 additions & 13 deletions Core/EVIL.Grammar/EVIL.Grammar.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>11.0</LangVersion>

<Version>4.3.0</Version>
<AssemblyName>EVIL.Grammar</AssemblyName>
<AssemblyTitle>EVIL.Grammar</AssemblyTitle>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>

<ItemGroup>
<ProjectReference Include="..\EVIL.CommonTypes\EVIL.CommonTypes.csproj" />
<ProjectReference Include="..\EVIL.Lexical\EVIL.Lexical.csproj" />
</ItemGroup>
<Version>4.3.0</Version>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\EVIL.CommonTypes\EVIL.CommonTypes.csproj"/>
<ProjectReference Include="..\EVIL.Lexical\EVIL.Lexical.csproj"/>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace EVIL.Grammar.Parsing
{
public partial class Parser
{
public Expression ByExpression()
private Expression ByExpression()
{
if (CurrentToken.Type == TokenType.By)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace EVIL.Grammar.Parsing
{
public partial class Parser
{
public ValStatement ReadWriteValStatement()
private ValStatement ReadWriteValStatement()
{
Match(Token.Rw);
return ValStatement(true);
Expand Down
5 changes: 2 additions & 3 deletions Core/EVIL.Lexical/EVIL.Lexical.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>11.0</LangVersion>

<Version>4.0.0</Version>
<AssemblyName>EVIL.Lexical</AssemblyName>
<AssemblyTitle>EVIL.Lexical</AssemblyTitle>

<IsPackable>false</IsPackable>
</PropertyGroup>
</Project>
6 changes: 1 addition & 5 deletions Core/Tests/EVIL.CoreTests/EVIL.CoreTests.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
Expand All @@ -21,5 +18,4 @@
<ItemGroup>
<ProjectReference Include="..\..\EVIL.Grammar\EVIL.Grammar.csproj" />
</ItemGroup>

</Project>
23 changes: 16 additions & 7 deletions EVIL.sln
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FrontEnd", "FrontEnd", "{BB
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EVIL.evil", "FrontEnd\EVIL.evil\EVIL.evil.csproj", "{014FE88B-32E4-4369-ADE0-96F109121ED5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EVIL.evc", "FrontEnd\EVIL.evc\EVIL.evc.csproj", "{60CD39FE-8851-45EF-BA22-4ADE009868EF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EVIL.Ceres.SerializationTests", "VirtualMachine\Tests\EVIL.Ceres.SerializationTests\EVIL.Ceres.SerializationTests.csproj", "{F49A623B-4ACF-4BB6-A98F-72D7359465A1}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Packages", "Packages", "{2A6F0687-56F1-4451-8745-1F4EB1470C89}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EVIL.Parser", "Packages\EVIL.Parser\EVIL.Parser.csproj", "{3932F10C-210E-402A-99CC-C5F4132E46C9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EVIL.VM", "Packages\EVIL.VM\EVIL.VM.csproj", "{021189CD-8631-4452-BC45-57566A76BC3A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -89,14 +93,18 @@ Global
{014FE88B-32E4-4369-ADE0-96F109121ED5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{014FE88B-32E4-4369-ADE0-96F109121ED5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{014FE88B-32E4-4369-ADE0-96F109121ED5}.Release|Any CPU.Build.0 = Release|Any CPU
{60CD39FE-8851-45EF-BA22-4ADE009868EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{60CD39FE-8851-45EF-BA22-4ADE009868EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{60CD39FE-8851-45EF-BA22-4ADE009868EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{60CD39FE-8851-45EF-BA22-4ADE009868EF}.Release|Any CPU.Build.0 = Release|Any CPU
{F49A623B-4ACF-4BB6-A98F-72D7359465A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F49A623B-4ACF-4BB6-A98F-72D7359465A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F49A623B-4ACF-4BB6-A98F-72D7359465A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F49A623B-4ACF-4BB6-A98F-72D7359465A1}.Release|Any CPU.Build.0 = Release|Any CPU
{3932F10C-210E-402A-99CC-C5F4132E46C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3932F10C-210E-402A-99CC-C5F4132E46C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3932F10C-210E-402A-99CC-C5F4132E46C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3932F10C-210E-402A-99CC-C5F4132E46C9}.Release|Any CPU.Build.0 = Release|Any CPU
{021189CD-8631-4452-BC45-57566A76BC3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{021189CD-8631-4452-BC45-57566A76BC3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{021189CD-8631-4452-BC45-57566A76BC3A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{021189CD-8631-4452-BC45-57566A76BC3A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -117,7 +125,8 @@ Global
{513E7D3A-EE8B-49B7-83C4-89D2099F0A04} = {D0B83052-146C-450A-ADF7-4F19F0A09293}
{8E8AD351-85A0-4251-993C-BAF20FC70EA1} = {24C79A7F-AD81-452E-84F1-F47CBBBC1D3B}
{014FE88B-32E4-4369-ADE0-96F109121ED5} = {BB2970C2-E521-472D-9F0F-E056695F1AEE}
{60CD39FE-8851-45EF-BA22-4ADE009868EF} = {BB2970C2-E521-472D-9F0F-E056695F1AEE}
{F49A623B-4ACF-4BB6-A98F-72D7359465A1} = {B72D0BB0-95CE-4C61-9DB2-B036BAA51B02}
{3932F10C-210E-402A-99CC-C5F4132E46C9} = {2A6F0687-56F1-4451-8745-1F4EB1470C89}
{021189CD-8631-4452-BC45-57566A76BC3A} = {2A6F0687-56F1-4451-8745-1F4EB1470C89}
EndGlobalSection
EndGlobal
13 changes: 0 additions & 13 deletions FrontEnd/EVIL.evc/EVIL.evc.csproj

This file was deleted.

9 changes: 0 additions & 9 deletions FrontEnd/EVIL.evc/Program.cs

This file was deleted.

1 change: 1 addition & 0 deletions FrontEnd/EVIL.evil/EVIL.evil.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<Nullable>enable</Nullable>
<AssemblyName>evil</AssemblyName>
<Version>1.9.1</Version>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions Shared/Shared.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
</Content>
<Content Include="$(MSBuildThisFileDirectory)artwork\evil_logo.png" />
<Content Include="$(MSBuildThisFileDirectory)artwork\evil_logo.svg" />
<Content Include="$(MSBuildThisFileDirectory)docs\nuget.readme.md" />
<Content Include="$(MSBuildThisFileDirectory)highlighters\evil_katepart.xml" />
<Content Include="$(MSBuildThisFileDirectory)highlighters\evil_npp.xml" />
</ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions Shared/docs/nuget.readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This is a meta-package for the EVIL embeddable scripting language.
Visit repository URL to see more details.
16 changes: 5 additions & 11 deletions VirtualMachine/EVIL.Ceres.Runtime/EVIL.Ceres.Runtime.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,20 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>11.0</LangVersion>

<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

<Version>0.17.2</Version>
<AssemblyTitle>Ceres.Runtime</AssemblyTitle>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PackageId>EVIL.Ceres.Runtime</PackageId>


<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\EVIL.Ceres\EVIL.Ceres.csproj" />
</ItemGroup>

<ItemGroup>
<None Remove="ScriptBuiltins\dofile.vil"/>
<EmbeddedResource Include="ScriptBuiltins\dofile.vil">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</EmbeddedResource>
<None Remove="ScriptBuiltins\require.vil"/>
<EmbeddedResource Include="ScriptBuiltins\require.vil"/>
<EmbeddedResource Include="ScriptBuiltins\dofile.vil" />
<EmbeddedResource Include="ScriptBuiltins\require.vil" />
</ItemGroup>
</Project>
14 changes: 6 additions & 8 deletions VirtualMachine/EVIL.Ceres/EVIL.Ceres.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>11.0</LangVersion>

<Version>7.4.1</Version>
<AssemblyTitle>Ceres</AssemblyTitle>

<NoWarn>SYSLIB0011;CA2255</NoWarn>

<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>

<NoWarn>SYSLIB0011;CA2255</NoWarn>

<PackageId>EVIL.Ceres</PackageId>
<Version>7.4.1</Version>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<Nullable>enable</Nullable>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.3.0" />
<PackageReference Include="NUnit.Analyzers" Version="3.5.0" />
<PackageReference Include="coverlet.collector" Version="3.1.2" />
<PackageReference Include="Shouldly" Version="4.2.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\EVIL.Ceres.Runtime\EVIL.Ceres.Runtime.csproj" />
<ProjectReference Include="..\..\EVIL.Ceres\EVIL.Ceres.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2"/>
<PackageReference Include="NUnit" Version="3.13.3"/>
<PackageReference Include="NUnit3TestAdapter" Version="4.3.0"/>
<PackageReference Include="NUnit.Analyzers" Version="3.5.0"/>
<PackageReference Include="coverlet.collector" Version="3.1.2"/>
<PackageReference Include="Shouldly" Version="4.2.1"/>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\EVIL.Ceres.Runtime\EVIL.Ceres.Runtime.csproj"/>
<ProjectReference Include="..\..\EVIL.Ceres\EVIL.Ceres.csproj"/>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using System;
using System.IO;
using EVIL.Ceres.ExecutionEngine;
using EVIL.Ceres.ExecutionEngine.Collections;
using EVIL.Ceres.ExecutionEngine.Collections.Serialization;
Expand Down
Loading

0 comments on commit 225c1d2

Please sign in to comment.