|
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). |
2 | 3 |
|
3 | | -on: |
4 | | - pull_request: |
5 | | - push: |
6 | | - paths-ignore: |
7 | | - - "README.md" |
| 4 | +name: Test |
| 5 | + |
| 6 | +on: push |
8 | 7 |
|
9 | 8 | 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 |
12 | 15 | strategy: |
| 16 | + fail-fast: false |
13 | 17 | 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 | + |
16 | 27 | steps: |
17 | 28 | - 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 |
18 | 35 | - 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 |
22 | 47 | - 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" |
24 | 50 | - 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" |
26 | 53 | - 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 |
33 | 54 | 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