-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(CPP/CI): setup CI for cmake build
Linux docker build Extra: add build configuration fixes for rest of the platforms fixes: 5998
- Loading branch information
1 parent
757aa4a
commit 655b3ab
Showing
5 changed files
with
100 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
library 'status-jenkins-lib@v1.3.4' | ||
|
||
pipeline { | ||
agent { | ||
dockerfile { | ||
filename 'ci/cpp/Dockerfile-linux' | ||
dir 'build' | ||
label 'linux' | ||
/* allows jenkins use cat and mounts '/dev/fuse' for linuxdeployqt */ | ||
args '-v ${PWD}:/home/user/project:ro -v ${PWD}/build:/home/user/build:rw --entrypoint="" --cap-add SYS_ADMIN --security-opt apparmor:unconfined --device /dev/fuse' | ||
} | ||
} | ||
|
||
parameters { | ||
booleanParam( | ||
name: 'RELEASE', | ||
description: 'Decides whether binaries are built with debug symbols.', | ||
defaultValue: params.RELEASE ?: false | ||
) | ||
} | ||
|
||
options { | ||
timestamps() | ||
/* Prevent Jenkins jobs from running forever */ | ||
timeout(time: 20, unit: 'MINUTES') | ||
/* manage how many builds we keep */ | ||
buildDiscarder(logRotator( | ||
numToKeepStr: '10', | ||
daysToKeepStr: '30', | ||
artifactNumToKeepStr: '3', | ||
)) | ||
} | ||
|
||
environment { | ||
TARGET = 'linux' | ||
} | ||
|
||
stages { | ||
stage('Cmake Build') { | ||
steps { sh 'qt-cmake /home/user/project -G Ninja -B /home/user/build; cmake --build /home/user/build; linuxdeploy --plugin qt -e "$(find /home/user/build -maxdepth 1 -type f -executable)" --appdir /home/user/build/deploy' } | ||
} | ||
|
||
// stage('Package') { | ||
// steps { script { | ||
// linux.bundle('tgz-linux') | ||
// } } | ||
// } | ||
|
||
// stage('Parallel Upload') { | ||
// parallel { | ||
// stage('Upload') { | ||
// steps { script { | ||
// env.PKG_URL = s3.uploadArtifact(env.STATUS_CLIENT_TARBALL) | ||
// jenkins.setBuildDesc(AppImage: env.PKG_URL) | ||
// } } | ||
// } | ||
// stage('Archive') { | ||
// steps { script { | ||
// archiveArtifacts("${env.STATUS_CLIENT_TARBALL}*") | ||
// } } | ||
// } | ||
// } | ||
// } | ||
} | ||
|
||
post { | ||
success { script { github.notifyPR(true) } } | ||
failure { script { github.notifyPR(false) } } | ||
always { cleanWs() } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM stateoftheartio/qt6:6.3-gcc-aqt | ||
|
||
RUN export DEBIAN_FRONTEND=noninteractive \ | ||
&& sudo apt update -yq \ | ||
&& sudo apt install -yq libgl-dev libvulkan-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
function(configure_app_os_specific TARGET_ARG URL_ORGANIZATION_NAME DOMAIN_ARG VERSION_MAJOR VERSION_MINOR VERSION_PATCH) | ||
# Noting here for now; helps simplifying main setup by removing platform if/else conditions | ||
endfunction() |