From 463fc62b74a2c2b9db9fcb38e0348f4d43186f95 Mon Sep 17 00:00:00 2001 From: Giacomo Caironi <giacomo.caironi@skywarder.eu> Date: Sat, 26 Nov 2022 20:50:21 +0100 Subject: [PATCH] Update CI --- .gitlab-ci.yml | 62 ++++++++++--------- .vscode/c_cpp_properties.json | 2 +- sbs | 2 +- .../Modules/Mavlink/MavlinkVersionHeader.h | 2 +- 4 files changed, 35 insertions(+), 33 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6a59a0cf..59a6a090 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,60 +23,62 @@ variables: GIT_SUBMODULE_STRATEGY: recursive stages: - - build - lint - - release - -# Stage build + - build + # - release -build: - stage: build - tags: +default: + tags: - qt - script: - - ./sbs # Stage lint cppcheck: stage: lint - tags: - - miosix script: - ./scripts/linter.py --cppcheck src format: stage: lint - tags: - - miosix script: - ./scripts/linter.py --format src find: stage: lint - tags: - - miosix script: - ./scripts/linter.py --find src -# Stage release +# Stage build -release: - stage: release - only: - - main - tags: - - qt +build_linux: + stage: build script: + - ./sbs --clean - ./sbs - - cp build/groundstation linuxdeploy/ - - cd linuxdeploy - - /opt/5.15.2/gcc_64/bin/linuxdeployqt groundstation -qmake=/opt/5.15.2/gcc_64/bin/qmake -appimage + - cd build + - QMAKE=/opt/qt/5.15.2/gcc_64/bin/qmake linuxdeploy --plugin qt -e groundstation -d ../linuxdeploy/groundstation.desktop -i ../linuxdeploy/SkywardLogo.png --appdir AppDir + - appimagetool AppDir + - mv Ground_Station-x86_64.AppImage ../Ground_Station-$CI_COMMIT_SHORT_SHA-x86_64.AppImage artifacts: name: Linux AppImage paths: - - linuxdeploy/Ground_Station-${CI_COMMIT_SHORT_SHA::-1}-x86_64.AppImage - release: - tag_name: latest-$CI_COMMIT_SHORT_SHA - name: Continuous build - description: Latest build + - Ground_Station-$CI_COMMIT_SHORT_SHA-x86_64.AppImage + +build_windows: + stage: build + before_script: + - export PATH=/home/gitlab-runner/mxe/usr/bin:$PATH + script: + - ./sbs --clean + - x86_64-w64-mingw32.static-qmake-qt5 + - make + - mv release/SkywardHub.exe Ground_Station-$CI_COMMIT_SHORT_SHA.exe + artifacts: + name: Windows executable + paths: + - Ground_Station-$CI_COMMIT_SHORT_SHA.exe + + # release: + # tag_name: latest-$CI_COMMIT_SHORT_SHA + # name: Continuous build + # description: Latest build diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index ba6a4c32..2a435413 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -5,7 +5,7 @@ "includePath": [ "${workspaceFolder}/src/shared", "${workspaceFolder}/libs/mavlink-skyward-lib", - "/opt/5.15.2/gcc_64/include" + "/opt/qt/5.15.2/gcc_64/include" ], "defines": [], "cStandard": "gnu17", diff --git a/sbs b/sbs index 85483b9b..29a15915 100755 --- a/sbs +++ b/sbs @@ -315,7 +315,7 @@ EOF } CMAKE_FILENAME="CMakeCache.txt" -CMAKE_PREFIX_PATH="/opt/5.15.2/gcc_64/lib/cmake/" +CMAKE_PREFIX_PATH="/opt/qt/5.15.2/gcc_64/lib/cmake/" DEBUG_FILENAME=".sbsdebug" VERBOSE_FILENAME=".sbsverbose" BUILD_DIRNAME="build" diff --git a/src/shared/Modules/Mavlink/MavlinkVersionHeader.h b/src/shared/Modules/Mavlink/MavlinkVersionHeader.h index ed377628..c8f53eb8 100644 --- a/src/shared/Modules/Mavlink/MavlinkVersionHeader.h +++ b/src/shared/Modules/Mavlink/MavlinkVersionHeader.h @@ -20,7 +20,7 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcast-align" -#if __GNUC_PREREQ(9, 0) +#if __GNUC__ >= 9 #pragma GCC diagnostic ignored "-Waddress-of-packed-member" #endif #include <mavlink_lib/pyxis/mavlink.h> -- GitLab