Skip to content

Commit bbb536a

Browse files
use fpclazup to build tracker editor
1 parent cb99d9b commit bbb536a

File tree

1 file changed

+46
-24
lines changed

1 file changed

+46
-24
lines changed
Lines changed: 46 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,58 @@
1-
name: build-test
1+
# Tests building lazbuild using fplazup on Windows 32, Windows 64, Linux 64, MacOS 64 and AArch64 (cross compiled)
2+
# Builds FPC 3.2.0 & Lazarus trunk but reverts to a known revision that compiles (64045).
23

3-
on:
4-
pull_request:
5-
push:
6-
paths-ignore:
7-
- "README.md"
4+
name: Test
5+
6+
on: push
87

98
jobs:
10-
build:
11-
runs-on: ${{ matrix.operating-system }}
9+
test:
10+
name: ${{ matrix.config.name }}
11+
runs-on: ${{ matrix.config.os }}
12+
defaults:
13+
run:
14+
shell: bash
1215
strategy:
16+
fail-fast: false
1317
matrix:
14-
operating-system: [ubuntu-16.04,windows-latest]
15-
lazarus-versions: [1.8.2]
18+
config:
19+
- os: windows-latest
20+
name: 'Windows 32'
21+
fpcup-url: 'https://github.com/LongDirtyAnimAlf/Reiniero-fpcup/releases/download/1.8.2d/fpclazup-i386-win32.exe'
22+
fpcup-opt: '--lazrevision=64045'
23+
fpc-url: 'https://svn.freepascal.org/svn/fpc/tags/release_3_2_0'
24+
laz-url: 'trunk'
25+
26+
1627
steps:
1728
- uses: actions/checkout@v2
29+
30+
- name: Install Dependencies (Ubuntu)
31+
if: matrix.config.os == 'ubuntu-latest'
32+
run: |
33+
sudo apt-get update
34+
sudo apt-get -m -y install libgtk2.0-dev libpango1.0-dev
1835
- name: Install Lazarus
19-
uses: gerryferdinandus/[email protected]
20-
with:
21-
lazarus-version: ${{ matrix.lazarus-versions }}
36+
run: |
37+
curl --retry 5 -L -o fpcup ${{ matrix.config.fpcup-url }}
38+
chmod +x fpcup
39+
mkdir lazarus
40+
./fpcup --installdir=lazarus --fpcURL=${{ matrix.config.fpc-url }} --lazURL=${{ matrix.config.laz-url }} ${{ matrix.config.fpcup-opt }} --only=docker --noconfirm --verbose
41+
- name: Install AArch64 Cross Compiler
42+
if: matrix.config.name == 'AArch64'
43+
run: |
44+
curl --retry 5 -L -o libs.zip https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/crosslibs_v1.1/CrossLibsLinuxAarch64.zip && unzip -o libs.zip -d lazarus/
45+
curl --retry 5 -L -o bins.zip https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/linuxx64crossbins_v1.0/CrossBinsLinuxAarch64.zip && unzip -o bins.zip -d lazarus/cross/bin
46+
./fpcup --installdir=lazarus --ostarget=linux --cputarget=aarch64 --only="FPCCleanOnly,FPCBuildOnly" --crossbindir=lazarus/cross/bin --crosslibdir=lazarus/cross/lib/aarch64-linux --noconfirm --verbose
2247
- name: Build the Main Application
23-
run: lazbuild --build-mode=Release "source/project/tracker_editor/trackereditor.lpi"
48+
run: |
49+
./lazarus/lazarus/lazbuild --build-mode=Release "source/project/tracker_editor/trackereditor.lpi"
2450
- name: Build the Unit Tests Application
25-
run: lazbuild --build-mode=Debug "source/project/unit_test/tracker_editor_test.lpi"
51+
run: |
52+
./lazarus/lazarus/lazbuild --build-mode=Release "source/project/tracker_editor/trackereditor.lpi"
2653
- name: Run headless test
27-
uses: GabrielBB/xvfb-action@v1
28-
with:
29-
working-directory: ./ #optional
30-
run: enduser/test_trackereditor -a --format=plain
31-
- name: Clean up after test
32-
shell: bash
3354
run: |
34-
rm -f enduser/console_log.txt
35-
rm -f enduser/export_trackers.txt
36-
git reset --hard
55+
./enduser/test_trackereditor -a --format=plain
56+
57+
58+

0 commit comments

Comments
 (0)