diff --git a/.github/workflows/ospx.yml b/.github/workflows/ospx.yml
index 4a067e7..6a7e1fc 100644
--- a/.github/workflows/ospx.yml
+++ b/.github/workflows/ospx.yml
@@ -1,54 +1,133 @@
-name: OSPX
-on: [push, pull_request]
+name: CI
+
+on:
+ push:
+ branches: [master, develop]
+ tags: ['v*']
+ pull_request:
+ branches: [master, develop]
+ workflow_dispatch:
+
+permissions:
+ contents: write
+
+env:
+ MAIN_PROJECT: oscript-sql
+ CONFIGURATION: Release
+ OS1_LINK: https://oscript.io/downloads/1_9_4/x64/OneScript-1.9.4-x64.zip
+ OS2_LINK: https://oscript.io/downloads/latest/OneScript-2.1.0-fdd-x64.zip
+
jobs:
- build:
- runs-on: windows-latest
- steps:
- - uses: actions/checkout@v4
- with:
- fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- - name: preinstall os2
- shell: cmd
- run: |
- mkdir os2
- cd os2
- curl https://oscript.io/downloads/night-build/x64/fdd --output fdd.zip
- 7z x fdd.zip > NUL
- c:\windows\system32\cmd.exe /C bin\oscript.bat -version
- c:\windows\system32\cmd.exe /C bin\oscript.bat lib\opm\src\cmd\opm.os install opm
- cd ..
- - name: preinstall os1
- shell: cmd
- run: |
- mkdir os1
- cd os1
- curl https://oscript.io/downloads/latest/zip --output latest.zip
- 7z x latest.zip > NUL
- bin\oscript.exe -version
- bin\oscript.exe lib\opm\src\cmd\opm.os install opm
- cd ..
- - name: build
- run: dotnet publish --configuration Release
- - name: pack-and-install
- shell: cmd
- run: |
- cd oscript-sql\bin\Release\net6.0\publish
- del ScriptEngine*.dll NewtonSoft*.dll DotNetZip*.dll OneScript*.dll *.pdb
- cd ..\..\..\..\..
- xcopy /E oscript-sql\bin\Release\net6.0\publish\* oslib\Components\dotnet\
- cd oslib
- c:\windows\system32\cmd.exe /C ..\os2\bin\oscript.bat ..\os2\lib\opm\src\cmd\opm.os build .
- for %%X in (*.ospx) do (c:\windows\system32\cmd.exe /C ..\os2\bin\oscript.bat ..\os2\lib\opm\src\cmd\opm.os install -f %%X )
- for %%X in (*.ospx) do (..\os1\bin\oscript.exe ..\os1\lib\opm\src\cmd\opm.os install -f %%X )
- cd ..
- - name: test os1
- env:
- OSLIB_LOADER_TRACE: 1
- run: |
- os1\bin\oscript.exe testcomponent.os
- - name: test os2
- env:
- OSLIB_LOADER_TRACE: 1
- run: |
- c:\windows\system32\cmd.exe /C os2\bin\oscript.bat testcomponent.os
-
\ No newline at end of file
+ build:
+ runs-on: windows-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Setup UTF-8 locale
+ shell: pwsh
+ run: |
+ reg add "HKLM\Software\Microsoft\Command Processor" /v Autorun /t REG_SZ /d "chcp 65001>nul" /f
+ Set-WinSystemLocale -SystemLocale ru-RU -ErrorAction SilentlyContinue
+ chcp 65001
+
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: 8.0.x
+
+ - name: Install OneScript 2.x
+ shell: cmd
+ run: |
+ mkdir os2
+ cd os2
+ curl -L -o fdd.zip %OS2_LINK%
+ 7z x fdd.zip -y > NUL
+ call bin\oscript.bat -version
+ call bin\oscript.bat lib\opm\src\cmd\opm.os install opm
+ call bin\oscript.bat lib\opm\src\cmd\opm.os list
+ cd ..
+
+ - name: Install OneScript 1.x
+ shell: cmd
+ run: |
+ mkdir os1
+ cd os1
+ curl -L -o os1.zip %OS1_LINK%
+ 7z x os1.zip -y > NUL
+ bin\oscript.exe -version
+ bin\oscript.exe lib\opm\src\cmd\opm.os install opm
+ bin\oscript.exe lib\opm\src\cmd\opm.os list
+ cd ..
+
+ - name: Download OneScriptDocumenter
+ shell: cmd
+ run: |
+ curl -L -o OneScriptDocumenter.zip https://github.com/dmpas/OneScriptDocumenter/releases/download/1.0.13/documenter.zip
+ 7z x OneScriptDocumenter.zip -y > NUL
+
+ - name: Restore
+ run: dotnet restore oscript-sql.sln
+
+ - name: Build
+ run: |
+ dotnet build oscript-sql.sln -c ${{ env.CONFIGURATION }} --no-restore
+ dotnet publish --no-build --configuration ${{ env.CONFIGURATION }} --no-restore
+
+ - name: Package
+ shell: cmd
+ run: |
+ set PUBLISH=%MAIN_PROJECT%\bin\%CONFIGURATION%\net8.0\publish
+ del %PUBLISH%\*.pdb
+
+ mkdir oslib\Components\dotnet
+
+ OneScriptDocumenter.exe json oslib\Components\dotnet\syntaxHelp.json %PUBLISH%\1script_sql.dll
+
+ del %PUBLISH%\ScriptEngine*.* %PUBLISH%\NewtonSoft*.* %PUBLISH%\DotNetZip*.*
+
+ xcopy %PUBLISH%\* oslib\Components\dotnet\ /Y /E
+ xcopy README.md oslib\ /Y
+
+ cd oslib
+ call ..\os2\bin\oscript.bat ..\os2\lib\opm\src\cmd\opm.os build .
+ cd ..
+
+ - name: Test (OneScript 2.x)
+ shell: cmd
+ run: |
+ cd oslib
+ for %%X in (*.ospx) do (call ..\os2\bin\oscript.bat ..\os2\lib\opm\src\cmd\opm.os install -f %%X)
+ cd ..
+ set OSLIB_LOADER_TRACE=1
+ call os2\bin\oscript.bat testcomponent.os
+
+ - name: Test (OneScript 1.x)
+ shell: cmd
+ run: |
+ cd oslib
+ for %%X in (*.ospx) do (..\os1\bin\oscript.exe ..\os1\lib\opm\src\cmd\opm.os install -f %%X)
+ cd ..
+ set OSLIB_LOADER_TRACE=1
+ os1\bin\oscript.exe testcomponent.os
+
+ - name: Upload ospx artifact
+ uses: actions/upload-artifact@v7
+ with:
+ name: sql
+ path: oslib/*.ospx
+ archive: false
+
+ - name: Upload components artifact
+ uses: actions/upload-artifact@v7
+ with:
+ name: components
+ path: oslib/Components/dotnet/*.dll
+
+ - name: Publish GitHub Release
+ if: startsWith(github.ref, 'refs/tags/')
+ uses: softprops/action-gh-release@v2
+ with:
+ files: oslib/*.ospx
+ generate_release_notes: true
diff --git a/TestApp/TestApp.csproj b/TestApp/TestApp.csproj
index fe812df..a218529 100644
--- a/TestApp/TestApp.csproj
+++ b/TestApp/TestApp.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net8.0
OScriptSql
2.0.0
2.0.0
@@ -14,7 +14,7 @@
-
+
\ No newline at end of file
diff --git a/appveyor.yml b/appveyor.yml
deleted file mode 100644
index fc082d8..0000000
--- a/appveyor.yml
+++ /dev/null
@@ -1,90 +0,0 @@
-version: 1.3.2-{build}
-image: Visual Studio 2022
-environment:
- main_project: oscript-sql
-before_build:
-- ps: nuget restore
-init:
-- REG ADD "HKLM\Software\Microsoft\Command Processor" /v Autorun /t REG_SZ /d "chcp 65001>nul" /f
-- ps: Set-WinSystemLocale ru-RU
-- ps: Start-Sleep -s 15
-- ps: Restart-Computer
-install:
-- cmd: >-
- mkdir os2
-
- cd os2
-
- appveyor DownloadFile https://oscript.io/downloads/preview/OneScript-2.0.0-rc.7-fdd-x64.zip -FileName fdd.zip
-
- 7z x fdd.zip > NUL
-
- bin\oscript.bat -version
-
- bin\oscript.bat lib\opm\src\cmd\opm.os install opm
-
- cd ..
-
-- cmd: >-
- mkdir os1
-
- cd os1
-
- appveyor DownloadFile https://oscript.io/downloads/latest/zip -FileName latest.zip
-
- 7z x latest.zip > NUL
-
- bin\oscript.exe -version
-
- bin\oscript.exe lib\opm\src\cmd\opm.os install opm
-
- cd ..
-
-- cmd: >-
-
- appveyor DownloadFile https://github.com/dmpas/OneScriptDocumenter/releases/download/1.0.13/documenter.zip -FileName OneScriptDocumenter.zip
-
- 7z x OneScriptDocumenter.zip > NUL
-
-build:
- verbosity: minimal
-configuration: Release
-test_script:
-- cmd: dotnet nuget locals all --clear
-- cmd: >-
- set OSLIB_LOADER_TRACE=1
-
- os2\bin\oscript.bat testcomponent.os
-
-- cmd: >-
- set OSLIB_LOADER_TRACE=1
-
- os1\bin\oscript.exe testcomponent.os
-
-after_build:
-- ps: dotnet publish --no-build --configuration $env:Configuration
-- cmd: >-
-
- set BUILDDIR=%main_project%\bin\%CONFIGURATION%\net6.0\publish
-
- mkdir oslib\Components\dotnet
-
- OneScriptDocumenter.exe json oslib\Components\dotnet\syntaxHelp.json %BUILDDIR%\1script_%main_project%.dll
-
- del /F /Q %BUILDDIR%\ScriptEngine*.* %BUILDDIR%\NewtonSoft*.* %BUILDDIR%\DotNetZip*.*
-
- xcopy /E %BUILDDIR%\* oslib\Components\dotnet\
-
- cd oslib
-
- ..\os2\bin\oscript.bat ..\os2\lib\opm\src\cmd\opm.os build .
-
- for %%X in (*.ospx) do (..\os2\bin\oscript.bat ..\os2\lib\opm\src\cmd\opm.os install -f %%X )
-
- for %%X in (*.ospx) do (..\os1\bin\oscript.exe ..\os1\lib\opm\src\cmd\opm.os install -f %%X )
-
- cd ..
-
-artifacts:
-- path: oslib\*.ospx
- name: sql
diff --git a/oscript-sql/oscript-sql.csproj b/oscript-sql/oscript-sql.csproj
index f2f2f72..d262c42 100644
--- a/oscript-sql/oscript-sql.csproj
+++ b/oscript-sql/oscript-sql.csproj
@@ -6,14 +6,14 @@
Library
OScriptSql
1script_sql
- net6.0
+ net8.0
-
-
-
+
+
+
diff --git a/oslib/packagedef b/oslib/packagedef
index 42b570c..36d3e5e 100644
--- a/oslib/packagedef
+++ b/oslib/packagedef
@@ -1,6 +1,6 @@
Описание.Имя("sql")
- .Версия("1.3.2")
+ .Версия("1.3.3")
.ВключитьФайл("Components")
.ВключитьФайл("docs")
.ВключитьФайл("tests")