-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (101 loc) · 3.58 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#
# 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.6'
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@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
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@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
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@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
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@d44ca8e88d8b43d56cf5670f91747359d5537f97 # v2.26.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@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
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.6'
permissions:
id-token: write