diff --git a/.github/workflows/dotnet-desktop.yml b/.github/workflows/dotnet-desktop.yml index debcebab..3f0a2176 100644 --- a/.github/workflows/dotnet-desktop.yml +++ b/.github/workflows/dotnet-desktop.yml @@ -56,7 +56,9 @@ jobs: # https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on env: - Solution_Name: .\src\CS-Script.sln # Replace with your solution name, i.e. MyWpfApp.sln.WpfApp.Tests\MyWpfApp.Tests.csproj.approj. + Solution_Name: .\src\CS-Script.sln + CLI_Test_Proj_Name: .\src\Tests.cscs\Tests.CLI.csproj + CSScriptLib_Test_Proj_Name: .\src\Tests.CSScriptLib\Tests.CSScriptLib.csproj steps: - name: Checkout @@ -64,11 +66,6 @@ jobs: with: fetch-depth: 0 - - name: Init1 - run: pwd - - name: Init2 - run: ls - # Install the .NET Core workload - name: Install .NET Core uses: actions/setup-dotnet@v3 @@ -79,25 +76,25 @@ jobs: - name: Setup MSBuild.exe uses: microsoft/setup-msbuild@v1.0.2 - # - name: Restore the application - # run: dotnet restore $env:Solution_Name + - name: Restore the application + run: dotnet restore $env:Solution_Name + - name: Build the solution + run: ./1.build-release.cmd + working-directory: src + + - name: Test the solution + run: ./2.run-tests.cmd + working-directory: src + # - name: Build the solution - # run: dotnet build .\src\CS-Script.sln + # run: dotnet build $env:Solution_Name - # # Execute all unit tests in the solution - # - name: Execute unit tests - # run: dotnet test .\src\Tests.CSScriptLib\Tests.CSScriptLib.csproj + # - name: Execute CSScriptLib unit tests + # run: dotnet test $env:CSScriptLib_Test_Proj_Name - # # Execute all unit tests in the solution - # - name: Execute unit tests - # run: dotnet test .\src\Tests.cscs\Tests.CLI.csproj - - # # Restore the application to populate the obj folder with RuntimeIdentifiers - # - name: Restore the application - # run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration - # env: - # Configuration: ${{ matrix.configuration }} + # - name: Execute CLI unit tests + # run: dotnet test $env:CLI_Test_Proj_Name -e CI="true" # # Build distributions # - name: Build distros diff --git a/help.txt b/help.txt index 1ab8afba..72f0e529 100644 --- a/help.txt +++ b/help.txt @@ -1,4 +1,4 @@ -C# Script execution engine (.NET Core). Version 4.8.11.0. +C# Script execution engine (.NET Core). Version 4.8.12.0. Copyright (C) 2004-2023 Oleg Shilo. @@ -15,8 +15,7 @@ Copyright (C) 2004-2023 Oleg Shilo. (e.g. `-help cli:md`) - output file for the help content - Reversed order of parameters for the command specific help is also acceptable. The all following argument - combinations print the same help topic for 'cache' command: + Reversed order of parameters for the command specific help is also acceptable. The all following argument combinations print the same help topic for 'cache' command: -help cache -? cache @@ -25,19 +24,26 @@ Copyright (C) 2004-2023 Oleg Shilo. -e Compiles script into console application executable. - Note this switch will force the use of `dotnet` compiler as `csc` is not capable of building executable - assemblies. Thus `//css_engine` and `-engine` options will always be ignored. + Note this switch will force the use of `dotnet` compiler as `csc` is not capable of building executable assemblies. Thus `//css_engine` and `-engine` options will always be ignored. -ew - Compiles script into Windows application executable (applicable only on Windows). - --c[:<0|1>] Executes compiled script cache (e.g. /script.cs.dll) if found. This command improves performance by avoiding compiling the script if it was not changed since last execution. -c:1|-c - enable caching -c:0 - disable caching (which might be enabled globally) +-rx + Run script as an external process. This option is incompatible with VB scripts. + This mode allows execution of the scripts that are otherwise incompatible with the runtime of the script engine (e.g. x86 vs x64, .NETCore vs .NETFramework). + Note, this execution mode comes with some limitations (depending on the compilation engine): + - `csc` + The compiled script is executed with dotnet.exe launcher (e.g. `dotnet script.dll`). + - `dotnet` + The compiled script is executed directly as exe(e.g. `script.exe`). + - `roslyn` + This mode is not supported as Roslyn scripts do not support `static main`. + -ca Compiles script file into cache file (e.g. /script.cs.dll). @@ -53,17 +59,14 @@ Copyright (C) 2004-2023 Oleg Shilo. -vs