-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (94 loc) · 3.7 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
108
109
110
111
112
113
114
115
116
117
name: build
on:
push:
branches: [ main ]
tags: [ "*" ]
paths-ignore: [ "README.md", "cliff.toml", "CHANGELOG.md" ]
pull_request:
branches: [ main ]
jobs:
build:
name: Build and/or Test
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ ubuntu-latest, windows-latest, macos-latest ]
lazarus-versions: [ stable, 2.2.0, 2.0.12 ]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: false
- name: Install Lazarus
uses: gcarreno/setup-lazarus@v3
with:
lazarus-version: ${{ matrix.lazarus-versions }}
with-cache: false
- name: Build Example App
run: lazbuild -B --bm=Release "examples/CLI/polykermacli.lpi"
# - name: Build Test App
# run: lazbuild -B --bem=Release "tests/polykermatests.lpi"
# - name: Run Tests
# run: bin/polykermatests --all --format=plain
# - name: Build the Main App (Windows)
# if: ${{ matrix.operating-system == 'windows-latest' }}
# run: lazbuild -B --bm=Release "src/testrestartapplication.lpi"
# - name: Build the Main App GTK2 (Ubuntu)
# if: ${{ matrix.operating-system == 'ubuntu-latest' }}
# run: |
# lazbuild -B --bm=Release "src/testrestartapplication.lpi"
# mv bin/testrestartapplication bin/testrestartapplication-gtk2
# - name: Build the Main App Qt5 (Ubuntu)
# if: ${{ matrix.operating-system == 'ubuntu-latest' }}
# run: |
# sudo apt update
# sudo apt install libqt5pas-dev -y
# lazbuild -B --bm=Release --ws=qt5 "src/testrestartapplication.lpi"
# mv bin/testrestartapplication bin/testrestartapplication-qt5
# - name: Build the Main App (macOS)
# if: ${{ matrix.operating-system == 'macos-latest' }}
# run: lazbuild -B --bm=Release --ws=cocoa "src/testrestartapplication.lpi"
# - name: Upload binary (Windows)
# if: ${{ (matrix.operating-system == 'windows-latest') && (matrix.lazarus-versions == 'stable') }}
# uses: actions/upload-artifact@v3
# with:
# name: testrestartapplication
# path: bin/testrestartapplication.exe
# - name: Upload binary (Ubuntu)
# if: ${{ (matrix.operating-system == 'ubuntu-latest') && (matrix.lazarus-versions == 'stable') }}
# uses: actions/upload-artifact@v3
# with:
# name: testrestartapplication
# path: bin/testrestartapplication-*
package-release:
if: contains(github.ref, '/tags/')
name: Package and create GitHub Release
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set output
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
# - name: Download the Release binary
# uses: actions/download-artifact@v3
# - name: List files
# run: ls -alF testrestartapplication
# - name: Create release files
# run: |
# cd testrestartapplication
# chmod +x testrestartapplication-*
# zip -r testrestartapplication-${{ steps.vars.outputs.tag }}-x86_64-win64.zip testrestartapplication.exe
# tar -zcvf testrestartapplication-GTK2-${{ steps.vars.outputs.tag }}-x86_64-linux.tar.gz testrestartapplication-gtk2
# tar -zcvf testrestartapplication-Qt5-${{ steps.vars.outputs.tag }}-x86_64-linux.tar.gz testrestartapplication-qt5
# - name: Create GitHub release
# uses: softprops/action-gh-release@v1
# with:
# name: TestRestartApplication ${{ steps.vars.outputs.tag }}
# body_path: release-notes.md
# files: |
# testrestartapplication/*.tar.gz
# testrestartapplication/*.zip
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}