Skip to content

Commit e02904b

Browse files
Add travis CI from embedded ide (testing)
Signed-off-by: Martin Alejandro Ribelotta <[email protected]>
1 parent c5d02b5 commit e02904b

12 files changed

+388
-10
lines changed

.travis.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
language: cpp
2+
sudo: required
3+
dist: trusty
4+
5+
os: linux
6+
7+
env:
8+
global:
9+
- DISPLAY=:99
10+
- MXE_TRIPLE=i686-w64-mingw32.shared
11+
12+
before_install:
13+
- chmod a+x ./ci/tests-environment.sh
14+
- ./ci/tests-environment.sh
15+
16+
script:
17+
- chmod a+x ./ci/tests-ci.sh
18+
- ./ci/tests-ci.sh
19+
20+
after_success:
21+
- wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
22+
# quick fix for issue 223
23+
- if [ "$TRAVIS_TAG" != "$TRAVIS_BRANCH" ] && [ "$TRAVIS_BRANCH" != "master" ]; then export TRAVIS_EVENT_TYPE=pull_request; fi
24+
- bash ./upload.sh ./gdbfront-*.AppImage ./gdbfront-*.zip ./gdbfront-*.tar.bz2
25+
26+
branches:
27+
except:
28+
- # Do not build tags that we create when we upload to GitHub Releases
29+
- /^(?i:continuous)$/

ci/BuildQSCI.mk

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
BASE=/tmp/qsci
2+
QSCI_VER=2.11.1
3+
SOURCE_URL=https://www.riverbankcomputing.com/static/Downloads/QScintilla/${QSCI_VER}/QScintilla_gpl-$(QSCI_VER).tar.gz
4+
SOURCE_TARGZ=$(notdir $(SOURCE_URL))
5+
SOURCE_DIR=$(BASE)/QScintilla_gpl-$(QSCI_VER)
6+
BUILD_DIR=$(SOURCE_DIR)/Qt4Qt5
7+
BINARY_BUILD=$(BUILD_DIR)/libqscintilla2_qt5.so
8+
9+
all: $(BINARY_BUILD)
10+
11+
$(SOURCE_TARGZ):
12+
cd $(BASE)
13+
wget $(SOURCE_URL) -O $@
14+
15+
$(SOURCE_DIR): $(SOURCE_TARGZ)
16+
cd $(BASE)
17+
tar xf $<
18+
19+
$(BINARY_BUILD): $(SOURCE_DIR)
20+
mkdir -p $(BUILD_DIR) && \
21+
cd $(BUILD_DIR) && \
22+
qmake && \
23+
make -j4 && \
24+
sudo make install

ci/extract-qt-installer

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/sh
2+
3+
set -x
4+
set -e
5+
6+
PKG=$(cat ci/qt5124-linux-packages)
7+
8+
mkdir -p /opt/qt/
9+
(cd /opt/qt &&
10+
wget ${PKG} &&
11+
for f in *; do 7z x $f > /dev/null; done &&
12+
cat <<EOF > 5.12.4/gcc_64/bin/qt.conf
13+
[Paths]
14+
Prefix=..
15+
EOF
16+
sed -i -r 's/QT_EDITION = Enterprise/QT_EDITION = OpenSource/' 5.12.4/gcc_64/mkspecs/qconfig.pri
17+
sed -i -r 's/QT_LICHECK = lichec.*/QT_LICHECK = /' 5.12.4/gcc_64/mkspecs/qconfig.pri
18+
)

