From 015b80a85f3fa95a130596f74837baa3a252c3ee Mon Sep 17 00:00:00 2001 From: Sun Serega Date: Sun, 7 Jan 2024 16:43:33 +0200 Subject: [PATCH] Rename .bat files pulling upstream is not needed for the first pack --- .github/workflows/on commit.yaml | 4 +- PackAll-0 FIRST PACK.bat | 2 +- ...ack.bat => PackAll-1 Just PullUpstream.bat | 0 PackAll-1 PullUpstream + Pack.bat | 15 ++++ ... Low lvl.bat => PackAll-2 Low lvl only.bat | 0 ...-2 CLABC Full.bat => PackAll-3 CL Full.bat | 0 ...-2 GLABC Full.bat => PackAll-3 GL Full.bat | 0 ...CLABC Only.bat => PackAll-4 Just CLABC.bat | 0 ...GLABC Only.bat => PackAll-4 Just GLABC.bat | 0 ...4 Test Only.bat => PackAll-5 Test Only.bat | 0 ...ase Only.bat => PackAll-6 Release Only.bat | 0 PackAll.pas | 76 +++++++++---------- README.md | 1 + 13 files changed, 57 insertions(+), 41 deletions(-) rename PackAll-0 Just First Pack.bat => PackAll-1 Just PullUpstream.bat (100%) create mode 100644 PackAll-1 PullUpstream + Pack.bat rename PackAll-1 Low lvl.bat => PackAll-2 Low lvl only.bat (100%) rename PackAll-2 CLABC Full.bat => PackAll-3 CL Full.bat (100%) rename PackAll-2 GLABC Full.bat => PackAll-3 GL Full.bat (100%) rename PackAll-3 CLABC Only.bat => PackAll-4 Just CLABC.bat (100%) rename PackAll-3 GLABC Only.bat => PackAll-4 Just GLABC.bat (100%) rename PackAll-4 Test Only.bat => PackAll-5 Test Only.bat (100%) rename PackAll-5 Release Only.bat => PackAll-6 Release Only.bat (100%) diff --git a/.github/workflows/on commit.yaml b/.github/workflows/on commit.yaml index bdb7b25a..c6f08792 100644 --- a/.github/workflows/on commit.yaml +++ b/.github/workflows/on commit.yaml @@ -56,7 +56,7 @@ jobs: Write-Host "Compile: " -NoNewline Start-Process -FilePath 'D:\PABCNETC\pabcnetcclear.exe' -ArgumentList '"PackAll.pas"' -Wait -NoNewWindow - $process = Start-Process -FilePath 'PackAll.exe' -ArgumentList '"Stages= FirstPack + Reference + Dummy + OpenCL+OpenCLABC + OpenGL+OpenGLABC + Compile + Test + Release" "PasCompPath=D:\PABCNETC\pabcnetcclear.exe" SkipFinishedPause' -NoNewWindow -PassThru -Wait + $process = Start-Process -FilePath 'PackAll.exe' -ArgumentList '"Stages= PullUpstream + Reference + Dummy + OpenCL+OpenCLABC + OpenGL+OpenGLABC + Compile + Test + Release" "PasCompPath=D:\PABCNETC\pabcnetcclear.exe" SkipFinishedPause' -NoNewWindow -PassThru -Wait $exitCode = $process.ExitCode if ($exitCode -ne 0) { Write-Host "Exit code is not 0: $exitCode" @@ -139,7 +139,7 @@ jobs: mono "../PABCNETC/pabcnetcclear.exe" "PackAll.pas" # TODO need mono anon pipes workaround -# mono "PackAll.exe" "Stages= FirstPack + Reference + Dummy + OpenCL+OpenCLABC + OpenGL+OpenGLABC + Compile + Test + Release" "PasCompPath=../PABCNETC/pabcnetcclear.exe" SkipFinishedPause +# mono "PackAll.exe" "Stages= PullUpstream + Reference + Dummy + OpenCL+OpenCLABC + OpenGL+OpenGLABC + Compile + Test + Release" "PasCompPath=../PABCNETC/pabcnetcclear.exe" SkipFinishedPause - name: Check for changes run: | diff --git a/PackAll-0 FIRST PACK.bat b/PackAll-0 FIRST PACK.bat index 255e5090..49f5b25d 100644 --- a/PackAll-0 FIRST PACK.bat +++ b/PackAll-0 FIRST PACK.bat @@ -10,6 +10,6 @@ IF NOT EXIST "PackAll.exe" ( DEL "PackAll.pdb" ) -start PackAll.exe "Stages= FirstPack + Reference + Dummy + OpenCL+OpenCLABC + OpenGL+OpenGLABC + Compile + Test + Release" %* +start PackAll.exe %* diff --git a/PackAll-0 Just First Pack.bat b/PackAll-1 Just PullUpstream.bat similarity index 100% rename from PackAll-0 Just First Pack.bat rename to PackAll-1 Just PullUpstream.bat diff --git a/PackAll-1 PullUpstream + Pack.bat b/PackAll-1 PullUpstream + Pack.bat new file mode 100644 index 00000000..18a1f5f5 --- /dev/null +++ b/PackAll-1 PullUpstream + Pack.bat @@ -0,0 +1,15 @@ +@setlocal enableextensions +@cd /d "%~dp0" + +call DeleteAllTemp.bat NoPause + + + +IF NOT EXIST "PackAll.exe" ( + "C:\Program Files (x86)\PascalABC.NET\pabcnetc" "PackAll.pas" + DEL "PackAll.pdb" +) + +start PackAll.exe "Stages= PullUpstream + Reference + Dummy + OpenCL+OpenCLABC + OpenGL+OpenGLABC + Compile + Test + Release" %* + + diff --git a/PackAll-1 Low lvl.bat b/PackAll-2 Low lvl only.bat similarity index 100% rename from PackAll-1 Low lvl.bat rename to PackAll-2 Low lvl only.bat diff --git a/PackAll-2 CLABC Full.bat b/PackAll-3 CL Full.bat similarity index 100% rename from PackAll-2 CLABC Full.bat rename to PackAll-3 CL Full.bat diff --git a/PackAll-2 GLABC Full.bat b/PackAll-3 GL Full.bat similarity index 100% rename from PackAll-2 GLABC Full.bat rename to PackAll-3 GL Full.bat diff --git a/PackAll-3 CLABC Only.bat b/PackAll-4 Just CLABC.bat similarity index 100% rename from PackAll-3 CLABC Only.bat rename to PackAll-4 Just CLABC.bat diff --git a/PackAll-3 GLABC Only.bat b/PackAll-4 Just GLABC.bat similarity index 100% rename from PackAll-3 GLABC Only.bat rename to PackAll-4 Just GLABC.bat diff --git a/PackAll-4 Test Only.bat b/PackAll-5 Test Only.bat similarity index 100% rename from PackAll-4 Test Only.bat rename to PackAll-5 Test Only.bat diff --git a/PackAll-5 Release Only.bat b/PackAll-6 Release Only.bat similarity index 100% rename from PackAll-5 Release Only.bat rename to PackAll-6 Release Only.bat diff --git a/PackAll.pas b/PackAll.pas index cb0aaa88..f1bd19cb 100644 --- a/PackAll.pas +++ b/PackAll.pas @@ -8,16 +8,16 @@ // // - "Stages=...+...+..." // === Запускает только указанные стадии упаковки -// - "FirstPack" | Датаскрапинг данных об исходных библиотеках. Единственная по-умолчанию выключенная стадия -// - "Reference" | Упаковка справок -// - "Dummy" | Упаковка модуля Dummy.pas (тест кодогенерации) -// - "OpenCL" | Упаковка модуля OpenCL.pas -// - "OpenCLABC" | Упаковка модуля OpenCLABC.pas -// - "OpenGL" | Упаковка модуля OpenGL.pas -// - "OpenGLABC" | Упаковка модуля OpenGLABC.pas -// - "Compile" | Компиляция всех упакованных модулей -// - "Test" | Тестирование (то же что запуск "Tests\Tester.exe" напрямую, но с указанными модулями) -// - "Release" | Создание и наполнение папки Release, а так же копирование чего надо в ProgramFiles +// - "PullUpstream" | Датаскрапинг данных об исходных библиотеках. Единственная по-умолчанию выключенная стадия +// - "Reference" | Упаковка справок +// - "Dummy" | Упаковка модуля Dummy.pas (тест кодогенерации) +// - "OpenCL" | Упаковка модуля OpenCL.pas +// - "OpenCLABC" | Упаковка модуля OpenCLABC.pas +// - "OpenGL" | Упаковка модуля OpenGL.pas +// - "OpenGLABC" | Упаковка модуля OpenGLABC.pas +// - "Compile" | Компиляция всех упакованных модулей +// - "Test" | Тестирование (то же что запуск "Tests\Tester.exe" напрямую, но с указанными модулями) +// - "Release" | Создание и наполнение папки Release, а так же копирование чего надо в ProgramFiles // === К примеру: "Stages= OpenCLABC + Compile + Test + Release" // === Лишние пробелы по краям имён стадий допускаются, но "Stages=" должно быть слитно // @@ -33,16 +33,16 @@ {$region SpecialNames} -const FirstPackStr = 'FirstPack'; -const ReferenceStr = 'Reference'; -const DummyStr = 'Dummy'; -const OpenCLStr = 'OpenCL'; -const OpenCLABCStr = 'OpenCLABC'; -const OpenGLStr = 'OpenGL'; -const OpenGLABCStr = 'OpenGLABC'; -const CompileStr = 'Compile'; -const TestStr = 'Test'; -const ReleaseStr = 'Release'; +const PullUpstreamStr = 'PullUpstream'; +const ReferenceStr = 'Reference'; +const DummyStr = 'Dummy'; +const OpenCLStr = 'OpenCL'; +const OpenCLABCStr = 'OpenCLABC'; +const OpenGLStr = 'OpenGL'; +const OpenGLABCStr = 'OpenGLABC'; +const CompileStr = 'Compile'; +const TestStr = 'Test'; +const ReleaseStr = 'Release'; var AllLLModules := HSet( DummyStr,OpenCLStr,OpenGLStr @@ -53,7 +53,7 @@ OpenGLStr,OpenGLABCStr ); var AllStages := HSet( - FirstPackStr, + PullUpstreamStr, ReferenceStr, DummyStr, OpenCLStr,OpenCLABCStr, @@ -132,13 +132,13 @@ {$endregion Base} - {$region FirstPack} + {$region PullUpstream} - FirstPackStage = sealed class(PackingStage) + PullUpstreamStage = sealed class(PackingStage) public constructor; begin - inherited Create(FirstPackStr); + inherited Create(PullUpstreamStr); self.description := 'First Pack'; end; @@ -178,7 +178,7 @@ end; - {$endregion FirstPack} + {$endregion PullUpstream} {$region Reference} @@ -472,12 +472,12 @@ if not |'[REDIRECTIOMODE]','[RUNMODE]'|.Any(m->m in System.Environment.GetCommandLineArgs) then begin PackingStage.CurrentStages := AllStages.ToHashSet; - PackingStage.CurrentStages.ExceptWith(|FirstPackStr|); + PackingStage.CurrentStages.ExceptWith(|PullUpstreamStr|); Otp($'Executing default stages:'); end else begin PackingStage.CurrentStages := AllStages.ToHashSet; -// PackingStage.CurrentStages := HSet(FirstPackStr); +// PackingStage.CurrentStages := HSet(PullUpstreamStr); // PackingStage.CurrentStages := HSet(DummyStr, OpenCLStr, OpenGLStr, CompileStr); // PackingStage.CurrentStages := HSet(OpenCLABCStr, OpenGLABCStr, CompileStr); // PackingStage.CurrentStages := HSet(DummyStr, OpenCLStr,OpenCLABCStr, OpenGLStr,OpenGLABCStr, CompileStr); @@ -507,21 +507,21 @@ {$endregion MiscClear} - var T_FirstPack := FirstPackStage .Create .MakeTask; - var T_Reference := ReferenceStage .Create .MakeTask; - var T_Dummy := LLModuleStage .Create(DummyStr) .MakeTask; - var T_OpenCL := LLModuleStage .Create(OpenCLStr) .MakeTask; - var T_OpenCLABC := HLModuleStage .Create(OpenCLABCStr) .MakeTask; - var T_OpenGL := LLModuleStage .Create(OpenGLStr) .MakeTask; - var T_OpenGLABC := HLModuleStage .Create(OpenGLABCStr) .MakeTask; - var T_Compile := CompileStage .Create .MakeTask; - var T_Test := TestStage .Create .MakeTask; - var T_Release := ReleaseStage .Create .MakeTask; + var T_PullUpstream := PullUpstreamStage.Create .MakeTask; + var T_Reference := ReferenceStage .Create .MakeTask; + var T_Dummy := LLModuleStage .Create(DummyStr) .MakeTask; + var T_OpenCL := LLModuleStage .Create(OpenCLStr) .MakeTask; + var T_OpenCLABC := HLModuleStage .Create(OpenCLABCStr) .MakeTask; + var T_OpenGL := LLModuleStage .Create(OpenGLStr) .MakeTask; + var T_OpenGLABC := HLModuleStage .Create(OpenGLABCStr) .MakeTask; + var T_Compile := CompileStage .Create .MakeTask; + var T_Test := TestStage .Create .MakeTask; + var T_Release := ReleaseStage .Create .MakeTask; Otp('Start packing'); ( - T_FirstPack + + T_PullUpstream + T_Reference * ( T_Dummy ) * diff --git a/README.md b/README.md index e6343983..2e670610 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ # POCGL + PascalABC.Net Wrappers of OpenCL and OpenGL ---