Skip to content

Commit c9d05e8

Browse files
committed
ci: Adding support for QT6 CI/CD
1 parent d3fa0af commit c9d05e8

File tree

3 files changed

+69
-19
lines changed

3 files changed

+69
-19
lines changed

.github/workflows/lazarus.yaml

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,24 +53,37 @@ jobs:
5353
name: ${{ matrix.operating-system }}-GTK
5454
path: out/gtk2/heidisql
5555

56-
- name: Getting libqt5pas-dev
56+
- name: Getting libqt5pas-dev, libqt6pas-dev
5757
run: |
5858
sudo apt update
59-
sudo apt install -y libqt5pas-dev
59+
sudo apt install -y libqt5pas-dev libqt6pas-dev
6060
61-
- name: Build HeidiSQL (Ubuntu QT)
61+
- name: Build HeidiSQL (Ubuntu QT5)
6262
if: ${{ matrix.operating-system == 'ubuntu-latest' }}
6363
run: |
6464
echo Building with QT5
6565
make build-qt5
6666
67-
- name: Upload binaries QT
67+
- name: Upload binaries QT5
6868
if: ${{ matrix.lazarus-versions == 'stable' }}
6969
uses: actions/upload-artifact@v4
7070
with:
71-
name: ${{ matrix.operating-system }}-QT
71+
name: ${{ matrix.operating-system }}-QT5
7272
path: out/qt5/heidisql
7373

74+
- name: Build HeidiSQL (Ubuntu QT6)
75+
if: ${{ matrix.operating-system == 'ubuntu-latest' }}
76+
run: |
77+
echo Building with QT6
78+
make build-qt6
79+
80+
- name: Upload binaries QT6
81+
if: ${{ matrix.lazarus-versions == 'stable' }}
82+
uses: actions/upload-artifact@v4
83+
with:
84+
name: ${{ matrix.operating-system }}-QT6
85+
path: out/qt6/heidisql
86+
7487
release:
7588
if: contains(github.ref_type, 'tag')
7689
env:
@@ -95,16 +108,23 @@ jobs:
95108
name: ubuntu-latest-GTK
96109
path: out/gtk2
97110

98-
- name: Download Ubuntu QT
111+
- name: Download Ubuntu QT5
99112
uses: actions/download-artifact@v4
100113
with:
101-
name: ubuntu-latest-QT
114+
name: ubuntu-latest-QT5
102115
path: out/qt5
103116

117+
- name: Download Ubuntu QT6
118+
uses: actions/download-artifact@v4
119+
with:
120+
name: ubuntu-latest-QT6
121+
path: out/qt6
122+
104123
- name: List files
105124
run: |
106125
ls -alF out/gtk2
107126
ls -alF out/qt5
127+
ls -alF out/qt6
108128
109129
- name: Install gettext
110130
run: sudo apt install -y gettext
@@ -118,9 +138,12 @@ jobs:
118138
- name: Create debian package
119139
run: make deb-package
120140

121-
- name: Create release archives (Linux QT)
141+
- name: Create release archives (Linux QT5)
122142
run: make tar-qt5
123143