ci/qt-installer-silent.js

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
/*
2+
* Qt Installer script for a non-interactive installation of Qt5 on Windows.
3+
* Installs the 64-bit package if environment variable PLATFORM="x64".
4+
*/
5+
6+
// jshint strict:false
7+
/* globals QInstaller, QMessageBox, buttons, gui, installer, console */
8+
9+
// Run with:
10+
// .\qt-unified-windows-x86-3.0.4-online.exe --verbose --script tools\qt-installer-windows.qs
11+
12+
// Look for Name elements in
13+
// https://download.qt.io/online/qtsdkrepository/windows_x86/desktop/qt5_5120/Updates.xml
14+
// Unfortunately it is not possible to disable deps like qt.tools.qtcreator
15+
var INSTALL_COMPONENTS = [
16+
"qt.qt5.5124.gcc_64"
17+
];
18+
19+
function Controller() {
20+
// Continue on installing to an existing (possibly empty) directory.
21+
installer.setMessageBoxAutomaticAnswer("OverwriteTargetDirectory", QMessageBox.Yes);
22+
// Continue at "SHOW FINISHED PAGE"
23+
installer.installationFinished.connect(function() {
24+
console.log("installationFinished");
25+
gui.clickButton(buttons.NextButton);
26+
});
27+
}
28+
29+
Controller.prototype.WelcomePageCallback = function() {
30+
console.log("Step: " + gui.currentPageWidget());
31+
// At least for 3.0.4 immediately clicking Next fails, so wait a bit.
32+
// https://github.com/benlau/qtci/commit/85cb986b66af4807a928c70e13d82d00dc26ebf0
33+
gui.clickButton(buttons.NextButton, 1000);
34+
};
35+
36+
Controller.prototype.CredentialsPageCallback = function() {
37+
console.log("Step: " + gui.currentPageWidget());
38+
gui.clickButton(buttons.NextButton);
39+
};
40+
41+
Controller.prototype.IntroductionPageCallback = function() {
42+
console.log("Step: " + gui.currentPageWidget());
43+
gui.clickButton(buttons.NextButton);
44+
};
45+
46+
Controller.prototype.TargetDirectoryPageCallback = function() {
47+
console.log("Step: " + gui.currentPageWidget());
48+
// Keep default at "C:\Qt".
49+
//gui.currentPageWidget().TargetDirectoryLineEdit.setText("E:\\Qt");
50+
gui.clickButton(buttons.NextButton);
51+
};
52+
53+
Controller.prototype.ComponentSelectionPageCallback = function() {
54+
console.log("Step: " + gui.currentPageWidget());
55+
var page = gui.currentPageWidget();
56+
page.deselectAll();
57+
for (var i = 0; i < INSTALL_COMPONENTS.length; i++) {
58+
page.selectComponent(INSTALL_COMPONENTS[i]);
59+
}
60+
gui.clickButton(buttons.NextButton);
61+
};
62+
63+
Controller.prototype.LicenseAgreementPageCallback = function() {
64+
console.log("Step: " + gui.currentPageWidget());
65+
gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true);
66+
gui.clickButton(buttons.NextButton);
67+
};
68+
69+
Controller.prototype.StartMenuDirectoryPageCallback = function() {
70+
console.log("Step: " + gui.currentPageWidget());
71+
gui.clickButton(buttons.NextButton);
72+
};
73+
74+
Controller.prototype.ReadyForInstallationPageCallback = function() {
75+
console.log("Step: " + gui.currentPageWidget());
76+
gui.clickButton(buttons.NextButton);
77+
};
78+
79+
Controller.prototype.FinishedPageCallback = function() {
80+
console.log("Step: " + gui.currentPageWidget());
81+
// TODO somehow the installer crashes after this step.
82+
// https://stackoverflow.com/questions/25105269/silent-install-qt-run-installer-on-ubuntu-server
83+
var checkBoxForm = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm;
84+
if (checkBoxForm && checkBoxForm.launchQtCreatorCheckBox) {
85+
checkBoxForm.launchQtCreatorCheckBox.checked = false;
86+
}
87+
gui.clickButton(buttons.FinishButton);
88+
};
89+
90+
// vim: set ft=javascript:

ci/qt5124-linux-packages

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_5124/qt.qt5.5124.gcc_64/5.12.4-0-201906140147qtbase-Linux-RHEL_7_4-GCC-Linux-RHEL_7_4-X86_64.7z
2+
http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_5124/qt.qt5.5124.gcc_64/5.12.4-0-201906140147qtx11extras-Linux-RHEL_7_4-GCC-Linux-RHEL_7_4-X86_64.7z
3+
http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_5124/qt.qt5.5124.gcc_64/5.12.4-0-201906140147qtwebchannel-Linux-RHEL_7_4-GCC-Linux-RHEL_7_4-X86_64.7z
4+
http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_5124/qt.qt5.5124.gcc_64/5.12.4-0-201906140147qtmultimedia-Linux-RHEL_7_4-GCC-Linux-RHEL_7_4-X86_64.7z
5+
http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_5124/qt.qt5.5124.gcc_64/5.12.4-0-201906140147qttranslations-Linux-RHEL_7_4-GCC-Linux-RHEL_7_4-X86_64.7z
6+
http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_5124/qt.qt5.5124.gcc_64/5.12.4-0-201906140147qtgraphicaleffects-Linux-RHEL_7_4-GCC-Linux-RHEL_7_4-X86_64.7z
7+
http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_5124/qt.qt5.5124.gcc_64/5.12.4-0-201906140147qtsvg-Linux-RHEL_7_4-GCC-Linux-RHEL_7_4-X86_64.7z
8+
http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_5124/qt.qt5.5124.gcc_64/5.12.4-0-201906140147qtdeclarative-Linux-RHEL_7_4-GCC-Linux-RHEL_7_4-X86_64.7z
9+
http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_5124/qt.qt5.5124.gcc_64/5.12.4-0-201906140147qtimageformats-Linux-RHEL_7_4-GCC-Linux-RHEL_7_4-X86_64.7z
10+
http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_5124/qt.qt5.5124.gcc_64/5.12.4-0-201906140147qttools-Linux-RHEL_7_4-GCC-Linux-RHEL_7_4-X86_64.7z
11+
http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_5124/qt.qt5.5124.gcc_64/5.12.4-0-201906140147qtxmlpatterns-Linux-RHEL_7_4-GCC-Linux-RHEL_7_4-X86_64.7z
12+
http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_5124/qt.qt5.5124.gcc_64/5.12.4-0-201906140147qtserialport-Linux-RHEL_7_4-GCC-Linux-RHEL_7_4-X86_64.7z
13+
http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_5124/qt.qt5.5124.gcc_64/5.12.4-0-201906140147qtquickcontrols-Linux-RHEL_7_4-GCC-Linux-RHEL_7_4-X86_64.7z
14+
http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_5124/qt.qt5.5124.gcc_64/5.12.4-0-201906140147qtquickcontrols2-Linux-RHEL_7_4-GCC-Linux-RHEL_7_4-X86_64.7z
15+
http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_5124/qt.qt5.5124.gcc_64/5.12.4-0-201906140147qtserialbus-Linux-RHEL_7_4-GCC-Linux-RHEL_7_4-X86_64.7z
16+
http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_5124/qt.qt5.5124.gcc_64/5.12.4-0-201906140147qtscxml-Linux-RHEL_7_4-GCC-Linux-RHEL_7_4-X86_64.7z
17+
http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_5124/qt.qt5.5124.gcc_64/5.12.4-0-201906140147icu-linux-Rhel7.2-x64.7z

