Add Jenkinsfile

This commit is contained in:
zontreck 2024-10-06 20:25:02 +00:00
parent fc5b8019ba
commit a6052f5c13

96
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,96 @@
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
'''
}
}
}
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
for i in *.patch; do
echo "Applying patch: $i"
patch -Np1 -i "$i" -d ../phoenix-firestorm/
done
'''
}
}
}
stage("Build Viewer") {
agent {
label "linuxfs"
}
script {
sh '''
#!/bin/bash
rm -fv build*/newview/Phoenix*tar*
rm -fv build*/newview/*.AppImage
rm -rfv build*/newview/squash*
rm -rfv build*/newview/packaged
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
'''
}
post {
always {
archiveArtifacts artifacts: "*build*/newview/Phoenix*tar"
deleteDir()
}
}
}
}
}