Bump Lazarus to 3.8 #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# SPDX-FileCopyrightText: (c) 2024,2025 Robert Di Pardo | |
# SPDX-License-Identifier: GPL-3.0-or-later | |
# | |
# Permitted usage is detailed in the COPYING file. | |
# | |
name: Build | |
on: | |
push: | |
paths: | |
- 'src/**' | |
- '**/*.lpk' | |
- '.github/workflows/build.yml' | |
pull_request: | |
permissions: | |
contents: read | |
env: | |
LAZARUS_VERSION: '3.8' | |
ARTIFACT_NAME: fpgeanyplugindemo | |
jobs: | |
linux-make-all: | |
runs-on: ubuntu-latest | |
outputs: | |
docs-changed: ${{ steps.changes.outputs.paths }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Run fpdocs file filter | |
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
id: changes | |
with: | |
base: ${{ github.ref_name }} | |
filters: | | |
paths: | |
- 'docs/**' | |
- '.github/workflows/fpdocs.yml' | |
- name: Restore Lazarus packages | |
id: lazarus-deb-cache | |
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2 | |
with: | |
path: '/tmp/lazarus-src' | |
key: lazarus-${{ env.LAZARUS_VERSION }}-${{ runner.os }} | |
- name: Install Lazarus ${{ env.LAZARUS_VERSION }} | |
run: | | |
curl -sSL https://bitbucket.org/rdipardo/lazarus-orb/raw/alpha/src/scripts/install_lazarus.sh | bash | |
env: | |
# https://askubuntu.com/a/1421221 | |
NEEDRESTART_MODE: l | |
DEBIAN_FRONTEND: noninteractive | |
- name: Build Geany | |
run: bash ../.github/build_geany.sh | |
working-directory: geany | |
- name: Build package and sample plugin | |
run: make | |
- name: Upload ${{ env.ARTIFACT_NAME }}.so | |
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 | |
with: | |
name: ${{ env.ARTIFACT_NAME }}.so | |
path: example/bin/x86_64-linux/Release/${{ env.ARTIFACT_NAME }}.so | |
windows-lazbuild: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Restore Lazarus installer | |
id: lazarus-exe-cache | |
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2 | |
with: | |
path: 'C:\lazarus-src' | |
key: lazarus-${{ env.LAZARUS_VERSION }}-${{ runner.os }} | |
- name: Install Lazarus ${{ env.LAZARUS_VERSION }} | |
run: | | |
irm -Uri https://bitbucket.org/rdipardo/lazarus-orb/raw/alpha/src/scripts/install_windows_lazarus.ps1 | iex | |
- name: Install GTK | |
uses: msys2/setup-msys2@61f9e5e925871ba6c9e3e8da24ede83ea27fa91f # v2.27.0 | |
with: | |
location: 'C:\Users\Public' | |
msystem: mingw64 | |
install: mingw-w64-x86_64-gtk3 | |
- name: Configure GTK library path | |
shell: bash | |
run: | | |
sed -e "s/\({\$LibraryPath \).*$/\1'C:\/Users\/Public\/msys64\/mingw64\/lib'}/" -i example/fpgeanyplugindemo.lpr | |
- name: Build plugin | |
run: lazbuild --ws=gtk3 .\example\fpgeanyplugindemo.lpr | |
- name: Upload ${{ env.ARTIFACT_NAME }}.dll | |
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 | |
with: | |
name: ${{ env.ARTIFACT_NAME }}.dll | |
path: example/bin/x86_64-win64/Release/${{ env.ARTIFACT_NAME }}.dll | |
publish-docs: | |
needs: linux-make-all | |
if: ${{ needs.linux-make-all.outputs.docs-changed == 'true' }} | |
uses: rdipardo/fpgeanyplugin/.github/workflows/fpdocs.yml@main | |
with: | |
lazarus-version: '3.8' | |
permissions: | |
pages: write | |
id-token: write |