https://github.com/gcarreno/lazarus-with-github-actions
Testing grounds for the GitHub action setup-lazarus
https://github.com/gcarreno/lazarus-with-github-actions
fpc free-pascal freepascal github-actions githubactions lazarus pascal
Last synced: 7 months ago
JSON representation
Testing grounds for the GitHub action setup-lazarus
- Host: GitHub
- URL: https://github.com/gcarreno/lazarus-with-github-actions
- Owner: gcarreno
- License: mit
- Created: 2020-04-08T23:37:04.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-06T20:15:59.000Z (over 1 year ago)
- Last Synced: 2024-11-06T20:41:33.776Z (over 1 year ago)
- Topics: fpc, free-pascal, freepascal, github-actions, githubactions, lazarus, pascal
- Language: Pascal
- Homepage: https://github.com/gcarreno/setup-lazarus
- Size: 170 KB
- Stars: 20
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# lazarus-with-github-actions
[](https://github.com/gcarreno/lazarus-with-github-actions/actions)
Testing grounds for the GitHub action [setup-lazarus](https://github.com/gcarreno/setup-lazarus)
**Note**: For supported Lazarus versions and the associated FPC version consult the link above.

## VERY IMPORTANT NOTICE
> When build for the `Qt5` widgetset, the combination of `stable`/`v3.0` and `ubuntu-latest`/`ubuntu-22.04` is going to fail.
>
> This is why this example is failing when attempting the mentioned combination of widgetset, Lazarus version and Ubuntu version.
>
> This is due to the fact that `libqt5pas` is outdated and does not support the new code delivered by Lazarus 3.0.
>
> This is a problem related to the Ubuntu distribution's repositories and the version of `libqt5pas` they carry, used by the GitHub runners.
>
> According to the maintainer of said `libqt5pas`, in [this answer](https://forum.lazarus.freepascal.org/index.php/topic,65619.msg500216.html#msg500216), one solution is to have the workflow script download and install a newer version.
>
> The newer version can be obtained here: https://github.com/davidbannon/libqt5pas/releases
>
> Thank you for your patience, continued support and please accept my deepest apologies for this inconvenience.
## Example usage
```yaml
steps:
- uses: actions/checkout@v4
- uses: gcarreno/setup-lazarus@v3
with:
lazarus-version: "dist"
include-packages: "Synapse 40.1"
with-cache: true
- run: lazbuild YourTestProject.lpi
- run: YourTestProject
```
## Matrix example usage
```yaml
name: build
on:
pull_request:
push:
paths-ignore:
- "README.md"
branches:
- master
- releases/*
jobs:
build:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-18.04,ubuntu-latest]
lazarus-versions: [dist, stable, 2.0.12, 2.0.10]
steps:
- uses: actions/checkout@v4
- name: Install Lazarus
uses: gcarreno/setup-lazarus@v3
with:
lazarus-version: ${{ matrix.lazarus-versions }}
include-packages: "Synapse 40.1"
with-cache: true
- name: Build the Main Application (Windows)
if: ${{ matrix.operating-system == 'windows-latest' }}
run: lazbuild -B --bm=Release "src/lazaruswithgithubactions.lpi"
- name: Build the Main Application (Ubuntu)
if: ${{ matrix.operating-system == 'ubuntu-latest' }}
run: |
echo Building with GTK2
lazbuild -B --bm=Release "src/lazaruswithgithubactions.lpi"
echo Installing Qt5 Dev
sudo apt update
sudo apt install libqt5pas-dev -y
echo Building with Qt5
lazbuild -B --bm=Release --ws=qt5 "src/lazaruswithgithubactions.lpi"
- name: Build the Main Application (macOS)
if: ${{ matrix.operating-system == 'macos-latest' }}
run: lazbuild -B --bm=Release --ws=cocoa "src/lazaruswithgithubactions.lpi"
- name: Build the Unit Tests Application
run: lazbuild -B --bm=Release "tests/testconsoleapplication.lpi"
- name: Run the Unit Tests Application
run: bin/testconsoleapplication "--all" "--format=plain"
```