Skip to content

Commit

Permalink
Rename .bat files
Browse files Browse the repository at this point in the history
pulling upstream is not needed for the first pack
  • Loading branch information
SunSerega committed Jan 7, 2024
1 parent 8f0d2b2 commit 10975a8
Show file tree
Hide file tree
Showing 15 changed files with 65 additions and 49 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/on commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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: |
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion PackAll-0 FIRST PACK.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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 %*


8 changes: 0 additions & 8 deletions PackAll-0 Just First Pack.bat

This file was deleted.

8 changes: 8 additions & 0 deletions PackAll-1 Just PullUpstream.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@setlocal enableextensions
@cd /d "%~dp0"



start PackAll.exe "Stages=PullUpstream" %*


15 changes: 15 additions & 0 deletions PackAll-1 PullUpstream + Pack.bat
Original file line number Diff line number Diff line change
@@ -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" %*


File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
76 changes: 38 additions & 38 deletions PackAll.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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=" должно быть слитно
//
Expand All @@ -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
Expand All @@ -53,7 +53,7 @@
OpenGLStr,OpenGLABCStr
);
var AllStages := HSet(
FirstPackStr,
PullUpstreamStr,
ReferenceStr,
DummyStr,
OpenCLStr,OpenCLABCStr,
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -178,7 +178,7 @@

end;

{$endregion FirstPack}
{$endregion PullUpstream}

{$region Reference}

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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 ) *
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@


# POCGL

PascalABC.Net Wrappers of OpenCL and OpenGL

---
Expand Down

0 comments on commit 10975a8

Please sign in to comment.