From 56d0129be45a0a141be50fce603f699757254000 Mon Sep 17 00:00:00 2001 From: Ugochukwu Mmaduekwe Date: Fri, 27 Mar 2026 11:18:34 +0100 Subject: [PATCH 1/5] try adding macOS ci --- .github/workflows/make.pas | 10 ++++++---- .github/workflows/make.yml | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.github/workflows/make.pas b/.github/workflows/make.pas index d949007..56706e7 100644 --- a/.github/workflows/make.pas +++ b/.github/workflows/make.pas @@ -26,12 +26,14 @@ // Package path filter — skip platform-incompatible and template packages PackageExcludePattern = - {$IFDEF MSWINDOWS} + {$IFDEF MSWINDOWS} '(cocoa|x11|_template)' - {$ELSE} + {$ELSEIF DEFINED(DARWIN)} + '(gdi|x11|_template)' + {$ELSE} '(cocoa|gdi|_template)' - {$ENDIF} - ; + {$ENDIF} + ; OPMBaseUrl = 'https://packages.lazarus-ide.org/'; diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index caa6810..9463f6a 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -25,6 +25,7 @@ jobs: - ubuntu-latest - ubuntu-24.04-arm - windows-latest + - macos-latest steps: - name: Checkout @@ -48,6 +49,20 @@ jobs: sudo bash -c 'apt-get update; apt-get install -y lazarus' >/dev/null instantfpc -Fu/usr/lib/lazarus/*/components/lazutils .github/workflows/make.pas + - name: Install Lazarus on macOS + if: runner.os == 'macOS' + uses: gcarreno/setup-lazarus@v3 + with: + lazarus-version: stable + with-cache: false + + - name: Build on macOS + if: runner.os == 'macOS' + shell: bash + run: | + set -xeuo pipefail + instantfpc .github/workflows/make.pas + - name: Build on Windows if: runner.os == 'Windows' shell: powershell From b749be2797037d65125773653c152d8862ee934b Mon Sep 17 00:00:00 2001 From: Ugochukwu Mmaduekwe Date: Fri, 27 Mar 2026 11:23:39 +0100 Subject: [PATCH 2/5] fix defines in make.pas --- .github/workflows/make.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/make.pas b/.github/workflows/make.pas index 56706e7..e581e39 100644 --- a/.github/workflows/make.pas +++ b/.github/workflows/make.pas @@ -26,13 +26,13 @@ // Package path filter — skip platform-incompatible and template packages PackageExcludePattern = - {$IFDEF MSWINDOWS} + {$IF DEFINED(MSWINDOWS)} '(cocoa|x11|_template)' {$ELSEIF DEFINED(DARWIN)} '(gdi|x11|_template)' {$ELSE} '(cocoa|gdi|_template)' - {$ENDIF} + {$IFEND} ; OPMBaseUrl = 'https://packages.lazarus-ide.org/'; From ce94226248d5d8dcb1b6b4edb11205a01a2fe0d0 Mon Sep 17 00:00:00 2001 From: Ugochukwu Mmaduekwe Date: Fri, 27 Mar 2026 11:44:45 +0100 Subject: [PATCH 3/5] remove LazUtils dependencies --- .github/workflows/make.pas | 75 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 72 insertions(+), 3 deletions(-) diff --git a/.github/workflows/make.pas b/.github/workflows/make.pas index e581e39..2ddd588 100644 --- a/.github/workflows/make.pas +++ b/.github/workflows/make.pas @@ -5,7 +5,6 @@ Classes, SysUtils, StrUtils, - FileUtil, Zipper, fphttpclient, RegExpr, @@ -40,6 +39,76 @@ var ErrorCount: Integer = 0; +// --------------------------------------------------------------------------- +// FCL/RTL-only helpers (replace FileUtil usage) +// --------------------------------------------------------------------------- + +function ReadFileToString(const AFileName: string): string; +var + Stream: TFileStream; + Size: Int64; +begin + Result := ''; + Stream := TFileStream.Create(AFileName, fmOpenRead or fmShareDenyNone); + try + Size := Stream.Size; + if Size <= 0 then + Exit; + SetLength(Result, Size); + Stream.Position := 0; + Stream.ReadBuffer(Pointer(Result)^, Size); + finally + Stream.Free; + end; +end; + +function MatchesMaskSimple(const AFileName, AMask: string): Boolean; +var + LExt: string; +begin + LExt := LowerCase(ExtractFileExt(AFileName)); + + if AMask = '*.lpk' then + Exit(LExt = '.lpk'); + + if AMask = '*.lpi' then + Exit(LExt = '.lpi'); + + Result := False; +end; + +procedure FindAllFilesRecursive(const ADir, AMask: string; AList: TStrings); +var + Search: TSearchRec; + DirPath: string; + EntryPath: string; +begin + DirPath := IncludeTrailingPathDelimiter(ExpandFileName(ADir)); + + if FindFirst(DirPath + '*', faAnyFile, Search) = 0 then + try + repeat + if (Search.Name = '.') or (Search.Name = '..') then + Continue; + + EntryPath := DirPath + Search.Name; + + if (Search.Attr and faDirectory) <> 0 then + FindAllFilesRecursive(EntryPath, AMask, AList) + else if MatchesMaskSimple(Search.Name, AMask) then + AList.Add(EntryPath); + until FindNext(Search) <> 0; + finally + FindClose(Search); + end; +end; + +function FindAllFilesList(const ASearchDir, AMask: string): TStringList; +begin + Result := TStringList.Create; + FindAllFilesRecursive(ASearchDir, AMask, Result); +end; + // --------------------------------------------------------------------------- // Logging helpers // --------------------------------------------------------------------------- @@ -281,7 +350,7 @@ procedure RegisterAllPackages(const ASearchDir: string); List: TStringList; Each: string; begin - List := FindAllFiles(ASearchDir, '*.lpk', True); + List := FindAllFilesList(ASearchDir, '*.lpk'); try for Each in List do RegisterPackage(Each); @@ -299,7 +368,7 @@ procedure BuildAllProjects; List: TStringList; Each: string; begin - List := FindAllFiles(Target, '*.lpi', True); + List := FindAllFilesList(Target, '*.lpi'); try for Each in List do if IsTestProject(Each) then From fe2219db3b23518088a0f6e6a18bc1dee4a540ae Mon Sep 17 00:00:00 2001 From: Ugochukwu Mmaduekwe Date: Fri, 27 Mar 2026 12:07:43 +0100 Subject: [PATCH 4/5] remove LazUtils from required build units --- .github/workflows/make.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index 9463f6a..0f94ed1 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -39,7 +39,7 @@ jobs: run: | set -xeuo pipefail sudo bash -c 'apt-get update; apt-get install -y lazarus' >/dev/null - instantfpc -Fu/usr/lib/lazarus/*/components/lazutils .github/workflows/make.pas + instantfpc .github/workflows/make.pas - name: Build on Linux (AArch64) if: runner.os == 'Linux' && runner.arch == 'ARM64' @@ -47,7 +47,7 @@ jobs: run: | set -xeuo pipefail sudo bash -c 'apt-get update; apt-get install -y lazarus' >/dev/null - instantfpc -Fu/usr/lib/lazarus/*/components/lazutils .github/workflows/make.pas + instantfpc .github/workflows/make.pas - name: Install Lazarus on macOS if: runner.os == 'macOS' @@ -87,4 +87,4 @@ jobs: Get-Command instantfpc Write-Host "Building make.pas..." - instantfpc '-FuC:\Lazarus\components\lazutils' .github/workflows/make.pas \ No newline at end of file + instantfpc .github/workflows/make.pas \ No newline at end of file From f90ba4bad464cc9818abf55ce784a53f0d8c02c5 Mon Sep 17 00:00:00 2001 From: Ugochukwu Mmaduekwe Date: Fri, 27 Mar 2026 12:24:29 +0100 Subject: [PATCH 5/5] attempt switching to actions checkout v6 --- .github/workflows/make.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index 0f94ed1..9a2d598 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -29,7 +29,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: submodules: true