Skip to content
Snippets Groups Projects

Updates CI to new Docker setup and sends message on slack with binaries

Merged Alberto Nidasio requested to merge ci-update into main
Compare and
2 files
+ 55
43
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 26
14
@@ -26,11 +26,10 @@ variables:
@@ -26,11 +26,10 @@ variables:
stages:
stages:
- lint
- lint
- build
- build
# - release
- release
default:
default:
tags:
image: registry.skywarder.eu/avn/swd/docker/miosix:latest
- qt
# Stage lint
# Stage lint
@@ -53,11 +52,14 @@ find:
@@ -53,11 +52,14 @@ find:
build_linux:
build_linux:
stage: build
stage: build
 
image: registry.skywarder.eu/avn/swd/docker/qt/linux
 
before_script:
 
- QMAKE=/opt/qt/$QT_VERSION/gcc_64/bin/qmake
script:
script:
- ./sbs --clean
- cmake -Bbuild -DCMAKE_CXX_COMPILER_LAUNCHER=ccache .
- Qt5_DIR=/opt/qt/$QT_VERSION/gcc_64/lib/cmake/Qt5/ ./sbs
- cmake --build build -j 16
- cd build
- cd build
- QMAKE=/opt/qt/$QT_VERSION/gcc_64/bin/qmake linuxdeploy --plugin qt -e groundstation -d ../linuxdeploy/groundstation.desktop -i ../linuxdeploy/SkywardLogo.png --appdir AppDir
- linuxdeploy --plugin qt -e groundstation -d ../linuxdeploy/groundstation.desktop -i ../linuxdeploy/SkywardLogo.png --appdir AppDir
- appimagetool AppDir
- appimagetool AppDir
- mv Ground_Station-x86_64.AppImage ../Ground_Station-$CI_COMMIT_SHORT_SHA-x86_64.AppImage
- mv Ground_Station-x86_64.AppImage ../Ground_Station-$CI_COMMIT_SHORT_SHA-x86_64.AppImage
artifacts:
artifacts:
@@ -68,20 +70,30 @@ build_linux:
@@ -68,20 +70,30 @@ build_linux:
build_windows:
build_windows:
stage: build
stage: build
 
image: registry.skywarder.eu/avn/swd/docker/qt/windows
before_script:
before_script:
- export PATH=/home/gitlab-runner/mxe/usr/bin:$PATH
- export PATH=/home/gitlab-runner/mxe/usr/bin:$PATH
script:
script:
- ./sbs --clean
- x86_64-w64-mingw32.static-cmake -Bbuild -DCMAKE_CXX_COMPILER_LAUNCHER=ccache .
- x86_64-w64-mingw32.static-qmake-qt5 CONFIG+=release CONFIG+=force_debug_info
- x86_64-w64-mingw32.static-cmake --build build -j 16
- make
- mv build/groundstation.exe Ground_Station-$CI_COMMIT_SHORT_SHA.exe
- mv release/SkywardHub.exe Ground_Station-$CI_COMMIT_SHORT_SHA.exe
artifacts:
artifacts:
name: Windows executable
name: Windows executable
paths:
paths:
- Ground_Station-$CI_COMMIT_SHORT_SHA.exe
- Ground_Station-$CI_COMMIT_SHORT_SHA.exe
expire_in: 7 days
expire_in: 7 days
# release:
post_on_slack:
# tag_name: latest-$CI_COMMIT_SHORT_SHA
stage: release
# name: Continuous build
image: curlimages/curl
# description: Latest build
script:
 
- |
 
curl -XPOST -H "Content-type: application/json" -d "{
 
\"project_id\": $CI_PROJECT_ID,
 
\"pipeline_id\": $CI_PIPELINE_ID,
 
\"message\": \"Bruh, SkywardHub just dropped a new build!\",
 
\"commit_message\": \"${CI_COMMIT_MESSAGE//[$'\n']}\",
 
\"channel_id\": \"$SLACK_CHANNEL_ID\"
 
}" https://api.skywarder.eu/post_job_artifacts
 
rules:
 
- if: $CI_COMMIT_BRANCH == "main"
Loading