Skip to content

Commit 1afb72d

Browse files
authored
fix windows build pipeline
1 parent 270d31e commit 1afb72d

File tree

1 file changed

+40
-30
lines changed

1 file changed

+40
-30
lines changed

.github/workflows/make.yml

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
---
21
name: Make
32

43
on:
54
schedule:
6-
- cron: '0 0 1 * *'
5+
- cron: '0 0 1 * *'
76
push:
87
branches:
98
- "**"
@@ -25,32 +24,43 @@ jobs:
2524
os:
2625
- ubuntu-latest
2726
- windows-latest
27+
2828
steps:
29-
- name: Checkout
30-
uses: actions/checkout@v4
31-
with:
32-
submodules: true
33-
34-
- name: Build on Linux
35-
if: runner.os == 'Linux'
36-
shell: bash
37-
run: |
38-
set -xeuo pipefail
39-
sudo bash -c 'apt-get update; apt-get install -y lazarus' >/dev/null
40-
instantfpc -Fu/usr/lib/lazarus/*/components/lazutils .github/workflows/make.pas
41-
42-
- name: Build on Windows
43-
if: runner.os == 'Windows'
44-
shell: powershell
45-
run: |
46-
New-Variable -Option Constant -Name VAR -Value @{
47-
Uri = 'https://icolo.dl.sourceforge.net/project/lazarus/Lazarus%20Windows%2064%20bits/Lazarus%204.0/lazarus-4.0-fpc-3.2.2-win64.exe?viasf=1'
48-
OutFile = (New-TemporaryFile).FullName + '.exe'
49-
}
50-
Invoke-WebRequest @VAR
51-
& $VAR.OutFile.Replace('Temp', 'Temp\.') /SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART | Out-Null
52-
$Env:PATH+=';C:\Lazarus'
53-
$Env:PATH+=';C:\Lazarus\fpc\3.2.2\bin\x86_64-win64'
54-
(Get-Command 'lazbuild').Source | Out-Host
55-
(Get-Command 'instantfpc').Source | Out-Host
56-
instantfpc '-FuC:\Lazarus\components\lazutils' .github/workflows/make.pas
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
with:
32+
submodules: true
33+
34+
- name: Build on Linux
35+
if: runner.os == 'Linux'
36+
shell: bash
37+
run: |
38+
set -xeuo pipefail
39+
sudo bash -c 'apt-get update; apt-get install -y lazarus' >/dev/null
40+
instantfpc -Fu/usr/lib/lazarus/*/components/lazutils .github/workflows/make.pas
41+
42+
- name: Build on Windows
43+
if: runner.os == 'Windows'
44+
shell: powershell
45+
run: |
46+
$ErrorActionPreference = 'stop'
47+
Set-PSDebug -Strict
48+
49+
Write-Host "Installing Lazarus and OpenSSL 1.1 via Chocolatey..."
50+
choco upgrade chocolatey -y
51+
choco install lazarus -y
52+
choco install openssl.light --version=1.1.1.20181020 -y
53+
54+
Write-Host "Verifying installed packages..."
55+
choco list
56+
57+
# Lazarus installs to C:\Lazarus by default
58+
# Add Lazarus and OpenSSL paths for instantfpc
59+
$env:Path += ';C:\Lazarus;C:\Lazarus\fpc\3.2.2\bin\x86_64-win64;C:\ProgramData\chocolatey\lib\openssl.light\tools'
60+
61+
Write-Host "Checking lazbuild and instantfpc availability..."
62+
Get-Command lazbuild
63+
Get-Command instantfpc
64+
65+
Write-Host "Building make.pas..."
66+
instantfpc '-FuC:\Lazarus\components\lazutils' .github/workflows/make.pas

0 commit comments

Comments
 (0)