ci/tests-ci.sh

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/bash
2+
3+
set -x
4+
5+
export QTDIR=$(readlink -f /opt/qt*/)
6+
PATH=${QTDIR}/bin:${PATH}
7+
8+
set -e
9+
10+
qmake --version
11+
12+
VERSION=$(git rev-parse --short HEAD)
13+
14+
INSTALL_DIR=/tmp/gdbfront
15+
DEPLOY_OPT="-no-translations -verbose=2 -executable=$INSTALL_DIR/usr/bin/gdbfront"
16+
DESKTOP_FILE=$INSTALL_DIR/usr/share/applications/gdbfront.desktop
17+
18+
echo ************** LINUX BUILD ***********************
19+
20+
qmake CONFIG+=release CONFIG+=force_debug_info gdbfront.pro
21+
make -j4
22+
make install INSTALL_ROOT=${INSTALL_DIR}
23+
24+
linuxdeployqt $DESKTOP_FILE $DEPLOY_OPT -appimage
25+
(
26+
APPIMAGE_DIR=${PWD}
27+
APPIMAGE=${PWD}/gdbfront-${VERSION}-x86_64.AppImage
28+
cd /tmp
29+
chmod a+x ${APPIMAGE}
30+
${APPIMAGE} --appimage-extract
31+
mv squashfs-root gdbfront-${VERSION}-x86_64
32+
tar -jcvf ${APPIMAGE_DIR}/gdbfront-${VERSION}-x86_64.tar.bz2 gdbfront-${VERSION}-x86_64
33+
)
34+
echo ************** WINDOWS BUILD ***********************
35+
36+
make distclean
37+
MXE=/usr/lib/mxe/usr
38+
MXEQT=${MXE}/${MXE_TRIPLE}/qt5
39+
PATH=${MXE}/bin:${PATH}
40+
MXE_PKG=gdbfront-${VERSION}-win32
41+
${MXEQT}/bin/qmake CONFIG+=release CONFIG+=force_debug_info gdbfront.pro
42+
make -j4
43+
pydeployqt --objdump ${MXE_TRIPLE}-objdump ${PWD}/build/gdbfront.exe \
44+
--libs ${MXE}/${MXE_TRIPLE}/bin/:${MXEQT}/bin/:${MXEQT}/lib/ \
45+
--extradll Qt5Svg.dll:Qt5Qml.dll:libjpeg-9.dll \
46+
--qmake ${MXEQT}/bin/qmake
47+
mv build ${MXE_PKG}
48+
49+
zip -9 -r ${MXE_PKG}.zip ${MXE_PKG}

