Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions .github/workflows/make.yml → .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,31 @@
name: Make

on:
push:
branches:
- "**"
pull_request:
branches:
- master
Comment on lines 5 to 7

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore push-triggered builds

The deleted make.yml also ran on push for every branch, but this replacement only runs for pull_request events targeting master. In this repo the active branch is main, so direct pushes to branches stop getting the Make build at all, and PRs targeting main are not covered by this workflow either. Please keep the push trigger or update the PR branch filter while moving the scripts.

Useful? React with 👍 / 👎.


concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 120
timeout-minutes: 12

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep enough time for fresh runner installs

The install paths in .github/workflows/make.ps1 and .github/workflows/make.sh still run on fresh GitHub-hosted runners before compiling; the Windows downloader alone allows up to 600 seconds, and the Linux path installs the full Lazarus package set. Reducing the job timeout from 120 to 12 minutes means a normal dependency install can consume almost the whole budget and the matrix leg can be killed before compilation starts, making CI flaky even when the build is healthy.

Useful? React with 👍 / 👎.

strategy:
matrix:
os:
- ubuntu-latest
- windows-latest

steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: true
submodules: recursive

- name: Build on Linux
if: runner.os == 'Linux'
if: runner.os != 'Windows'
shell: bash
run: bash -x make.sh build
run: bash -x '.github/workflows/make.sh' build

- name: Build on Windows
if: runner.os == 'Windows'
shell: powershell
run: pwsh -File make.ps1 build
run: pwsh -File '.github/workflows/make.ps1' build
22 changes: 5 additions & 17 deletions make.ps1 → .github/workflows/make.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ Function Install-Program {
& msiexec /passive /package $FilePath | Out-Host
}
'exe' {
& $FilePath /SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART | Out-Host
$arguments = @('/SP-', '/VERYSILENT', '/NORESTART', '/SUPPRESSMSGBOXES')
Start-Process -FilePath $FilePath -ArgumentList $arguments -Wait -NoNewWindow
}
}
Remove-Item $FilePath -Force
Expand All @@ -62,7 +63,7 @@ Function Install-Program {
Function Build-Project {
$VAR = @{
Cmd = 'lazbuild'
Url = 'https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%204.8/lazarus-4.8-fpc-3.2.2-win64.exe/download'
Url = 'https://download.lazarus-ide.org/Lazarus%20Windows%2064%20bits/Lazarus%204.8/lazarus-4.8-fpc-3.2.2-win64.exe'
Path = "C:\Lazarus"
}
Try {
Expand All @@ -80,21 +81,8 @@ Function Build-Project {
Throw "Failed to download Lazarus"
}
}
If ( Test-Path -Path 'use\components.txt' ) {
& git submodule update --recursive --init | Out-Host
& git submodule update --recursive --remote | Out-Host
Get-Content -Path 'use\components.txt' | ForEach-Object {
If ((-not (& lazbuild --verbose-pkgsearch $_ | Out-Null)) -and
(-not (& lazbuild --add-package $_ | Out-Null)) -and
(-not (Test-Path -Path 'use\components.txt'))) {
$OutFile = Request-File "https://packages.lazarus-ide.org/$($_).zip"
Expand-Archive -Path $OutFile -DestinationPath "use\$($_)" -Force
Remove-Item $OutFile
}
}
Get-ChildItem -Filter '*.lpk' -Recurse -File –Path 'use' | ForEach-Object {
& lazbuild --add-package-link $_ | Out-Host
}
Get-ChildItem -Filter '*.lpk' -Recurse -File –Path 'use' | ForEach-Object {
& lazbuild --add-package-link $_ | Out-Host
}
Get-ChildItem -Filter '*.lpi' -Recurse -File –Path 'src' | ForEach-Object {
& lazbuild --no-write-project --recursive --build-mode=release $_ | Out-Host
Expand Down
20 changes: 1 addition & 19 deletions make.sh → .github/workflows/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,7 @@ function priv_lazbuild
;;
esac
fi
if [[ -f 'use/components.txt' ]]; then
git submodule update --init --recursive
git submodule update --recursive --remote
while read -r; do
if [[ -n "${REPLY}" ]] &&
! (lazbuild --verbose-pkgsearch "${REPLY}") &&
! (lazbuild --add-package "${REPLY}") &&
! [[ -f "use/${REPLY}" ]]; then
declare -A VAR=(
[url]="https://packages.lazarus-ide.org/${REPLY}.zip"
[out]=$(mktemp)
)
wget --output-document "${VAR[out]}" "${VAR[url]}" >/dev/null
unzip -o "${VAR[out]}" -d "use/${REPLY}"
rm --verbose "${VAR[out]}"
fi
done < 'use/components.txt'
find 'use' -type 'f' -name '*.lpk' -exec lazbuild --add-package-link {} +
fi
find 'use' -type 'f' -name '*.lpk' -exec lazbuild --add-package-link {} +
find 'src' -type 'f' -name '*.lpi' \
-exec lazbuild --no-write-project --recursive --no-write-project --build-mode=release {} + 1>&2
)
Expand Down
Empty file removed use/components.txt
Empty file.