Skip to content

Commit 46ea9be

Browse files
feat: install Lazarus 4.8 on Windows and macOS runners, drop setup-lazarus action
Co-authored-by: ansgarbecker <ansgarbecker@users.noreply.github.com>
1 parent 35e24e8 commit 46ea9be

1 file changed

Lines changed: 26 additions & 6 deletions

File tree

‎.github/workflows/lazarus.yaml‎

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,32 @@ jobs:
3434
- name: Checkout source code
3535
uses: actions/checkout@v4
3636

37-
- name: Install Lazarus
38-
if: ${{ matrix.operating-system != 'ubuntu-latest' }}
39-
uses: gcarreno/setup-lazarus@v3
40-
with:
41-
lazarus-version: ${{ matrix.lazarus-versions }}
42-
with-cache: false
37+
- name: Install Lazarus 4.8 (Windows)
38+
if: ${{ matrix.operating-system == 'windows-latest' }}
39+
shell: pwsh
40+
run: |
41+
$installer = "${env:RUNNER_TEMP}\lazarus-4.8.exe"
42+
Invoke-WebRequest -Uri "https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%204.8/lazarus-4.8-fpc-3.2.2-win64.exe" -OutFile $installer
43+
$lazarusDir = "${env:RUNNER_TEMP}\lazarus"
44+
Start-Process -FilePath $installer -ArgumentList "/VERYSILENT", "/SP-", "/SUPPRESSMSGBOXES", "/DIR=$lazarusDir" -Wait -NoNewWindow
45+
Add-Content -Path $env:GITHUB_PATH -Value $lazarusDir
46+
Add-Content -Path $env:GITHUB_PATH -Value "$lazarusDir\fpc\3.2.2\bin\x86_64-win64"
47+
48+
- name: Install Lazarus 4.8 (macOS)
49+
if: ${{ matrix.operating-system == 'macos-15' }}
50+
run: |
51+
wget -q "https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/Lazarus%204.8/fpc-3.2.4rc1a.intelarm64-macosx.dmg" -O "$RUNNER_TEMP/fpc.dmg"
52+
wget -q "https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20aarch64/Lazarus%204.8/lazarus-darwin-aarch64-4.8.zip" -O "$RUNNER_TEMP/lazarus.zip"
53+
sudo hdiutil attach "$RUNNER_TEMP/fpc.dmg"
54+
FPC_VOL=$(ls -d /Volumes/fpc* | head -1)
55+
FPC_PKG=$(find "$FPC_VOL" -maxdepth 1 -name "*.pkg" | head -1)
56+
sudo installer -package "$FPC_PKG" -target /
57+
sudo hdiutil detach "$FPC_VOL"
58+
xattr -cr "$RUNNER_TEMP/lazarus.zip"
59+
unzip -q "$RUNNER_TEMP/lazarus.zip" -d "$RUNNER_TEMP"
60+
sed -i '' 's|"/Developer/lazarus/"|"'$RUNNER_TEMP'/lazarus/"|g' "$RUNNER_TEMP/lazarus/config/environmentoptions.xml" 2>/dev/null || true
61+
sudo ln -sf "$RUNNER_TEMP/lazarus/lazbuild" /usr/local/bin/lazbuild
62+
echo "$RUNNER_TEMP/lazarus" >> $GITHUB_PATH
4363
4464
- name: Install Lazarus 4.8 (Ubuntu)
4565
if: ${{ matrix.operating-system == 'ubuntu-latest' }}

0 commit comments

Comments
 (0)