ci/tests-environment.sh

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/bin/bash
2+
3+
set -e
4+
set -x
5+
6+
sudo add-apt-repository --yes ppa:beineri/opt-qt593-trusty
7+
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
8+
echo "deb http://pkg.mxe.cc/repos/apt trusty main" | sudo tee /etc/apt/sources.list.d/mxeapt.list
9+
sudo apt-get update -qq --allow-unauthenticated
10+
11+
sudo fallocate -l 1G /swapfile
12+
sudo chmod 600 /swapfile
13+
sudo mkswap /swapfile
14+
sudo swapon /swapfile
15+
16+
sudo wget https://raw.githubusercontent.com/martinribelotta/pydeployqt/master/deploy.py -O /usr/bin/pydeployqt
17+
sudo chmod a+x /usr/bin/pydeployqt
18+
19+
MXE=mxe-${MXE_TRIPLE}
20+
sudo apt-get install -y --allow-unauthenticated -o Dpkg::Options::="--force-overwrite" \
21+
wget fuse gcc-8 g++-8 build-essential \
22+
qt59base qt59tools qt59svg qt59imageformats qt59x11extras libglu1-mesa-dev \
23+
${MXE}-gcc ${MXE}-g++ \
24+
${MXE}-qtbase ${MXE}-qtsvg ${MXE}-qscintilla2 ${MXE}-qttools
25+
export QTDIR=$(readlink -f /opt/qt*/)
26+
27+
#~ sudo apt-get install -y --allow-unauthenticated -o Dpkg::Options::="--force-overwrite" \
28+
#~ wget fuse gcc-8 g++-8 build-essential \
29+
#~ libglu1-mesa-dev libxkbcommon-dev libxkbcommon-x11-0 \
30+
#~ ${MXE}-gcc ${MXE}-g++ \
31+
#~ ${MXE}-qtbase ${MXE}-qtsvg ${MXE}-qscintilla2 ${MXE}-qttools
32+
33+
#~ sudo bash ci/extract-qt-installer
34+
#~ export QTDIR=$(readlink -f /opt/qt*/5.12.4/gcc_64)
35+
36+
gcc --version
37+
# sudo update-alternatives --remove-all gcc
38+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 90 --slave /usr/bin/g++ g++ /usr/bin/g++-8
39+
gcc --version
40+
41+
mkdir -p /tmp/qsci
42+
cp ./ci/BuildQSCI.mk /tmp/qsci
43+
cd /tmp/qsci
44+
export PATH=${QTDIR}/bin:${PATH}
45+
make -f BuildQSCI.mk
46+
47+
cd /tmp/
48+
wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
49+
sudo cp linuxdeployqt-continuous-x86_64.AppImage /usr/bin/linuxdeployqt
50+
sudo chmod a+x /usr/bin/linuxdeployqt
51+
cd -

gdbfront.desktop

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[Desktop Entry]
2+
Categories=Development;Debugger
3+
Comment[es_AR]=Frontend GDB simple
4+
Comment=Simple GDB frontend
5+
Exec=gdbfront
6+
GenericName[es_AR]=GdbFront
7+
GenericName=GdbFront
8+
Icon=gdbfront
9+
MimeType=
10+
Name[es_AR]=GdbFront
11+
Name=GdbFront
12+
Path=
13+
StartupNotify=true
14+
Terminal=false
15+
TerminalOptions=
16+
Type=Application
17+
X-DBUS-ServiceName=
18+
X-DBUS-StartupType=
19+
X-KDE-SubstituteUID=false
20+
X-KDE-Username=

qdbgtest.pro gdbfront.pro

+22-9
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,29 @@ FORMS += \
3434
dialogstartdebug.ui \
3535
widget.ui
3636

37-
# Default rules for deployment.
38-
qnx: target.path = /tmp/$${TARGET}/bin
39-
else: unix:!android: target.path = /opt/$${TARGET}/bin
40-
!isEmpty(target.path): INSTALLS += target
41-
42-
DISTFILES += \
43-
.gitignore
44-
4537
RESOURCES += \
4638
resources/images.qrc \
4739
resources/licences.qrc
4840

49-
STATECHARTS +=
41+
unix {
42+
QMAKE_LFLAGS_RELEASE += -static-libstdc++ -static-libgcc
43+
QMAKE_LFLAGS_DEBUG += -static-libstdc++ -static-libgcc
44+
isEmpty(PREFIX) {
45+
PREFIX = /usr
46+
}
47+
48+
target.path = $$PREFIX/bin
49+
50+
desktopfile.files = gdbfront.desktop
51+
desktopfile.path = $$PREFIX/share/applications
52+
53+
iconfiles.files = resources/images/gdbfront.svg resources/images/gdbfront.png
54+
iconfiles.path = $$PREFIX/share/icons/default/256x256/apps/
55+
56+
INSTALLS += desktopfile
57+
INSTALLS += iconfiles
58+
INSTALLS += target
59+
}
60+
61+
DISTFILES += \
62+
gdbfront.desktop

main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
int main(int argc, char *argv[])
1111
{
1212
QApplication a(argc, argv);
13-
QApplication::setApplicationName("gdbfrontend");
13+
QApplication::setApplicationName("gdbfront");
1414
QApplication::setApplicationVersion("0.1");
1515
QCommandLineParser parser;
1616
parser.setApplicationDescription("GDB Frontend");

resources/images/gdbfront.png

1.32 KB
Loading

0 commit comments

Comments
 (0)