144+
- name: Create release archives (Linux QT6)
145+
run: make tar-qt6
146+
124147
- name: Generate Release Notes
125148
id: git-cliff
126149
uses: orhun/git-cliff-action@v4

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010
/out/heidisql.exe
1111
/out/gtk2
1212
/out/qt5
13+
/out/qt6
1314
/out/locale
1415
/extra/locale/*/LC_MESSAGES
15-
# Secrets, DO NOT COMMIT
16-
/secrets.mk
1716

1817
## Uncomment these types if you want even more clean repository. But be careful.
1918
## It can make harm to an existing project source. Read explanations below.

Makefile

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
LAZBUILD := $(shell command -v lazbuild)
22
OPTS := -B --bm=Release
3-
OPTSQT := --ws=qt5
3+
OPTSQT5 := --ws=qt5
4+
OPTSQT6 := --ws=qt6
45
LPI := heidisql.lpi
56

67
BIN := ./out/heidisql
78
BINGTK := ./out/gtk2/heidisql
8-
BINQT := ./out/qt5/heidisql
9+
BINQT5 := ./out/qt5/heidisql
10+
BINQT6 := ./out/qt6/heidisql
911

1012
# Make shell magic to get version from somewhere
1113
#VERSION := shell magic
@@ -21,14 +23,14 @@ endif
2123

2224
VERSION := $(shell echo $(tag) | sed "s/v//")
2325

24-
.PHONY: all clean tx-pull copy-locale build-mo build-gtk2 run-gtk2 build-qt5 run-qt5 deb-package tar-gtk2 tar-qt5
26+
.PHONY: all clean tx-pull copy-locale build-mo build-gtk2 run-gtk2 build-qt5 run-qt5 build-qt6 run-qt6 deb-package tar-gtk2 tar-qt5 tar-qt6
2527

26-
all: clean build-gtk2 build-qt5 deb-package tar-gtk2 tar-qt5
28+
all: clean build-gtk2 build-qt5 build-qt6 deb-package tar-gtk2 tar-qt5 tar-qt6
2729

2830
clean:
2931
@echo "=== Cleaning"
3032
@rm -rf ./bin/lib/x86_64-linux/*
31-
@rm -f ./out/gtk2/* ./out/qt5/*
33+
@rm -f ./out/gtk2/* ./out/qt5/* ./out/qt6/*
3234
@rm -rf ./deb ./rpm ./tar ./dist
3335

3436
copy-locale:
@@ -52,16 +54,30 @@ run-gtk2: build-gtk2
5254

5355
build-qt5:
5456
@echo "=== Building QT5"
55-
$(LAZBUILD) $(OPTS) $(OPTSQT) $(LPI)
57+
$(LAZBUILD) $(OPTS) $(OPTSQT5) $(LPI)
5658
@mkdir -p ./out/qt5
57-
@mv -v $(BIN) $(BINQT)
59+
@mv -v $(BIN) $(BINQT5)
5860

5961
run-qt5: build-qt5
60-
@echo "=== Running GTK2"
62+
@echo "=== Running QT5"
63+
@mkdir -p ./run/locale
64+
@cp -vf ./extra/locale/*.mo ./run/locale
65+
@cp -vf ./extra/ini/*.ini ./run
66+
@cp -v $(BINQT5) ./run/heidisql
67+
@./run/heidisql
68+
69+
build-qt6:
70+
@echo "=== Building QT6"
71+
$(LAZBUILD) $(OPTS) $(OPTSQT6) $(LPI)
72+
@mkdir -p ./out/qt6
73+
@mv -v $(BIN) $(BINQT6)
74+
75+
run-qt6: build-qt6
76+
@echo "=== Running QT6"
6177
@mkdir -p ./run/locale
6278
@cp -vf ./extra/locale/*.mo ./run/locale
6379
@cp -vf ./extra/ini/*.ini ./run
64-
@cp -v $(BINQT) ./run/heidisql
80+
@cp -v $(BINQT6) ./run/heidisql
6581
@./run/heidisql
6682

6783
deb-package:
@@ -109,3 +125,15 @@ tar-qt5:
109125
cp -v out/qt5/heidisql tar
110126
chmod +x tar/heidisql
111127
cd tar && tar -zcvf ../dist/build-qt5-$(tag).tgz *
128+
129+
tar-qt6:
130+
@echo "=== Creating QT6 archive"
131+
rm -vrf tar
132+
mkdir -p tar/locale dist
133+
cp -v README.md LICENSE tar
134+
cp -v res/deb-package-icon.png tar/heidisql.png
135+
cp -v extra/locale/*.mo tar/locale
136+
cp -v extra/ini/*.ini tar
137+
cp -v out/qt6/heidisql tar
138+
chmod +x tar/heidisql
139+
cd tar && tar -zcvf ../dist/build-qt6-$(tag).tgz *

0 commit comments

Comments
 (0)