FSPatched/Jenkinsfile

114 lines
2.7 KiB
Text
Raw Normal View History

2024-10-06 13:25:02 -07:00
pipeline {
agent any
options {
buildDiscarder(
logRotator(
numToKeepStr: '5'
)
)
}
stages {
stage("Clean Up") {
agent {
label 'linuxfs'
}
steps {
script {
sh '''
#!/bin/bash
git clean -xfd
git reset --hard
'''
}
}
post {
always {
deleteDir()
}
}
2024-10-06 13:25:02 -07:00
}
stage("Clone Viewer Source") {
agent {
label "linuxfs"
}
steps {
script {
sh '''
#!/bin/bash
git submodule add https://github.com/FirestormViewer/phoenix-firestorm
'''
}
}
}
stage("Apply Patches") {
agent {
label "LinuxFS"
}
steps {
script {
sh '''
#!/bin/bash
cd patches
2024-10-06 14:25:44 -07:00
# Loop over all patch files and apply them
for patch_file in *.patch; do
if [ -f "$patch_file" ]
then
2024-10-06 14:25:44 -07:00
echo "Applying $patch_file to ../phoenix-firestorm/"
patch -d ../phoenix-firestorm/ -Np1 < "$patch_file"
fi
done
echo "All patches applied."
2024-10-06 13:25:02 -07:00
'''
}
}
}
stage("Build Viewer") {
agent {
label "linuxfs"
}
2024-10-06 13:54:14 -07:00
steps {
2024-10-06 13:25:02 -07:00
2024-10-06 13:54:14 -07:00
script {
sh '''
#!/bin/bash
2024-10-06 13:26:19 -07:00
2024-10-06 13:54:14 -07:00
cd phoenix-firestorm
2024-10-06 13:25:02 -07:00
2024-10-06 13:54:14 -07:00
rm -fv build*/newview/Phoenix*tar*
rm -fv build*/newview/*.AppImage
rm -rfv build*/newview/squash*
rm -rfv build*/newview/packaged
2024-10-06 13:25:02 -07:00
2024-10-06 13:54:14 -07:00
chmod +x /firestorm/installables.sh
/firestorm/installables.sh
autobuild configure -A64 -c ReleaseFS_open -- --fmodstudio --chan FS_ci_zdev --package -DLL_TESTS:BOOL=NO
autobuild build -A64 -c ReleaseFS_open --no-configure -- --fmodstudio || true
'''
}
2024-10-06 13:25:02 -07:00
}
post {
always {
archiveArtifacts artifacts: "phoenix*/build*/newview/Phoenix*tar*"
2024-10-06 13:25:02 -07:00
deleteDir()
}
}
}
}
}